记得上下班打卡 | 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
f5cd1eb9
Commit
f5cd1eb9
authored
Mar 08, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消 向待支付redis添加消息
增加 待支付发送队列
parent
51252913
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
47 deletions
+2
-47
GoblinOrderServiceImpl.java
...et/service/order/service/impl/GoblinOrderServiceImpl.java
+2
-5
GoblinRedisUtils.java
...a/com/liquidnet/service/order/utils/GoblinRedisUtils.java
+0
-42
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 @
f5cd1eb9
...
@@ -545,10 +545,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -545,10 +545,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
log
.
info
(
"复制vo:"
+
(
System
.
currentTimeMillis
()
-
time2
)
+
"ms"
);
log
.
info
(
"复制vo:"
+
(
System
.
currentTimeMillis
()
-
time2
)
+
"ms"
);
time2
=
System
.
currentTimeMillis
();
time2
=
System
.
currentTimeMillis
();
//
redis 添加未支付列表
//
待支付发送队列
int
randomKey
=
redisUtils
.
addUnPayOrder
(
orderVo
.
getOrderId
());
queueUtils
.
sendMsgByRedisGoblinStock
(
orderVo
.
getMasterOrderCode
(),
storeOrder
.
getCreatedAt
());
//redis 赋值
//redis 赋值
orderVo
.
setRandomKey
(
randomKey
);
orderVo
.
setOrderAttrVo
(
orderAttrVo
);
orderVo
.
setOrderAttrVo
(
orderAttrVo
);
orderVo
.
setOrderSkuVoIds
(
goblinOrderSkuIdList
);
orderVo
.
setOrderSkuVoIds
(
goblinOrderSkuIdList
);
orderVo
.
setCreatedAt
(
getNowTime
());
orderVo
.
setCreatedAt
(
getNowTime
());
...
@@ -802,8 +801,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
...
@@ -802,8 +801,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
orderVo
.
setOrderSkuVoIds
(
skuList
);
orderVo
.
setOrderSkuVoIds
(
skuList
);
redisUtils
.
setGoblinOrder
(
orderId
,
orderVo
);
redisUtils
.
setGoblinOrder
(
orderId
,
orderVo
);
redisUtils
.
setOffCode
(
orderVo
.
getWriteOffCode
(),
orderVo
.
getMasterOrderCode
());
redisUtils
.
setOffCode
(
orderVo
.
getWriteOffCode
(),
orderVo
.
getMasterOrderCode
());
//删除未支付订单
redisUtils
.
removeGoblinOrder
(
orderVo
.
getRandomKey
()
+
""
,
orderId
);
//mongo
//mongo
mongoUtils
.
updateGoblinStoreOrderVo
(
orderId
,
orderVo
);
mongoUtils
.
updateGoblinStoreOrderVo
(
orderId
,
orderVo
);
//mysql
//mysql
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinRedisUtils.java
View file @
f5cd1eb9
...
@@ -234,48 +234,6 @@ public class GoblinRedisUtils {
...
@@ -234,48 +234,6 @@ public class GoblinRedisUtils {
}
}
}
}
// 获取 未支付订单id列表
public
List
<
String
>
getUnPayOrder
(
String
randomKey
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_ORDER_UN_PAY
.
concat
(
randomKey
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
CollectionUtil
.
arrayListString
();
}
else
{
return
(
List
<
String
>)
obj
;
}
}
// 添加 未支付订单id列表 返回 radomKey
public
int
addUnPayOrder
(
String
orderId
)
{
int
randomKey
=
RandomUtil
.
getRandomInt
(
0
,
randomMax
);
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_ORDER_UN_PAY
.
concat
(
randomKey
+
""
);
List
<
String
>
list
=
getUnPayOrder
(
randomKey
+
""
);
list
.
add
(
orderId
);
redisUtil
.
set
(
redisKey
,
list
);
return
randomKey
;
}
// 删除 未支付订单id列表
public
void
removeGoblinOrder
(
String
randomKey
,
String
orderId
)
{
if
(
randomKey
==
null
)
{
for
(
int
i
=
0
;
i
<
randomMax
;
i
++)
{
randomKey
=
i
+
""
;
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_ORDER_UN_PAY
.
concat
(
randomKey
);
List
<
String
>
list
=
getUnPayOrder
(
randomKey
);
if
(
list
.
contains
(
orderId
))
{
list
.
remove
(
orderId
);
redisUtil
.
set
(
redisKey
,
list
);
break
;
}
}
}
else
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_ORDER_UN_PAY
.
concat
(
randomKey
+
""
);
List
<
String
>
list
=
getUnPayOrder
(
randomKey
);
list
.
remove
(
orderId
);
redisUtil
.
set
(
redisKey
,
list
);
}
}
// 获取 订单id列表
// 获取 订单id列表
public
List
<
String
>
getOrderList
(
String
uid
)
{
public
List
<
String
>
getOrderList
(
String
uid
)
{
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_ORDER_LIST
.
concat
(
uid
);
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_ORDER_LIST
.
concat
(
uid
);
...
...
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