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

Commit 21fd0db7 authored by zz's avatar zz

Merge remote-tracking branch 'origin/20240123_COUPON_SPU' into 阶梯退票_羊毛券_合并分支

parents f3a924dc 367fcd21
...@@ -95,6 +95,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -95,6 +95,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
preParam.setSkuName(""); preParam.setSkuName("");
preParam.setOrderIdList(""); preParam.setOrderIdList("");
HashMap<String, Integer> couponSkuIdNoBuyLimitMap = CollectionUtil.mapStringInteger();// 记录券类商品关联人限购KEY:NUM HashMap<String, Integer> couponSkuIdNoBuyLimitMap = CollectionUtil.mapStringInteger();// 记录券类商品关联人限购KEY:NUM
boolean rollbackStock = false;
try { try {
List<GoblinOrderStoreParam> goblinOrderStoreParamList = param.getGoblinOrderStoreParamList();//分订单 List<GoblinOrderStoreParam> goblinOrderStoreParamList = param.getGoblinOrderStoreParamList();//分订单
boolean isMember; boolean isMember;
...@@ -166,6 +167,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -166,6 +167,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
//判断限购 //判断限购
if (orderUtils.noZhengzaiOrder(uid)) { if (orderUtils.noZhengzaiOrder(uid)) {
String res1 = orderUtils.judgeOrderLimit(uid, skuParam.getSkuId(), skuParam.getNumber(), limitCount); String res1 = orderUtils.judgeOrderLimit(uid, skuParam.getSkuId(), skuParam.getNumber(), limitCount);
rollbackStock = true;
if (!res1.equals("")) { if (!res1.equals("")) {
throw new Exception("已超出限购数量"); throw new Exception("已超出限购数量");
} }
...@@ -221,7 +223,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -221,7 +223,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
log.info(UserPathDto.setData("下单(唤起支付)", param, data)); log.info(UserPathDto.setData("下单(唤起支付)", param, data));
return data; return data;
} catch (Exception e) { } catch (Exception e) {
log.error("Kylin Order Pay Error = {}", e); log.error("Goblin Order Pay Error = {}", e);
Long time3 = System.currentTimeMillis(); Long time3 = System.currentTimeMillis();
//回顾限购 回滚库存 //回顾限购 回滚库存
for (String item : skuAndPreListAndNumber) { for (String item : skuAndPreListAndNumber) {
...@@ -231,7 +233,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -231,7 +233,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
int number = Integer.parseInt(array[2]); int number = Integer.parseInt(array[2]);
redisUtils.incrSkuStock(pre, skuId, number); redisUtils.incrSkuStock(pre, skuId, number);
if (orderUtils.noZhengzaiOrder(uid)) { if (orderUtils.noZhengzaiOrder(uid)) {
redisUtils.decrSkuCountByUid(uid, skuId, number); if (rollbackStock) {
redisUtils.decrSkuCountByUid(uid, skuId, number);
}
} }
} }
//回退平台券 //回退平台券
......
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