记得上下班打卡 | 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
b133e874
Commit
b133e874
authored
Jul 08, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 限购未回滚的bug
parent
590355c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
AbstractOrderCloseReceiver.java
...e/consumer/order/receiver/AbstractOrderCloseReceiver.java
+12
-4
No files found.
liquidnet-bus-service/liquidnet-service-consumer-all/liquidnet-service-consumer-order/src/main/java/com/liquidnet/service/consumer/order/receiver/AbstractOrderCloseReceiver.java
View file @
b133e874
...
@@ -237,7 +237,8 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -237,7 +237,8 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
HashMap
<
String
,
String
[]>
map
=
getMixMasterCode
(
orderCode
);
HashMap
<
String
,
String
[]>
map
=
getMixMasterCode
(
orderCode
);
String
[]
nft
=
map
.
get
(
"nft"
);
String
[]
nft
=
map
.
get
(
"nft"
);
String
[]
goblin
=
map
.
get
(
"goblin"
);
String
[]
goblin
=
map
.
get
(
"goblin"
);
String
mixId
=
""
;
String
uid
=
""
;
for
(
String
orderId
:
goblin
)
{
for
(
String
orderId
:
goblin
)
{
if
(
""
.
equals
(
orderId
))
{
if
(
""
.
equals
(
orderId
))
{
break
;
break
;
...
@@ -257,8 +258,10 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -257,8 +258,10 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
setGoblinOrderSku
(
skuVo
.
getOrderSkuId
(),
skuVo
);
setGoblinOrderSku
(
skuVo
.
getOrderSkuId
(),
skuVo
);
//库存&限购&&待支付订单
//库存&限购&&待支付订单
int
count
=
incrSkuStock
(
orderVo
.
getMixId
(),
skuVo
.
getSkuId
(),
skuVo
.
getNum
());
int
count
=
incrSkuStock
(
orderVo
.
getMixId
(),
skuVo
.
getSkuId
(),
skuVo
.
getNum
());
int
limit
=
decrMixLimit
(
orderVo
.
getMixId
(),
orderVo
.
getUserId
());
if
(
""
.
equals
(
mixId
)
&&
""
.
equals
(
uid
))
{
log
.
debug
(
"count {} limit {}"
,
count
,
limit
);
mixId
=
orderVo
.
getMixId
();
uid
=
orderVo
.
getUserId
();
}
//mysql
//mysql
sqlDataSku
.
add
(
new
Object
[]{
sqlDataSku
.
add
(
new
Object
[]{
skuVo
.
getStatus
(),
now
,
skuVo
.
getOrderSkuId
(),
now
,
now
skuVo
.
getStatus
(),
now
,
skuVo
.
getOrderSkuId
(),
now
,
now
...
@@ -293,9 +296,14 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -293,9 +296,14 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
if
(
""
.
equals
(
orderId
))
{
if
(
""
.
equals
(
orderId
))
{
break
;
break
;
}
}
if
(
""
.
equals
(
mixId
)
&&
""
.
equals
(
uid
))
{
GoblinNftOrderVo
nftOrder
=
goblinNftUtils
.
getNftOrder
(
orderId
);
mixId
=
nftOrder
.
getMixId
();
uid
=
nftOrder
.
getUserId
();
}
checkNftOrderTime
(
orderId
);
checkNftOrderTime
(
orderId
);
}
}
int
limit
=
decrMixLimit
(
mixId
,
uid
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"MIX库存回滚异常valueData={}"
,
orderCode
,
e
);
log
.
error
(
"MIX库存回滚异常valueData={}"
,
orderCode
,
e
);
...
...
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