记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
d9d8b739
Commit
d9d8b739
authored
Jan 26, 2024
by
zhangguobing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~api:券商品业务-商品创建/编辑入参优化;
parent
8ee7c233
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
115 deletions
+114
-115
GoblinStoreMgtGoodsCouponAddParam.java
.../goblin/dto/manage/GoblinStoreMgtGoodsCouponAddParam.java
+67
-68
GoblinStoreMgtGoodsCouponAddSkuParam.java
...blin/dto/manage/GoblinStoreMgtGoodsCouponAddSkuParam.java
+40
-40
GoblinStoreMgtGoodsController.java
...blin/controller/manage/GoblinStoreMgtGoodsController.java
+7
-7
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtGoodsCouponAddParam.java
View file @
d9d8b739
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
;
package
com
.
liquidnet
.
service
.
goblin
.
dto
.
manage
;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
com.liquidnet.commons.lang.constant.LnsRegex
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.service.base.ErrorMapping
;
import
com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto
;
import
com.liquidnet.service.goblin.dto.GoblinGoodsSpecDto
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo
;
...
@@ -22,7 +20,6 @@ import javax.validation.constraints.NotNull;
...
@@ -22,7 +20,6 @@ import javax.validation.constraints.NotNull;
import
javax.validation.constraints.Pattern
;
import
javax.validation.constraints.Pattern
;
import
javax.validation.constraints.Size
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -45,11 +42,11 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
...
@@ -45,11 +42,11 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
@NotBlank
(
message
=
"商品名称不能为空"
)
@NotBlank
(
message
=
"商品名称不能为空"
)
@Size
(
max
=
36
,
message
=
"商品名称长度超限"
)
@Size
(
max
=
36
,
message
=
"商品名称长度超限"
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
position
=
13
,
required
=
false
,
value
=
"商品名称[128]"
)
//
@ApiModelProperty(position = 13, required = false, value = "商品名称[128]")
@Size
(
max
=
128
,
message
=
"商品副名称长度超限"
)
//
@Size(max = 128, message = "商品副名称长度超限")
private
String
subtitle
;
//-
//
private String subtitle;//-
@ApiModelProperty
(
position
=
14
,
required
=
false
,
value
=
"商品销售价-原价[20,2]"
)
//
@ApiModelProperty(position = 14, required = false, value = "商品销售价-原价[20,2]")
private
BigDecimal
sellPrice
;
//-
//
private BigDecimal sellPrice;//-
@ApiModelProperty
(
position
=
15
,
required
=
true
,
value
=
"商品一级分类ID[30]"
)
@ApiModelProperty
(
position
=
15
,
required
=
true
,
value
=
"商品一级分类ID[30]"
)
@NotBlank
(
message
=
"商品分类ID不能为空"
)
@NotBlank
(
message
=
"商品分类ID不能为空"
)
...
@@ -78,26 +75,26 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
...
@@ -78,26 +75,26 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
* ---------------------------- 价格库存 ----------------------------
* ---------------------------- 价格库存 ----------------------------
**/
**/
@ApiModelProperty
(
position
=
23
,
required
=
false
,
value
=
"规格展现方式[1-常规|2-组合]"
,
allowableValues
=
"1,2"
,
example
=
"1"
)
//
@ApiModelProperty(position = 23, required = false, value = "规格展现方式[1-常规|2-组合]", allowableValues = "1,2", example = "1")
@NotBlank
(
message
=
"规格展现方式不能为空"
)
//
@NotBlank(message = "规格展现方式不能为空")
@Pattern
(
regexp
=
"\\b(1|2)\\b"
,
message
=
"规格展现方式参数无效"
)
//
@Pattern(regexp = "\\b(1|2)\\b", message = "规格展现方式参数无效")
private
String
specMode
;
//
private String specMode;
@ApiModelProperty
(
position
=
24
,
required
=
false
,
value
=
"SKU规格信息[初次添加商品必填]"
)
@ApiModelProperty
(
position
=
24
,
required
=
false
,
value
=
"SKU规格信息[初次添加商品必填]"
)
// @NotNull(message = "SKU规格信息不能为空")
// @NotNull(message = "SKU规格信息不能为空")
@Valid
@Valid
private
GoblinStoreMgtGoodsCouponAddSkuParam
skuParam
;
private
GoblinStoreMgtGoodsCouponAddSkuParam
skuParam
;
@ApiModelProperty
(
position
=
25
,
required
=
false
,
value
=
"物流模版"
,
example
=
"松鼠德邦"
)
//
@ApiModelProperty(position = 25, required = false, value = "物流模版", example = "松鼠德邦")
@Size
(
max
=
50
,
message
=
"物流模版ID过长"
)
//
@Size(max = 50, message = "物流模版ID过长")
private
String
logisticsTemplate
;
//-
//
private String logisticsTemplate;//-
@ApiModelProperty
(
position
=
26
,
required
=
false
,
value
=
"商品编码[默认为系统编码,也可手动输入商家自己的编码]"
)
@ApiModelProperty
(
position
=
26
,
required
=
false
,
value
=
"商品编码[默认为系统编码,也可手动输入商家自己的编码]"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
ALPHABET_NUMBER_UNDER_50
,
message
=
"商品编码格式或长度有误"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
ALPHABET_NUMBER_UNDER_50
,
message
=
"商品编码格式或长度有误"
)
private
String
spuNo
;
private
String
spuNo
;
@ApiModelProperty
(
position
=
26
,
required
=
false
,
value
=
"ERP类型[WANGDIAN-旺店通]"
)
//
@ApiModelProperty(position = 26, required = false, value = "ERP类型[WANGDIAN-旺店通]")
@Pattern
(
regexp
=
"\\b(WANGDIAN)\\b"
,
message
=
"ERP类型无效"
)
//
@Pattern(regexp = "\\b(WANGDIAN)\\b", message = "ERP类型无效")
private
String
erpType
;
//-
//
private String erpType;//-
@ApiModelProperty
(
position
=
26
,
required
=
false
,
value
=
"ERP货品编号[商品对应在ERP的商品编码,默认为空]"
)
//
@ApiModelProperty(position = 26, required = false, value = "ERP货品编号[商品对应在ERP的商品编码,默认为空]")
@Size
(
max
=
40
,
message
=
"ERP货品编号长度限制40"
)
//
@Size(max = 40, message = "ERP货品编号长度限制40")
private
String
spuErpCode
;
//-
//
private String spuErpCode;//-
/**
/**
* ---------------------------- 商品介绍 ----------------------------
* ---------------------------- 商品介绍 ----------------------------
...
@@ -118,12 +115,12 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
...
@@ -118,12 +115,12 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
@ApiModelProperty
(
position
=
29
,
required
=
false
,
value
=
"预约上架时间[yyyy-MM-dd HH:mm:ss][上架处理方式为3-预约定时上架时需要指定]"
)
@ApiModelProperty
(
position
=
29
,
required
=
false
,
value
=
"预约上架时间[yyyy-MM-dd HH:mm:ss][上架处理方式为3-预约定时上架时需要指定]"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
DATETIME_FULL
,
message
=
"预约上架时间格式有误"
)
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
DATETIME_FULL
,
message
=
"预约上架时间格式有误"
)
private
String
shelvesTime
;
private
String
shelvesTime
;
@ApiModelProperty
(
position
=
30
,
required
=
false
,
value
=
"商品有效期[yyyy-MM-dd]"
)
//
@ApiModelProperty(position = 30, required = false, value = "商品有效期[yyyy-MM-dd]")
@Pattern
(
regexp
=
LnsRegex
.
Valid
.
DATETIME_YMD
,
message
=
"商品有效期格式有误"
)
//
@Pattern(regexp = LnsRegex.Valid.DATETIME_YMD, message = "商品有效期格式有误")
private
String
spuValidity
;
//
private String spuValidity;
@ApiModelProperty
(
position
=
31
,
required
=
false
,
value
=
"是否虚拟商品[0-否|1-是]"
,
allowableValues
=
"0,1"
,
example
=
"0"
)
//
@ApiModelProperty(position = 31, required = false, value = "是否虚拟商品[0-否|1-是]", allowableValues = "0,1", example = "0")
@Pattern
(
regexp
=
"\\b(0|1)\\b"
,
message
=
"是否虚拟商品参数无效"
)
//
@Pattern(regexp = "\\b(0|1)\\b", message = "是否虚拟商品参数无效")
private
String
virtualFlg
;
//---默认1
//
private String virtualFlg;//---默认1
/**
/**
* ---------------------------- 服务保障 ----------------------------
* ---------------------------- 服务保障 ----------------------------
...
@@ -165,8 +162,8 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
...
@@ -165,8 +162,8 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
vo
.
setSpuNo
(
this
.
getSpuNo
());
vo
.
setSpuNo
(
this
.
getSpuNo
());
}
}
vo
.
setName
(
this
.
getName
());
vo
.
setName
(
this
.
getName
());
vo
.
setSubtitle
(
this
.
getSubtitle
());
//
vo.setSubtitle(this.getSubtitle());
vo
.
setSellPrice
(
this
.
getSellPrice
());
//
vo.setSellPrice(this.getSellPrice());
// vo.setPriceGe(BigDecimal.ZERO);
// vo.setPriceGe(BigDecimal.ZERO);
// vo.setPriceLe(BigDecimal.ZERO);
// vo.setPriceLe(BigDecimal.ZERO);
vo
.
setIntro
(
this
.
getIntro
());
vo
.
setIntro
(
this
.
getIntro
());
...
@@ -179,7 +176,7 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
...
@@ -179,7 +176,7 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
vo
.
setCateTid
(
this
.
getCateTid
());
vo
.
setCateTid
(
this
.
getCateTid
());
vo
.
setShelvesHandle
(
this
.
getShelvesHandle
());
vo
.
setShelvesHandle
(
this
.
getShelvesHandle
());
vo
.
setShelvesTime
(
this
.
getShelvesTime
());
vo
.
setShelvesTime
(
this
.
getShelvesTime
());
vo
.
setSpuValidity
(
this
.
getSpuValidity
());
//
vo.setSpuValidity(this.getSpuValidity());
vo
.
setVirtualFlg
(
"1"
);
vo
.
setVirtualFlg
(
"1"
);
vo
.
setStatus
(
"3"
);
vo
.
setStatus
(
"3"
);
// vo.setReason(null);
// vo.setReason(null);
...
@@ -203,8 +200,8 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
...
@@ -203,8 +200,8 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
// vo.setTagVoList();
// vo.setTagVoList();
// vo.setServiceSupportVoList();
// vo.setServiceSupportVoList();
// vo.setExtagVoList();
// vo.setExtagVoList();
vo
.
setErpType
(
StringUtils
.
isBlank
(
this
.
getErpType
())
?
"WANGDIAN"
:
this
.
getErpType
());
//
vo.setErpType(StringUtils.isBlank(this.getErpType()) ? "WANGDIAN" : this.getErpType());
vo
.
setSpuErpCode
(
StringUtils
.
trim
(
this
.
getSpuErpCode
()));
//
vo.setSpuErpCode(StringUtils.trim(this.getSpuErpCode()));
return
vo
;
return
vo
;
}
}
...
@@ -221,8 +218,8 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
...
@@ -221,8 +218,8 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
vo
.
setSpuId
(
this
.
getSpuId
());
vo
.
setSpuId
(
this
.
getSpuId
());
vo
.
setSpuNo
(
this
.
getSpuNo
());
vo
.
setSpuNo
(
this
.
getSpuNo
());
vo
.
setName
(
this
.
getName
());
vo
.
setName
(
this
.
getName
());
vo
.
setSubtitle
(
this
.
getSubtitle
());
//
vo.setSubtitle(this.getSubtitle());
vo
.
setSellPrice
(
this
.
getSellPrice
());
//
vo.setSellPrice(this.getSellPrice());
vo
.
setIntro
(
this
.
getIntro
());
vo
.
setIntro
(
this
.
getIntro
());
vo
.
setDetails
(
this
.
getDetails
());
vo
.
setDetails
(
this
.
getDetails
());
vo
.
setCoverPic
(
StringUtils
.
isBlank
(
this
.
getCoverPic
())
?
this
.
getImageList
().
get
(
0
)
:
this
.
getCoverPic
());
vo
.
setCoverPic
(
StringUtils
.
isBlank
(
this
.
getCoverPic
())
?
this
.
getImageList
().
get
(
0
)
:
this
.
getCoverPic
());
...
@@ -233,12 +230,12 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
...
@@ -233,12 +230,12 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
vo
.
setCateTid
(
this
.
getCateTid
());
vo
.
setCateTid
(
this
.
getCateTid
());
vo
.
setShelvesHandle
(
this
.
getShelvesHandle
());
vo
.
setShelvesHandle
(
this
.
getShelvesHandle
());
vo
.
setShelvesTime
(
this
.
getShelvesTime
());
vo
.
setShelvesTime
(
this
.
getShelvesTime
());
vo
.
setSpuValidity
(
this
.
getSpuValidity
());
//
vo.setSpuValidity(this.getSpuValidity());
vo
.
setVirtualFlg
(
"1"
);
vo
.
setVirtualFlg
(
"1"
);
vo
.
setImageList
(
this
.
getImageList
());
vo
.
setImageList
(
this
.
getImageList
());
vo
.
setLogisticsTemplate
(
""
);
vo
.
setLogisticsTemplate
(
""
);
// vo.setErpType();// 暂不考虑更改ERP类型
// vo.setErpType();// 暂不考虑更改ERP类型
vo
.
setSpuErpCode
(
StringUtils
.
trim
(
this
.
getSpuErpCode
()));
//
vo.setSpuErpCode(StringUtils.trim(this.getSpuErpCode()));
return
vo
;
return
vo
;
}
}
...
@@ -269,29 +266,31 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
...
@@ -269,29 +266,31 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
skuInfoVo
.
setSkuId
(
addSkuParam
.
getSkuId
());
skuInfoVo
.
setSkuId
(
addSkuParam
.
getSkuId
());
}
}
skuInfoVo
.
setSpuId
(
goodsInfoVo
.
getSpuId
());
skuInfoVo
.
setSpuId
(
goodsInfoVo
.
getSpuId
());
if
(
StringUtils
.
isNotBlank
(
addSkuParam
.
getSkuNo
()))
{
//
if (StringUtils.isNotBlank(addSkuParam.getSkuNo())) {
skuInfoVo
.
setSkuNo
(
addSkuParam
.
getSkuNo
());
//
skuInfoVo.setSkuNo(addSkuParam.getSkuNo());
}
else
{
//
} else {
skuInfoVo
.
setSkuNo
(
goodsInfoVo
.
getSpuNo
());
skuInfoVo
.
setSkuNo
(
goodsInfoVo
.
getSpuNo
());
}
//
}
if
(
StringUtils
.
isNotBlank
(
addSkuParam
.
getSkuBarCode
()))
{
//
if (StringUtils.isNotBlank(addSkuParam.getSkuBarCode())) {
skuInfoVo
.
setSkuBarCode
(
addSkuParam
.
getSkuBarCode
());
//
skuInfoVo.setSkuBarCode(addSkuParam.getSkuBarCode());
}
else
{
//
} else {
skuInfoVo
.
setSkuBarCode
(
goodsInfoVo
.
getSpuNo
());
skuInfoVo
.
setSkuBarCode
(
goodsInfoVo
.
getSpuNo
());
}
//
}
skuInfoVo
.
setName
(
"张"
);
skuInfoVo
.
setName
(
"张"
);
skuInfoVo
.
setSubtitle
(
goodsInfoVo
.
getSubtitle
());
skuInfoVo
.
setSubtitle
(
goodsInfoVo
.
getSubtitle
());
skuInfoVo
.
setSkuPic
(
""
);
skuInfoVo
.
setSkuPic
(
""
);
skuInfoVo
.
setSkuIsbn
(
""
);
skuInfoVo
.
setSkuIsbn
(
""
);
skuInfoVo
.
setStock
(
addSkuParam
.
getStock
());
skuInfoVo
.
setStock
(
addSkuParam
.
getStock
());
skuInfoVo
.
setSkuStock
(
skuInfoVo
.
getStock
());
skuInfoVo
.
setSkuStock
(
skuInfoVo
.
getStock
());
skuInfoVo
.
setWarningStock
(
addSkuParam
.
getWarningStock
());
//
skuInfoVo.setWarningStock(addSkuParam.getWarningStock());
skuInfoVo
.
setSellPrice
(
addSkuParam
.
getSellPrice
());
//
skuInfoVo.setSellPrice(addSkuParam.getSellPrice());
skuInfoVo
.
setPrice
(
addSkuParam
.
getPrice
());
skuInfoVo
.
setPrice
(
addSkuParam
.
getPrice
());
skuInfoVo
.
setPriceMember
(
null
==
addSkuParam
.
getPriceMember
()
?
addSkuParam
.
getPrice
()
:
addSkuParam
.
getPriceMember
());
// skuInfoVo.setPriceMember(null == addSkuParam.getPriceMember() ? addSkuParam.getPrice() : addSkuParam.getPriceMember());
skuInfoVo
.
setWeight
(
addSkuParam
.
getWeight
());
skuInfoVo
.
setPriceMember
(
addSkuParam
.
getPrice
());
skuInfoVo
.
setBuyFactor
(
addSkuParam
.
getBuyFactor
());
// skuInfoVo.setWeight(addSkuParam.getWeight());
skuInfoVo
.
setBuyRoster
(
addSkuParam
.
getBuyRoster
());
// skuInfoVo.setBuyFactor(addSkuParam.getBuyFactor());
skuInfoVo
.
setBuyFactor
(
"0"
);
// skuInfoVo.setBuyRoster(addSkuParam.getBuyRoster());
skuInfoVo
.
setBuyLimit
(
addSkuParam
.
getBuyLimit
());
skuInfoVo
.
setBuyLimit
(
addSkuParam
.
getBuyLimit
());
skuInfoVo
.
setStoreId
(
goodsInfoVo
.
getStoreId
());
skuInfoVo
.
setStoreId
(
goodsInfoVo
.
getStoreId
());
// skuInfoVo.setSkuValidity(DateUtil.Formatter.yyyyMMddHHmmss.parse(addSkuParam.getSkuValidity()));
// skuInfoVo.setSkuValidity(DateUtil.Formatter.yyyyMMddHHmmss.parse(addSkuParam.getSkuValidity()));
...
@@ -307,26 +306,26 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
...
@@ -307,26 +306,26 @@ public class GoblinStoreMgtGoodsCouponAddParam implements Serializable {
// skuInfoVo.setUpdatedBy();
// skuInfoVo.setUpdatedBy();
// skuInfoVo.setUpdatedAt();
// skuInfoVo.setUpdatedAt();
skuInfoVo
.
setLogisticsTemplate
(
""
);
skuInfoVo
.
setLogisticsTemplate
(
""
);
skuInfoVo
.
setSkuErpCode
(
StringUtils
.
trim
(
addSkuParam
.
getSkuErpCode
()));
//
skuInfoVo.setSkuErpCode(StringUtils.trim(addSkuParam.getSkuErpCode()));
skuInfoVo
.
setErpType
(
goodsInfoVo
.
getErpType
());
skuInfoVo
.
setErpType
(
goodsInfoVo
.
getErpType
());
skuInfoVo
.
setErpWarehouseNo
(
StringUtils
.
trim
(
addSkuParam
.
getErpWarehouseNo
()));
//
skuInfoVo.setErpWarehouseNo(StringUtils.trim(addSkuParam.getErpWarehouseNo()));
if
(
StringUtils
.
equals
(
addSkuParam
.
getErpHosting
(),
"1"
))
{
//
if (StringUtils.equals(addSkuParam.getErpHosting(), "1")) {
skuInfoVo
.
setErpHosting
(
1
);
//
skuInfoVo.setErpHosting(1);
if
(
StringUtils
.
isBlank
(
goodsInfoVo
.
getSpuErpCode
()))
{
//
if (StringUtils.isBlank(goodsInfoVo.getSpuErpCode())) {
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"149022"
);
//
ErrorMapping.ErrorMessage errorMessage = ErrorMapping.get("149022");
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
//
throw new LiquidnetServiceException(errorMessage.getCode(), errorMessage.getMessage());
}
//
}
if
(
StringUtils
.
isBlank
(
skuInfoVo
.
getSkuErpCode
()))
{
//
if (StringUtils.isBlank(skuInfoVo.getSkuErpCode())) {
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"149023"
);
//
ErrorMapping.ErrorMessage errorMessage = ErrorMapping.get("149023");
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
//
throw new LiquidnetServiceException(errorMessage.getCode(), errorMessage.getMessage());
}
//
}
if
(
StringUtils
.
isBlank
(
skuInfoVo
.
getErpWarehouseNo
()))
{
//
if (StringUtils.isBlank(skuInfoVo.getErpWarehouseNo())) {
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"149024"
);
//
ErrorMapping.ErrorMessage errorMessage = ErrorMapping.get("149024");
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
//
throw new LiquidnetServiceException(errorMessage.getCode(), errorMessage.getMessage());
}
//
}
}
else
{
//
} else {
skuInfoVo
.
setErpHosting
(
0
);
skuInfoVo
.
setErpHosting
(
0
);
}
//
}
{
// 规格信息处理
{
// 规格信息处理
// 券类商品固定规格
// 券类商品固定规格
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtGoodsCouponAddSkuParam.java
View file @
d9d8b739
...
@@ -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
;
/**
/**
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtGoodsController.java
View file @
d9d8b739
...
@@ -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
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment