记得上下班打卡 | 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
f3a924dc
Commit
f3a924dc
authored
Feb 04, 2024
by
zz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/20240123_COUPON_SPU' into 阶梯退票_羊毛券_合并分支
parents
5e48d024
54d787d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+10
-10
No files found.
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/GoblinOrderServiceImpl.java
View file @
f3a924dc
...
@@ -165,6 +165,16 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -165,6 +165,16 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
int
limitCount
=
skuVo
.
getBuyLimit
()
==
0
?
Integer
.
MAX_VALUE
:
skuVo
.
getBuyLimit
();
int
limitCount
=
skuVo
.
getBuyLimit
()
==
0
?
Integer
.
MAX_VALUE
:
skuVo
.
getBuyLimit
();
//判断限购
//判断限购
if
(
orderUtils
.
noZhengzaiOrder
(
uid
))
{
if
(
orderUtils
.
noZhengzaiOrder
(
uid
))
{
String
res1
=
orderUtils
.
judgeOrderLimit
(
uid
,
skuParam
.
getSkuId
(),
skuParam
.
getNumber
(),
limitCount
);
if
(!
res1
.
equals
(
""
))
{
throw
new
Exception
(
"已超出限购数量"
);
}
//权限限购
Boolean
res2
=
orderUtils
.
judgeOrderRose
(
isMember
,
skuParam
.
getSkuId
(),
StringUtils
.
defaultString
(((
String
)
CurrentUtil
.
getTokenClaims
().
get
(
"mobile"
)),
""
),
Integer
.
parseInt
(
skuVo
.
getBuyFactor
()));
if
(!
res2
)
{
throw
new
Exception
(
"无权购买"
);
}
if
(
Objects
.
equals
(
skuVo
.
getSkuType
(),
2
))
{
// 券类商品
if
(
Objects
.
equals
(
skuVo
.
getSkuType
(),
2
))
{
// 券类商品
if
(
skuParam
.
getNumber
()
>
1
)
{
// 券类商品单次下单限购1
if
(
skuParam
.
getNumber
()
>
1
)
{
// 券类商品单次下单限购1
throw
new
LiquidnetServiceException
(
"-1"
,
String
.
format
(
"代金券商品单次下单限购%d张"
,
1
));
throw
new
LiquidnetServiceException
(
"-1"
,
String
.
format
(
"代金券商品单次下单限购%d张"
,
1
));
...
@@ -178,16 +188,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -178,16 +188,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
}
}
}
}
}
String
res1
=
orderUtils
.
judgeOrderLimit
(
uid
,
skuParam
.
getSkuId
(),
skuParam
.
getNumber
(),
limitCount
);
if
(!
res1
.
equals
(
""
))
{
throw
new
Exception
(
"已超出限购数量"
);
}
//权限限购
Boolean
res2
=
orderUtils
.
judgeOrderRose
(
isMember
,
skuParam
.
getSkuId
(),
StringUtils
.
defaultString
(((
String
)
CurrentUtil
.
getTokenClaims
().
get
(
"mobile"
)),
""
),
Integer
.
parseInt
(
skuVo
.
getBuyFactor
()));
if
(!
res2
)
{
throw
new
Exception
(
"无权购买"
);
}
}
}
//库存回滚
//库存回滚
if
(
surplusGeneral
<
0
)
{
if
(
surplusGeneral
<
0
)
{
...
...
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