记得上下班打卡 | 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
54122969
Commit
54122969
authored
Jul 05, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 下单
parent
9054ce5d
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
107 additions
and
48 deletions
+107
-48
CollectionUtil.java
.../java/com/liquidnet/commons/lang/util/CollectionUtil.java
+4
-0
AbstractOrderCloseReceiver.java
...e/consumer/order/receiver/AbstractOrderCloseReceiver.java
+15
-3
GoblinMixAppServiceImpl.java
.../service/goblin/service/impl/GoblinMixAppServiceImpl.java
+6
-0
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+8
-2
MixOrderServiceImpl.java
...idnet/service/order/service/impl/MixOrderServiceImpl.java
+65
-41
GoblinNftOrderUtils.java
...om/liquidnet/service/order/utils/GoblinNftOrderUtils.java
+1
-0
GoblinRedisUtils.java
...a/com/liquidnet/service/order/utils/GoblinRedisUtils.java
+8
-2
No files found.
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/util/CollectionUtil.java
View file @
54122969
...
@@ -22,7 +22,11 @@ public class CollectionUtil {
...
@@ -22,7 +22,11 @@ public class CollectionUtil {
private
static
final
ArrayList
<
Object
>
OBJECT_ARRAY_LIST
=
new
ArrayList
<>();
private
static
final
ArrayList
<
Object
>
OBJECT_ARRAY_LIST
=
new
ArrayList
<>();
private
static
final
ArrayList
<
BigDecimal
>
BIG_DECIMALS_ARRAY_LIST
=
new
ArrayList
<>();
private
static
final
ArrayList
<
BigDecimal
>
BIG_DECIMALS_ARRAY_LIST
=
new
ArrayList
<>();
private
static
final
ArrayList
<
BigDecimal
>
BIGDECIMAL_ARRAY_LIST
=
new
ArrayList
<>();
private
static
final
ArrayList
<
BigDecimal
>
BIGDECIMAL_ARRAY_LIST
=
new
ArrayList
<>();
private
static
final
String
[]
STRING_ARRAY
=
new
String
[]{};
public
static
String
[]
stringArray
()
{
return
STRING_ARRAY
.
clone
();
}
public
static
HashMap
<
String
,
String
>
mapStringString
()
{
public
static
HashMap
<
String
,
String
>
mapStringString
()
{
return
(
HashMap
<
String
,
String
>)
STRING_STRING_HASH_MAP
.
clone
();
return
(
HashMap
<
String
,
String
>)
STRING_STRING_HASH_MAP
.
clone
();
}
}
...
...
liquidnet-bus-service/liquidnet-service-consumer-all/liquidnet-service-consumer-order/src/main/java/com/liquidnet/service/consumer/order/receiver/AbstractOrderCloseReceiver.java
View file @
54122969
...
@@ -200,7 +200,7 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -200,7 +200,7 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
String
listId
=
(
null
==
goblinListCollectVo
)
?
null
:
goblinListCollectVo
.
getListId
();
String
listId
=
(
null
==
goblinListCollectVo
)
?
null
:
goblinListCollectVo
.
getListId
();
log
.
debug
(
"listId : {}"
,
listId
);
log
.
debug
(
"listId : {}"
,
listId
);
String
mixId
=
nftOrder
.
getMixId
();
String
mixId
=
nftOrder
.
getMixId
();
if
(
mixId
!=
null
&&
!
mixId
.
equals
(
""
))
{
if
(
mixId
!=
null
&&
!
mixId
.
equals
(
""
))
{
listId
=
mixId
;
listId
=
mixId
;
log
.
debug
(
"mixId : {}"
,
listId
);
log
.
debug
(
"mixId : {}"
,
listId
);
}
}
...
@@ -241,6 +241,9 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -241,6 +241,9 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
String
[]
goblin
=
map
.
get
(
"goblin"
);
String
[]
goblin
=
map
.
get
(
"goblin"
);
for
(
String
orderId
:
goblin
)
{
for
(
String
orderId
:
goblin
)
{
if
(
""
.
equals
(
orderId
)){
break
;
}
GoblinStoreOrderVo
orderVo
=
getGoblinOrder
(
orderId
);
GoblinStoreOrderVo
orderVo
=
getGoblinOrder
(
orderId
);
if
(
orderVo
.
getStatus
().
equals
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_0
.
getValue
()))
{
//订单回滚
if
(
orderVo
.
getStatus
().
equals
(
GoblinStatusConst
.
Status
.
ORDER_STATUS_0
.
getValue
()))
{
//订单回滚
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
...
@@ -288,6 +291,9 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -288,6 +291,9 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
}
}
for
(
String
orderId
:
nft
)
{
for
(
String
orderId
:
nft
)
{
if
(
""
.
equals
(
orderId
)){
break
;
}
checkNftOrderTime
(
orderId
);
checkNftOrderTime
(
orderId
);
}
}
...
@@ -403,8 +409,14 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
...
@@ -403,8 +409,14 @@ public abstract class AbstractOrderCloseReceiver implements StreamListener<Strin
return
null
;
return
null
;
}
else
{
}
else
{
String
[]
a
=
((
String
)
obj
).
split
(
"&&"
);
String
[]
a
=
((
String
)
obj
).
split
(
"&&"
);
String
[]
nftA
=
a
[
0
].
split
(
","
);
String
[]
nftA
=
CollectionUtil
.
stringArray
();
String
[]
goblinA
=
a
[
1
].
split
(
","
);
String
[]
goblinA
=
CollectionUtil
.
stringArray
();
if
(
a
.
length
>
0
)
{
nftA
=
a
[
0
].
split
(
","
);
}
if
(
a
.
length
>
1
)
{
goblinA
=
a
[
1
].
split
(
","
);
}
HashMap
<
String
,
String
[]>
map
=
mixIdMap
();
HashMap
<
String
,
String
[]>
map
=
mixIdMap
();
map
.
put
(
"nft"
,
nftA
);
map
.
put
(
"nft"
,
nftA
);
map
.
put
(
"goblin"
,
goblinA
);
map
.
put
(
"goblin"
,
goblinA
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinMixAppServiceImpl.java
View file @
54122969
...
@@ -139,6 +139,9 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
...
@@ -139,6 +139,9 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
List
<
GoblinNftOrderDetailsVo
>
nftOrderListVos
=
ObjectUtil
.
goblinNftOrderDetailsVoArrayList
();
List
<
GoblinNftOrderDetailsVo
>
nftOrderListVos
=
ObjectUtil
.
goblinNftOrderDetailsVoArrayList
();
for
(
String
orderId
:
nft
)
{
for
(
String
orderId
:
nft
)
{
if
(
""
.
equals
(
orderId
)){
break
;
}
// 订单信息
// 订单信息
GoblinNftOrderVo
orderVo
=
redisUtils
.
getGoblinNftOrder
(
orderId
);
GoblinNftOrderVo
orderVo
=
redisUtils
.
getGoblinNftOrder
(
orderId
);
GoblinNftOrderDetailsVo
orderDetails
=
GoblinNftOrderDetailsVo
.
getNew
().
copy
(
orderVo
);
GoblinNftOrderDetailsVo
orderDetails
=
GoblinNftOrderDetailsVo
.
getNew
().
copy
(
orderVo
);
...
@@ -149,6 +152,9 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
...
@@ -149,6 +152,9 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
nftOrderListVos
.
add
(
orderDetails
);
nftOrderListVos
.
add
(
orderDetails
);
}
}
for
(
String
orderId
:
goblin
)
{
for
(
String
orderId
:
goblin
)
{
if
(
""
.
equals
(
orderId
)){
break
;
}
GoblinStoreOrderVo
orderVo
=
redisUtils
.
getGoblinOrder
(
orderId
);
GoblinStoreOrderVo
orderVo
=
redisUtils
.
getGoblinOrder
(
orderId
);
GoblinAppOrderListVo
vos
=
GoblinAppOrderListVo
.
getNew
();
GoblinAppOrderListVo
vos
=
GoblinAppOrderListVo
.
getNew
();
BeanUtils
.
copyProperties
(
orderVo
,
vos
);
BeanUtils
.
copyProperties
(
orderVo
,
vos
);
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
54122969
...
@@ -1614,8 +1614,14 @@ public class GoblinRedisUtils {
...
@@ -1614,8 +1614,14 @@ public class GoblinRedisUtils {
return
null
;
return
null
;
}
else
{
}
else
{
String
[]
a
=
((
String
)
obj
).
split
(
"&&"
);
String
[]
a
=
((
String
)
obj
).
split
(
"&&"
);
String
[]
nftA
=
a
[
0
].
split
(
","
);
String
[]
nftA
=
CollectionUtil
.
stringArray
();
String
[]
goblinA
=
a
[
1
].
split
(
","
);
String
[]
goblinA
=
CollectionUtil
.
stringArray
();
if
(
a
.
length
>
0
)
{
nftA
=
a
[
0
].
split
(
","
);
}
if
(
a
.
length
>
1
)
{
goblinA
=
a
[
1
].
split
(
","
);
}
HashMap
<
String
,
String
[]>
map
=
ObjectUtil
.
mixIdMap
();
HashMap
<
String
,
String
[]>
map
=
ObjectUtil
.
mixIdMap
();
map
.
put
(
"nft"
,
nftA
);
map
.
put
(
"nft"
,
nftA
);
map
.
put
(
"goblin"
,
goblinA
);
map
.
put
(
"goblin"
,
goblinA
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/MixOrderServiceImpl.java
View file @
54122969
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinNftOrderUtils.java
View file @
54122969
...
@@ -554,6 +554,7 @@ public class GoblinNftOrderUtils {
...
@@ -554,6 +554,7 @@ public class GoblinNftOrderUtils {
// String endListId = newListIds.get(index);
// String endListId = newListIds.get(index);
// 判断库存
// 判断库存
int
surplusGeneral
=
goblinRedisUtils
.
decrSkuStock
(
listId
,
goodsSkuInfoVo
.
getSkuId
(),
number
);
int
surplusGeneral
=
goblinRedisUtils
.
decrSkuStock
(
listId
,
goodsSkuInfoVo
.
getSkuId
(),
number
);
log
.
error
(
"剩余 skuId = "
+
surplusGeneral
);
if
(
surplusGeneral
<
0
)
{
if
(
surplusGeneral
<
0
)
{
goblinRedisUtils
.
incrSkuStock
(
listId
,
goodsSkuInfoVo
.
getSkuId
(),
number
);
goblinRedisUtils
.
incrSkuStock
(
listId
,
goodsSkuInfoVo
.
getSkuId
(),
number
);
return
lotteryDraw
(
skuIdList
,
number
,
nowTime
,
listId
);
return
lotteryDraw
(
skuIdList
,
number
,
nowTime
,
listId
);
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinRedisUtils.java
View file @
54122969
...
@@ -468,8 +468,14 @@ public class GoblinRedisUtils {
...
@@ -468,8 +468,14 @@ public class GoblinRedisUtils {
return
null
;
return
null
;
}
else
{
}
else
{
String
[]
a
=
((
String
)
obj
).
split
(
"&&"
);
String
[]
a
=
((
String
)
obj
).
split
(
"&&"
);
String
[]
nftA
=
a
[
0
].
split
(
","
);
String
[]
nftA
=
CollectionUtil
.
stringArray
();
String
[]
goblinA
=
a
[
1
].
split
(
","
);
String
[]
goblinA
=
CollectionUtil
.
stringArray
();
if
(
a
.
length
>
0
)
{
nftA
=
a
[
0
].
split
(
","
);
}
if
(
a
.
length
>
1
)
{
goblinA
=
a
[
1
].
split
(
","
);
}
HashMap
<
String
,
String
[]>
map
=
ObjectUtil
.
mixIdMap
();
HashMap
<
String
,
String
[]>
map
=
ObjectUtil
.
mixIdMap
();
map
.
put
(
"nft"
,
nftA
);
map
.
put
(
"nft"
,
nftA
);
map
.
put
(
"goblin"
,
goblinA
);
map
.
put
(
"goblin"
,
goblinA
);
...
...
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