记得上下班打卡 | git大法好,push需谨慎

Commit 3b851df3 authored by 胡佳晨's avatar 胡佳晨

库存回滚逻辑修改

parent 2c0acaee
......@@ -502,7 +502,7 @@ public class GoblinNftOrderServiceImpl implements IGoblinNftOrderService {
orderVo.setCreatedAt(nftOrder.getCreatedAt());
// 待支付发送队列
queueUtils.sendMsgByRedisGoblinStock(orderVo.getOrderId(), nftOrder.getCreatedAt(), "NFT");
queueUtils.sendMsgByRedisGoblinStock(orderVo.getOrderId(), nftOrder.getCreatedAt(), "NFT",5);
// redis 订单详情
nftOrderUtils.setNftOrder(orderVo);
......
......@@ -584,7 +584,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
GoblinOrderAttrVo orderAttrVo = GoblinOrderAttrVo.getNew().copy(orderAttr);
//待支付发送队列
queueUtils.sendMsgByRedisGoblinStock(orderVo.getMasterOrderCode(), storeOrder.getCreatedAt(), "GOBLIN");
queueUtils.sendMsgByRedisGoblinStock(orderVo.getMasterOrderCode(), storeOrder.getCreatedAt(), "GOBLIN",5);
//redis 赋值
orderVo.setOrderAttrVo(orderAttrVo);
orderVo.setOrderSkuVoIds(goblinOrderSkuIdList);
......
......@@ -692,7 +692,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
sqlsDataA.add(orderTickets.getAddObject(CurrentUtil.getCliIpAddr(), vo.getArea(), vo.getProvince(), vo.getCity(), vo.getCounty()));
// 待支付发送队列
queueUtils.sendMsgByRedisGoblinStock(orderTickets.getOrderTicketsId(), orderTickets.getCreatedAt(), "TICKET");
queueUtils.sendMsgByRedisGoblinStock(orderTickets.getOrderTicketsId(), orderTickets.getCreatedAt(), "TICKET",performanceData.getPayCountdownMinute());
// 生成vo
KylinOrderTicketVo orderTicketVo = KylinOrderTicketVo.getNew();
orderTicketVo.setOrderTicket(orderTickets);
......
......@@ -51,7 +51,7 @@ public class QueueUtils {
* @param createTime 订单创建时间
* @param masterOrderCode Goblin主订单号
*/
public void sendMsgByRedisGoblinStock(String masterOrderCode, LocalDateTime createTime, String type) {
public void sendMsgByRedisGoblinStock(String masterOrderCode, LocalDateTime createTime, String type, int getPayCountdownMinute) {
String streamKey;
int key = createTime.getMinute() % 10;
switch (key) {
......@@ -89,7 +89,7 @@ public class QueueUtils {
HashMap<String, String> map = ObjectUtil.cloneHashMapStringAndString();
map.put("id", masterOrderCode);
map.put("type", type);
map.put("time", createTime.toString());
map.put("time", createTime.plusMinutes(getPayCountdownMinute-5).toString());
stringRedisTemplate.opsForStream().add(StreamRecords.mapBacked(map).withStreamKey(streamKey));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment