记得上下班打卡 | git大法好,push需谨慎

Commit 8a069918 authored by zhangguobing's avatar zhangguobing

~sql:券商品业务底层结构;

parent a61dd493
...@@ -10,7 +10,7 @@ import java.io.Serializable; ...@@ -10,7 +10,7 @@ import java.io.Serializable;
@Data @Data
public class AdamMemberRightsCouponRuleVo implements Serializable, Cloneable { public class AdamMemberRightsCouponRuleVo implements Serializable, Cloneable {
private static final long serialVersionUID = 4282440130223655255L; private static final long serialVersionUID = 4282440130223655255L;
@ApiModelProperty(value = "适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式]", example = "90") @ApiModelProperty(value = "适用范围[101-音乐节|102-小型演出(livehouse演出) |103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]", example = "90")
private Integer useScope; private Integer useScope;
@ApiModelProperty(value = "适用名称", example = "北京草莓") @ApiModelProperty(value = "适用名称", example = "北京草莓")
private String busiName; private String busiName;
......
...@@ -9,7 +9,7 @@ import javax.validation.constraints.Pattern; ...@@ -9,7 +9,7 @@ import javax.validation.constraints.Pattern;
@ApiModel(value = "CandyCouponRuleBuildParam", description = "添加券规则入参") @ApiModel(value = "CandyCouponRuleBuildParam", description = "添加券规则入参")
public class CandyCouponRuleBuildParam { public class CandyCouponRuleBuildParam {
@Pattern(regexp = "\\b(100|90|91|92|80|81)\\b", message = "适用范围无效") @Pattern(regexp = "\\b(100|90|91|92|80|81)\\b", message = "适用范围无效")
@ApiModelProperty(required = true, value = "适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式]", allowableValues = "100,90,91,92,80,81") @ApiModelProperty(required = true, value = "适用范围[101-音乐节|102-小型演出(livehouse演出) |103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]", allowableValues = "100,90,91,92,80,81")
private Integer useScope; private Integer useScope;
@ApiModelProperty(required = true, value = "适用名称", allowableValues = "适用名称") @ApiModelProperty(required = true, value = "适用名称", allowableValues = "适用名称")
private String busiName; private String busiName;
......
...@@ -12,7 +12,7 @@ public class CandyCouponRulesVo implements Serializable,Cloneable { ...@@ -12,7 +12,7 @@ public class CandyCouponRulesVo implements Serializable,Cloneable {
private static final long serialVersionUID = 4073256621782131607L; private static final long serialVersionUID = 4073256621782131607L;
@ApiModelProperty(value = "适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式]",example = "90") @ApiModelProperty(value = "适用范围[101-音乐节|102-小型演出(livehouse演出) |103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]",example = "90")
private Integer useScope; private Integer useScope;
@ApiModelProperty(value = "适用名称",example = "北京草莓") @ApiModelProperty(value = "适用名称",example = "北京草莓")
private String busiName; private String busiName;
......
...@@ -41,6 +41,6 @@ public class GoblinStoreMgtGoodsFilterParam implements Serializable { ...@@ -41,6 +41,6 @@ public class GoblinStoreMgtGoodsFilterParam implements Serializable {
private BigDecimal priceGe; private BigDecimal priceGe;
@ApiModelProperty(position = 20, required = false, value = "价格区间MAX") @ApiModelProperty(position = 20, required = false, value = "价格区间MAX")
private BigDecimal priceLe; private BigDecimal priceLe;
@ApiModelProperty(position = 21, required = false, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 21, required = false, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private Integer spuType; private Integer spuType;
} }
...@@ -24,7 +24,7 @@ public class GoblinStoreMgtGoodsSkuSimpleFilterParam implements Serializable { ...@@ -24,7 +24,7 @@ public class GoblinStoreMgtGoodsSkuSimpleFilterParam implements Serializable {
@ApiModelProperty(position = 13, required = false, value = "搜索关键字[128]") @ApiModelProperty(position = 13, required = false, value = "搜索关键字[128]")
@Size(min = 2, max = 100, message = "搜索关键字长度范围2~100") @Size(min = 2, max = 100, message = "搜索关键字长度范围2~100")
private String keyword; private String keyword;
@ApiModelProperty(position = 14, required = false, value = "商品类型[0-常规|1-数字藏品],未指定则代表全部") @ApiModelProperty(position = 14, required = false, value = "商品类型[0-常规|1-数字藏品|2-券类商品],未指定则代表全部")
private Integer skuType; private Integer skuType;
// @ApiModelProperty(position = 15, required = false, value = "商品上架状态[0-待上架|1-下架|2-违规|3-上架]", allowableValues = "0,1,2,3") // @ApiModelProperty(position = 15, required = false, value = "商品上架状态[0-待上架|1-下架|2-违规|3-上架]", allowableValues = "0,1,2,3")
// private String shelvesStatus; // private String shelvesStatus;
......
...@@ -19,7 +19,7 @@ public class GoblinStoreMgtGoodsListVo implements Serializable, Cloneable { ...@@ -19,7 +19,7 @@ public class GoblinStoreMgtGoodsListVo implements Serializable, Cloneable {
private String spuId; private String spuId;
@ApiModelProperty(position = 12, value = "商品编码[45]") @ApiModelProperty(position = 12, value = "商品编码[45]")
private String spuNo; private String spuNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int spuType; private int spuType;
@ApiModelProperty(position = 13, value = "封面图片地址[256]") @ApiModelProperty(position = 13, value = "封面图片地址[256]")
private String coverPic; private String coverPic;
......
...@@ -14,7 +14,7 @@ public class GoblinStoreMgtGoodsSkuSimpleVo implements Serializable { ...@@ -14,7 +14,7 @@ public class GoblinStoreMgtGoodsSkuSimpleVo implements Serializable {
private String spuId; private String spuId;
@ApiModelProperty(position = 11, value = "单品ID[64]") @ApiModelProperty(position = 11, value = "单品ID[64]")
private String skuId; private String skuId;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType; private int skuType;
@ApiModelProperty(position = 13, value = "单品名称[100]") @ApiModelProperty(position = 13, value = "单品名称[100]")
private String name; private String name;
......
...@@ -30,7 +30,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable { ...@@ -30,7 +30,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String spuErpCode; private String spuErpCode;
@ApiModelProperty(position = 12, value = "ERP类型[WANGDIAN-旺店通]") @ApiModelProperty(position = 12, value = "ERP类型[WANGDIAN-旺店通]")
private String erpType; private String erpType;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int spuType; private int spuType;
@ApiModelProperty(position = 13, value = "商品名称[100]") @ApiModelProperty(position = 13, value = "商品名称[100]")
private String name; private String name;
......
...@@ -35,7 +35,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -35,7 +35,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private int erpHosting; private int erpHosting;
@ApiModelProperty(position = 12, value = "ERP仓库编号") @ApiModelProperty(position = 12, value = "ERP仓库编号")
private String erpWarehouseNo; private String erpWarehouseNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType; private int skuType;
@ApiModelProperty(position = 13, value = "单品的名称[100]") @ApiModelProperty(position = 13, value = "单品的名称[100]")
private String name; private String name;
...@@ -175,7 +175,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -175,7 +175,7 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private static final GoblinGoodsSkuInfoVo obj = new GoblinGoodsSkuInfoVo(); private static final GoblinGoodsSkuInfoVo obj = new GoblinGoodsSkuInfoVo();
public String getUnbox() { public String getUnbox() {
if (skuType == 0) { if (skuType == 0 || skuType == 2) {
return unbox == null ? "0" : unbox; return unbox == null ? "0" : unbox;
} else { } else {
return unbox; return unbox;
......
...@@ -25,7 +25,7 @@ public class NoticeGoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -25,7 +25,7 @@ public class NoticeGoblinGoodsSkuInfoVo implements Serializable, Cloneable {
private String spuId; private String spuId;
@ApiModelProperty(value = "单品的编号[45]") @ApiModelProperty(value = "单品的编号[45]")
private String skuNo; private String skuNo;
@ApiModelProperty(value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int skuType; private int skuType;
@ApiModelProperty(value = "单品的名称[100]") @ApiModelProperty(value = "单品的名称[100]")
private String name; private String name;
......
...@@ -23,7 +23,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable { ...@@ -23,7 +23,7 @@ public class GoblinGoodsInfoVo implements Serializable, Cloneable {
private String spuId; private String spuId;
@ApiModelProperty(position = 12, value = "商品编码[默认为系统编码,也可手动输入商家自己的编码]") @ApiModelProperty(position = 12, value = "商品编码[默认为系统编码,也可手动输入商家自己的编码]")
private String spuNo; private String spuNo;
@ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品]") @ApiModelProperty(position = 12, value = "商品类型[0-常规|1-数字藏品|2-券类商品]")
private int spuType; private int spuType;
@ApiModelProperty(position = 13, value = "商品名称[100]") @ApiModelProperty(position = 13, value = "商品名称[100]")
private String name; private String name;
......
...@@ -39,7 +39,7 @@ public class GoblinCommonController extends BaseController { ...@@ -39,7 +39,7 @@ public class GoblinCommonController extends BaseController {
@GetMapping("goods") @GetMapping("goods")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "title", value = "商品名称[模糊]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "title", value = "商品名称[模糊]"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "type", value = "商品类型[0-常规|1-数字藏品]"), @ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "type", value = "商品类型[0-常规|1-数字藏品|2-券类商品]"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "shelvesStatus", value = "上线状态"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "shelvesStatus", value = "上线状态"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "spuAppear", value = "显示状态"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "spuAppear", value = "显示状态"),
}) })
...@@ -58,7 +58,7 @@ public class GoblinCommonController extends BaseController { ...@@ -58,7 +58,7 @@ public class GoblinCommonController extends BaseController {
@GetMapping("sku") @GetMapping("sku")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "title", value = "商品名称[模糊]"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "title", value = "商品名称[模糊]"),
@ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "type", value = "商品类型[0-常规|1-数字藏品]"), @ApiImplicitParam(type = "form", required = true, dataType = "Integer", name = "type", value = "商品类型[0-常规|1-数字藏品|2-券类商品]"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "shelvesStatus", value = "上线状态"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "shelvesStatus", value = "上线状态"),
}) })
@ResponseBody @ResponseBody
......
...@@ -28,7 +28,7 @@ public class CandyCouponRule implements Serializable { ...@@ -28,7 +28,7 @@ public class CandyCouponRule implements Serializable {
private String couponId; private String couponId;
/** /**
* 适用范围[100-全场|90-演出|91-场次|92-票|80-商品|81-款式] * 适用范围[101-音乐节|102-小型演出(livehouse演出) |103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]
*/ */
private Integer useScope; private Integer useScope;
......
...@@ -51,7 +51,7 @@ public class GoblinGoods implements Serializable { ...@@ -51,7 +51,7 @@ public class GoblinGoods implements Serializable {
private String erpType; private String erpType;
/** /**
* 商品类型[0-常规|1-数字藏品] * 商品类型[0-常规|1-数字藏品|2-券类商品]
*/ */
private Integer spuType; private Integer spuType;
......
...@@ -58,7 +58,7 @@ public class GoblinGoodsSku implements Serializable { ...@@ -58,7 +58,7 @@ public class GoblinGoodsSku implements Serializable {
private String erpWarehouseNo; private String erpWarehouseNo;
/** /**
* 商品类型[0-常规|1-数字藏品] * 商品类型[0-常规|1-数字藏品|2-券类商品]
*/ */
private Integer skuType; private Integer skuType;
......
package com.liquidnet.service.goblin.entity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 商品券信息
* </p>
*
* @author liquidnet
* @since 2024-01-23
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinGoodsSkuCoupon implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* 单品id
*/
private String skuId;
/**
* 业务类别[1-演出]
*/
private Integer busiType;
/**
* 券类型[1-代金券]
*/
private Integer couType;
/**
* 适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演]
*/
private Integer useScope;
/**
* 注意/须知
*/
private String notice;
/**
* 面值
*/
private BigDecimal valFace;
/**
* 购买后(单位天)有效期,与生效/过期时间二选一
*/
private Integer validity;
/**
* 生效时间
*/
private LocalDateTime effectAt;
/**
* 过期时间
*/
private LocalDateTime expireAt;
private String comment;
}
package com.liquidnet.service.goblin.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 商品券关联人信息
* </p>
*
* @author liquidnet
* @since 2024-01-23
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinOrderSkuAssoc implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* 订单sku_id
*/
private String orderSkuId;
/**
* 1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证
*/
private Integer idType;
/**
* 关联人证件号码
*/
private String idCard;
/**
* 关联人姓名
*/
private String personName;
/**
* 操作人
*/
private String operator;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private String comment;
}
package com.liquidnet.service.goblin.mapper;
import com.liquidnet.service.goblin.entity.GoblinGoodsSkuCoupon;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 商品券信息 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2024-01-23
*/
public interface GoblinGoodsSkuCouponMapper extends BaseMapper<GoblinGoodsSkuCoupon> {
}
package com.liquidnet.service.goblin.mapper;
import com.liquidnet.service.goblin.entity.GoblinOrderSkuAssoc;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 商品券关联人信息 Mapper 接口
* </p>
*
* @author liquidnet
* @since 2024-01-23
*/
public interface GoblinOrderSkuAssocMapper extends BaseMapper<GoblinOrderSkuAssoc> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinGoodsSkuCouponMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.liquidnet.service.goblin.mapper.GoblinOrderSkuAssocMapper">
</mapper>
...@@ -181,6 +181,8 @@ create table candy_coupon_relate ...@@ -181,6 +181,8 @@ create table candy_coupon_relate
comment text comment text
) engine InnoDB comment '券适用关联配置'; ) engine InnoDB comment '券适用关联配置';
create index idx_ccr_coupon_id on candy_coupon_relate (coupon_id); create index idx_ccr_coupon_id on candy_coupon_relate (coupon_id);
# -- >>------------------------------------------------------------------------------------ |20240123 商品券业务
alter table candy_coupon_rule modify use_scope smallint null comment '适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演|100-全场|90-演出|91-场次|92-票|80-商品|81-款式]';
-- >>------------------------------------------------------------------------------------ -- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------ -- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------ -- >>------------------------------------------------------------------------------------
\ No newline at end of file
...@@ -1240,6 +1240,49 @@ create table goblin_store_erp_config ...@@ -1240,6 +1240,49 @@ create table goblin_store_erp_config
) engine = InnoDB comment '店铺ERP配置'; ) engine = InnoDB comment '店铺ERP配置';
create unique index idx_gsec_store_id on goblin_store_erp_config (store_id); create unique index idx_gsec_store_id on goblin_store_erp_config (store_id);
# -- >>------------------------------------------------------------------------------------ |20240123 商品券业务
alter table goblin_goods modify spu_type tinyint default 0 not null comment '商品类型[0-常规|1-数字藏品|2-券类商品]';
drop table if exists goblin_goods_sku_coupon;
create table goblin_goods_sku_coupon
(
mid bigint auto_increment primary key,
sku_id varchar(64) not null comment '单品id',
busi_type smallint null comment '业务类别[1-演出]',
cou_type smallint null comment '券类型[1-代金券]',
use_scope smallint null comment '适用范围[101-音乐节|102-小型演出(livehouse演出)|103-巡演]',
notice varchar(200) null comment '注意/须知',
val_face decimal(8, 2) comment '面值',
validity int null comment '购买后(单位天)有效期,与生效/过期时间二选一',
effect_at datetime(3) null comment '生效时间',
expire_at datetime(3) null comment '过期时间',
comment varchar(255)
) engine = InnoDB comment '商品券信息';
create unique index uidx_ggsc_sku_id on goblin_goods_sku_coupon (sku_id);
drop table if exists goblin_order_sku_assoc;
create table goblin_order_sku_assoc
(
mid bigint unsigned auto_increment primary key,
order_sku_id varchar(64) default '' null comment '订单sku_id',
id_type tinyint not null comment '1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证',
id_card varchar(30) not null comment '关联人证件号码',
person_name varchar(60) not null comment '关联人姓名',
operator varchar(64) not null comment '操作人',
created_at datetime(3) not null,
updated_at datetime(3),
comment varchar(255)
) engine InnoDB comment '商品券关联人信息';
create index idx_gosa_order_sku_id on goblin_order_sku_assoc (order_sku_id);
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
# -- >>------------------------------------------------------------------------------------ # -- >>------------------------------------------------------------------------------------
......
...@@ -280,7 +280,7 @@ public class GoblinStoreMgtGoodsController { ...@@ -280,7 +280,7 @@ public class GoblinStoreMgtGoodsController {
log.warn("商品管理:SPU管理:上架警告:无效操作,商品已上架[UID={},skuId={}]", currentUid, skuId); log.warn("商品管理:SPU管理:上架警告:无效操作,商品已上架[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品已上架"); return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品已上架");
} }
if (goodsSkuInfoVo.getSkuType() == 0) { if (goodsSkuInfoVo.getSkuType() != 1) {
log.warn("商品管理:SPU管理:上架警告:数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId); log.warn("商品管理:SPU管理:上架警告:数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品非数字藏品"); return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品非数字藏品");
} }
...@@ -306,7 +306,7 @@ public class GoblinStoreMgtGoodsController { ...@@ -306,7 +306,7 @@ public class GoblinStoreMgtGoodsController {
log.warn("商品管理:SPU管理:售罄警告:非法操作,参数有误[UID={},skuId={}]", currentUid, skuId); log.warn("商品管理:SPU管理:售罄警告:非法操作,参数有误[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "参数有误"); return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "参数有误");
} }
if (goodsSkuInfoVo.getSkuType() == 0) { if (goodsSkuInfoVo.getSkuType() != 1) {
log.warn("商品管理:SPU管理:售罄警告:数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId); log.warn("商品管理:SPU管理:售罄警告:数字藏品不支持此操作[UID={},skuId={}]", currentUid, skuId);
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品非数字藏品"); return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,商品非数字藏品");
} }
...@@ -669,7 +669,7 @@ public class GoblinStoreMgtGoodsController { ...@@ -669,7 +669,7 @@ public class GoblinStoreMgtGoodsController {
|| !mgtGoodsInfoVo.getDelFlg().equals("0")) { || !mgtGoodsInfoVo.getDelFlg().equals("0")) {
return ResponseDto.failure(ErrorMapping.get("149010")); return ResponseDto.failure(ErrorMapping.get("149010"));
} }
if (mgtGoodsInfoVo.getSpuType() == 0) { if (mgtGoodsInfoVo.getSpuType() != 1) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,该商品非数字藏品"); return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,该商品非数字藏品");
} }
if (!mgtGoodsInfoVo.getName().equals(mgtDigitalGoodsEditParam.getName()) if (!mgtGoodsInfoVo.getName().equals(mgtDigitalGoodsEditParam.getName())
...@@ -923,7 +923,7 @@ public class GoblinStoreMgtGoodsController { ...@@ -923,7 +923,7 @@ public class GoblinStoreMgtGoodsController {
if (null == mgtGoodsInfoVo || !mgtGoodsInfoVo.getDelFlg().equals("0")) { if (null == mgtGoodsInfoVo || !mgtGoodsInfoVo.getDelFlg().equals("0")) {
return ResponseDto.failure(ErrorMapping.get("149010")); return ResponseDto.failure(ErrorMapping.get("149010"));
} }
if (mgtGoodsInfoVo.getSpuType() == 0) { if (mgtGoodsInfoVo.getSpuType() != 1) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,该商品非数字藏品"); return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "无效操作,该商品非数字藏品");
} }
BigDecimal hitRatio = mgtDigitalGoodsEditSkuParam.getHitRatio(); BigDecimal hitRatio = mgtDigitalGoodsEditSkuParam.getHitRatio();
...@@ -1117,7 +1117,7 @@ public class GoblinStoreMgtGoodsController { ...@@ -1117,7 +1117,7 @@ public class GoblinStoreMgtGoodsController {
if (null == goodsInfoVo || !goodsInfoVo.getDelFlg().equals("0") || !goodsInfoVo.getStoreId().equals(storeId)) { if (null == goodsInfoVo || !goodsInfoVo.getDelFlg().equals("0") || !goodsInfoVo.getStoreId().equals(storeId)) {
return ResponseDto.failure(ErrorMapping.get("149010")); return ResponseDto.failure(ErrorMapping.get("149010"));
} }
if (goodsInfoVo.getSpuType() == 0) { if (goodsInfoVo.getSpuType() != 1) {
return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "该商品非数字藏品"); return ResponseDto.failure(ErrorCode.HTTP_PARAM_ERROR.getCode(), "该商品非数字藏品");
} }
String unbox = mgtDigitalGoodsAddSkuParam.getUnbox(); String unbox = mgtDigitalGoodsAddSkuParam.getUnbox();
......
...@@ -593,7 +593,8 @@ public class GoblinMongoUtils { ...@@ -593,7 +593,8 @@ public class GoblinMongoUtils {
if (0 == filterParam.getSpuType()) { if (0 == filterParam.getSpuType()) {
criteria.orOperator(Criteria.where("spuType").exists(false), (Criteria.where("spuType").is(0))); criteria.orOperator(Criteria.where("spuType").exists(false), (Criteria.where("spuType").is(0)));
} else { } else {
criteria.and("spuType").is(1); // criteria.and("spuType").is(1);
criteria.and("spuType").is(filterParam.getSpuType());
} }
} }
if (StringUtils.isNotBlank(filterParam.getKeyword())) { if (StringUtils.isNotBlank(filterParam.getKeyword())) {
...@@ -895,8 +896,12 @@ public class GoblinMongoUtils { ...@@ -895,8 +896,12 @@ public class GoblinMongoUtils {
filterParam.setKeyword(null); filterParam.setKeyword(null);
} else if (0 == filterParam.getSkuType()) { } else if (0 == filterParam.getSkuType()) {
criteria.orOperator(Criteria.where("skuType").exists(false), (Criteria.where("skuType").is(0))); criteria.orOperator(Criteria.where("skuType").exists(false), (Criteria.where("skuType").is(0)));
} else if (1 == filterParam.getSkuType()) { }
criteria.and("skuType").is(1); // else if (1 == filterParam.getSkuType()) {
// criteria.and("skuType").is(1);
// }
else {
criteria.and("skuType").is(filterParam.getSkuType());
} }
} }
if (StringUtils.isNotBlank(filterParam.getKeyword())) { if (StringUtils.isNotBlank(filterParam.getKeyword())) {
......
...@@ -2268,7 +2268,7 @@ public class GoblinRedisUtils { ...@@ -2268,7 +2268,7 @@ public class GoblinRedisUtils {
} }
/** /**
* private int skuType 商品类型[0-常规|1-数字藏品] * private int skuType 商品类型[0-常规|1-数字藏品|2-券类商品]
* private String status 审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过]; * private String status 审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过];
* private String shelvesStatus 单品上架状态[0-待上架|1-下架|2-违规|3-上架]; * private String shelvesStatus 单品上架状态[0-待上架|1-下架|2-违规|3-上架];
* private String skuAppear 是否隐藏[0-默认展示|1-隐藏]; * private String skuAppear 是否隐藏[0-默认展示|1-隐藏];
......
...@@ -158,7 +158,7 @@ public class MixOrderServiceImpl implements IMixOrderService { ...@@ -158,7 +158,7 @@ public class MixOrderServiceImpl implements IMixOrderService {
canBuyIds.add(skuId + "," + itemVo.getCount()); canBuyIds.add(skuId + "," + itemVo.getCount());
} }
} }
if (skuInfoVo.getSkuType() == 0) { if (skuInfoVo.getSkuType() == 0 || skuInfoVo.getSkuType() == 2) {
skuInfoList.add(skuInfoVo); skuInfoList.add(skuInfoVo);
skuMix.put(skuInfoVo.getSkuId() + "price", itemVo.getPrice()); skuMix.put(skuInfoVo.getSkuId() + "price", itemVo.getPrice());
skuMix.put(skuInfoVo.getSkuId() + "count", itemVo.getCount()); skuMix.put(skuInfoVo.getSkuId() + "count", itemVo.getCount());
......
...@@ -429,7 +429,7 @@ public class GoblinNftOrderUtils { ...@@ -429,7 +429,7 @@ public class GoblinNftOrderUtils {
} }
/** /**
* private int skuType 商品类型[0-常规|1-数字藏品] * private int skuType 商品类型[0-常规|1-数字藏品|2-券类商品]
* private String status 审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过]; * private String status 审核状态[0-初始编辑|1-审核中|2-审核不通过|3-审核通过];
* private String shelvesStatus 单品上架状态[0-待上架|1-下架|2-违规|3-上架]; * private String shelvesStatus 单品上架状态[0-待上架|1-下架|2-违规|3-上架];
* private String skuAppear 是否隐藏[0-默认展示|1-隐藏]; 隐藏款 拼参数可购买 盲盒可抽 * private String skuAppear 是否隐藏[0-默认展示|1-隐藏]; 隐藏款 拼参数可购买 盲盒可抽
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment