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

Commit d9d8b739 authored by zhangguobing's avatar zhangguobing

~api:券商品业务-商品创建/编辑入参优化;

parent 8ee7c233
...@@ -17,59 +17,59 @@ public class GoblinStoreMgtGoodsCouponAddSkuParam implements Serializable { ...@@ -17,59 +17,59 @@ public class GoblinStoreMgtGoodsCouponAddSkuParam implements Serializable {
private static final long serialVersionUID = 7886534346305369761L; private static final long serialVersionUID = 7886534346305369761L;
@ApiModelProperty(position = 10, required = false, value = "单品ID[编辑时必传]") @ApiModelProperty(position = 10, required = false, value = "单品ID[编辑时必传]")
private String skuId; private String skuId;
@ApiModelProperty(position = 11, required = false, value = "单品编码[默认为系统编码,也可手动输入商家自己的编码]") // @ApiModelProperty(position = 11, required = false, value = "单品编码[默认为系统编码,也可手动输入商家自己的编码]")
@Pattern(regexp = LnsRegex.Valid.ALPHABET_NUMBER_UNDER_50, message = "单品编码格式或长度有误") // @Pattern(regexp = LnsRegex.Valid.ALPHABET_NUMBER_UNDER_50, message = "单品编码格式或长度有误")
private String skuNo; // private String skuNo;
@ApiModelProperty(position = 12, required = false, value = "单品条码") // @ApiModelProperty(position = 12, required = false, value = "单品条码")
@Pattern(regexp = LnsRegex.Valid.ALPHABET_NUMBER_32, message = "单品条码格式或长度有误") // @Pattern(regexp = LnsRegex.Valid.ALPHABET_NUMBER_32, message = "单品条码格式或长度有误")
private String skuBarCode; // private String skuBarCode;
@ApiModelProperty(position = 13, required = false, value = "ERP商家编码") // @ApiModelProperty(position = 13, required = false, value = "ERP商家编码")
@Size(max = 40, message = "ERP商家编码长度限制40") // @Size(max = 40, message = "ERP商家编码长度限制40")
private String skuErpCode;//- // private String skuErpCode;//-
@ApiModelProperty(position = 14, required = false, value = "ERP托管[0-否|1-是],默认0") // @ApiModelProperty(position = 14, required = false, value = "ERP托管[0-否|1-是],默认0")
@Pattern(regexp = "\\b(0|1)\\b", message = "ERP托管参数无效") // @Pattern(regexp = "\\b(0|1)\\b", message = "ERP托管参数无效")
private String erpHosting;//- // private String erpHosting;//-
@ApiModelProperty(position = 15, required = false, value = "ERP仓库编号") // @ApiModelProperty(position = 15, required = false, value = "ERP仓库编号")
@Size(max = 40, message = "ERP仓库编号长度限制40") // @Size(max = 40, message = "ERP仓库编号长度限制40")
private String erpWarehouseNo;//- // private String erpWarehouseNo;//-
@ApiModelProperty(position = 16, required = false, value = "单品默认图片的url[256]") // @ApiModelProperty(position = 16, required = false, value = "单品默认图片的url[256]")
@NotBlank(message = "单品图片不能为空") // @NotBlank(message = "单品图片不能为空")
private String skuPic; // private String skuPic;
@ApiModelProperty(position = 12, required = false, value = "单品规格信息") @ApiModelProperty(position = 12, required = false, value = "单品规格信息")
@NotNull(message = "规格信息不能为空") // @NotNull(message = "规格信息不能为空")
// @Valid// 初始化写死['规格':'张'] // @Valid// 初始化写死['规格':'张']
private List<GoblinGoodsSpecDto> skuSpecList; private List<GoblinGoodsSpecDto> skuSpecList;
@ApiModelProperty(position = 18, required = false, value = "单品销售价-原价[20,2]") // @ApiModelProperty(position = 18, required = false, value = "单品销售价-原价[20,2]")
private BigDecimal sellPrice; // private BigDecimal sellPrice;
@ApiModelProperty(position = 19, required = true, value = "单品现价[20,2]") @ApiModelProperty(position = 19, required = true, value = "单品现价[20,2]")
@Digits(integer = 6, fraction = 2, message = "参数'单品现价'无效") @Digits(integer = 6, fraction = 2, message = "参数'单品现价'无效")
@DecimalMin(value = "0.01", message = "参数'单品现价'必须为大于0") @DecimalMin(value = "0.01", message = "参数'单品现价'必须为大于0")
private BigDecimal price; private BigDecimal price;
@ApiModelProperty(position = 20, required = false, value = "单品会员价格[20,2]") // @ApiModelProperty(position = 20, required = false, value = "单品会员价格[20,2]")
@NotNull(message = "单品会员价格不能为空") // @NotNull(message = "单品会员价格不能为空")
@Min(value = 0, message = "单品会员价格不能小于0") // @Min(value = 0, message = "单品会员价格不能小于0")
private BigDecimal priceMember; // private BigDecimal priceMember;
@ApiModelProperty(position = 21, required = false, value = "单品的重量[20,2]") // @ApiModelProperty(position = 21, required = false, value = "单品的重量[20,2]")
private BigDecimal weight;//- // private BigDecimal weight;//-
@ApiModelProperty(position = 20, required = true, value = "总库存") @ApiModelProperty(position = 20, required = true, value = "总库存")
@Min(value = 0, message = "总库存不能小于0") @Min(value = 0, message = "总库存不能小于0")
private Integer stock; private Integer stock;
@ApiModelProperty(position = 21, required = false, value = "预警库存") // @ApiModelProperty(position = 21, required = false, value = "预警库存")
private Integer warningStock; // private Integer warningStock;
@ApiModelProperty(position = 22, required = false, value = "ISBN,针对CD/图书等[100]") // @ApiModelProperty(position = 22, required = false, value = "ISBN,针对CD/图书等[100]")
private String skuIsbn;//- // private String skuIsbn;//-
@ApiModelProperty(position = 23, required = false, value = "购买限制[0-全部用户|1-仅会员|2-指定用户]") // @ApiModelProperty(position = 23, required = false, value = "购买限制[0-全部用户|1-仅会员|2-指定用户]")
@NotNull(message = "购买限制不能为空") // @NotNull(message = "购买限制不能为空")
private String buyFactor; // private String buyFactor;
@ApiModelProperty(position = 24, required = false, value = "购买限制人员名单[购买限制为2-指定用户时必填]") // @ApiModelProperty(position = 24, required = false, value = "购买限制人员名单[购买限制为2-指定用户时必填]")
private String buyRoster; // private String buyRoster;
@ApiModelProperty(position = 25, required = false, value = "限量[0-无限制|X:限购数量]") @ApiModelProperty(position = 25, required = false, value = "限量[0-无限制|X:限购数量]")
private Integer buyLimit; private Integer buyLimit;
@ApiModelProperty(position = 26, required = false, value = "单品有效期[yyyy-MM-dd HH:mm:ss]") // @ApiModelProperty(position = 26, required = false, value = "单品有效期[yyyy-MM-dd HH:mm:ss]")
@Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "单品有效期格式有误") // @Pattern(regexp = LnsRegex.Valid.DATETIME_FULL, message = "单品有效期格式有误")
private String skuValidity; // private String skuValidity;
@ApiModelProperty(position = 27, value = "自定义展示[0-默认展示|1-隐藏不可购买]") @ApiModelProperty(position = 27, required = false, value = "自定义展示[0-默认展示|1-隐藏不可购买]")
private String skuAppear; private String skuAppear;
/** /**
......
...@@ -841,13 +841,13 @@ public class GoblinStoreMgtGoodsController { ...@@ -841,13 +841,13 @@ public class GoblinStoreMgtGoodsController {
} }
} }
} }
if (StringUtils.isNotEmpty(mgtGoodsInfoVo.getSpuErpCode()) && StringUtils.isBlank(mgtGoodsEditParam.getSpuErpCode())) { // if (StringUtils.isNotEmpty(mgtGoodsInfoVo.getSpuErpCode()) && StringUtils.isBlank(mgtGoodsEditParam.getSpuErpCode())) {
if (hasSkuFlg && goodsSkuInfoVos.stream().anyMatch(r -> r.getErpHosting() == 1)) {// 存在SKU启用ERP托管,不可修改`spu_erp_code` // if (hasSkuFlg && goodsSkuInfoVos.stream().anyMatch(r -> r.getErpHosting() == 1)) {// 存在SKU启用ERP托管,不可修改`spu_erp_code`
mgtGoodsEditParam.setSpuErpCode(mgtGoodsInfoVo.getSpuErpCode()); // mgtGoodsEditParam.setSpuErpCode(mgtGoodsInfoVo.getSpuErpCode());
} else { // } else {
mgtGoodsEditParam.setSpuErpCode(mgtGoodsEditParam.getSpuErpCode()); // mgtGoodsEditParam.setSpuErpCode(mgtGoodsEditParam.getSpuErpCode());
} // }
} // }
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("商品管理:商品编辑:SPU编辑:[GoblinStoreMgtGoodsCouponAddParam={}]", JsonUtils.toJson(mgtGoodsEditParam)); log.debug("商品管理:商品编辑:SPU编辑:[GoblinStoreMgtGoodsCouponAddParam={}]", JsonUtils.toJson(mgtGoodsEditParam));
} }
......
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