记得上下班打卡 | 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
75268e8f
Commit
75268e8f
authored
Apr 11, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~api:藏品管理:添加藏品:盲盒+限购数量及购买条件;
parent
02bafd2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
GoblinStoreMgtDigitalGoodsAddSkuParam.java
...lin/dto/manage/GoblinStoreMgtDigitalGoodsAddSkuParam.java
+6
-2
GoblinStoreMgtGoodsController.java
...blin/controller/manage/GoblinStoreMgtGoodsController.java
+7
-1
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtDigitalGoodsAddSkuParam.java
View file @
75268e8f
...
...
@@ -77,9 +77,11 @@ public class GoblinStoreMgtDigitalGoodsAddSkuParam implements Serializable {
// private BigDecimal priceMember;
@ApiModelProperty
(
position
=
25
,
required
=
false
,
value
=
"限购[0-无限制|X:限购数量],`unbox=0`时必传"
,
example
=
"1"
)
// @NotNull(message = "限购数量不能为空")// TODO: 2022/4/11 ==zhanggb.open
@Min
(
value
=
1
,
message
=
"限购数量必须大于0"
)
private
Integer
buyLimit
;
@ApiModelProperty
(
position
=
26
,
required
=
false
,
value
=
"购买限制[0-全部用户|1-仅会员],`unbox=0`时必传"
,
example
=
"0"
)
// @NotBlank(message = "购买条件不能为空")// TODO: 2022/4/11 ==zhanggb.open
@Pattern
(
regexp
=
"\\b(0|1)\\b"
,
message
=
"购买条件参数无效"
)
private
String
buyFactor
;
@ApiModelProperty
(
position
=
27
,
required
=
false
,
value
=
"是否隐藏[0-默认展示|1-隐藏],`unbox=0`时必传"
,
example
=
"0"
)
...
...
@@ -181,7 +183,8 @@ public class GoblinStoreMgtDigitalGoodsAddSkuParam implements Serializable {
}
else
{
initVo
.
setStock
(
0
);
initVo
.
setSkuStock
(
0
);
initVo
.
setBuyFactor
(
"0"
);
initVo
.
setBuyLimit
(
this
.
getBuyLimit
());
//
initVo
.
setBuyFactor
(
this
.
getBuyFactor
());
//
initVo
.
setSkuAppear
(
"0"
);
initVo
.
setSkuCanbuy
(
"1"
);
initVo
.
setOpeningTime
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
parse
(
this
.
getOpeningTime
()));
//1
...
...
@@ -209,7 +212,8 @@ public class GoblinStoreMgtDigitalGoodsAddSkuParam implements Serializable {
updateVo
.
setSkuCanbuy
(
this
.
getSkuCanbuy
());
//0
break
;
case
"1"
:
updateVo
.
setBuyFactor
(
"0"
);
//
updateVo
.
setBuyLimit
(
this
.
getBuyLimit
());
//
updateVo
.
setBuyFactor
(
this
.
getBuyFactor
());
//
updateVo
.
setSkuAppear
(
"0"
);
//
updateVo
.
setSkuCanbuy
(
"1"
);
//
updateVo
.
setName
(
this
.
getName
());
//1
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtGoodsController.java
View file @
75268e8f
...
...
@@ -1037,7 +1037,7 @@ public class GoblinStoreMgtGoodsController {
if
(
goodsInfoVo
.
getSpuType
()
==
0
)
{
return
ResponseDto
.
failure
(
ErrorCode
.
HTTP_PARAM_ERROR
.
getCode
(),
"无效操作,该商品非数字藏品"
);
}
if
(
StringUtils
.
isBlank
(
mgtDigitalGoodsAddSkuParam
.
getProductId
()))
{
// TODO: 2022/4/8 ==zhanggb
if
(
StringUtils
.
isBlank
(
mgtDigitalGoodsAddSkuParam
.
getProductId
()))
{
// TODO: 2022/4/8 ==zhanggb
.del
mgtDigitalGoodsAddSkuParam
.
setProductId
(
"NGoods1"
);
}
JsonNode
priceVNode
=
goblinRedisUtils
.
getIosProducts
().
get
(
mgtDigitalGoodsAddSkuParam
.
getProductId
());
...
...
@@ -1069,6 +1069,12 @@ public class GoblinStoreMgtGoodsController {
// }
// }
}
else
{
// 盲盒校验
if
(
null
==
mgtDigitalGoodsAddSkuParam
.
getBuyLimit
())
{
// TODO: 2022/4/11 ==zhanggb.del
mgtDigitalGoodsAddSkuParam
.
setBuyLimit
(
1
);
}
if
(
StringUtils
.
isEmpty
(
mgtDigitalGoodsAddSkuParam
.
getBuyFactor
()))
{
// TODO: 2022/4/11 ==zhanggb.del
mgtDigitalGoodsAddSkuParam
.
setBuyFactor
(
"0"
);
}
if
(
StringUtils
.
isEmpty
(
mgtDigitalGoodsAddSkuParam
.
getOpeningTime
()))
{
return
ResponseDto
.
failure
(
ErrorCode
.
HTTP_PARAM_ERROR
.
getCode
(),
"盲盒开启时间不能为空"
);
}
...
...
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