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

Commit 9d2e8df8 authored by zhangguobing's avatar zhangguobing

~api:券商品业务-券类商品券限购调整;

parent 54d787d8
......@@ -95,6 +95,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
preParam.setSkuName("");
preParam.setOrderIdList("");
HashMap<String, Integer> couponSkuIdNoBuyLimitMap = CollectionUtil.mapStringInteger();// 记录券类商品关联人限购KEY:NUM
boolean rollbackStock = false;
try {
List<GoblinOrderStoreParam> goblinOrderStoreParamList = param.getGoblinOrderStoreParamList();//分订单
boolean isMember;
......@@ -166,6 +167,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
//判断限购
if (orderUtils.noZhengzaiOrder(uid)) {
String res1 = orderUtils.judgeOrderLimit(uid, skuParam.getSkuId(), skuParam.getNumber(), limitCount);
rollbackStock = true;
if (!res1.equals("")) {
throw new Exception("已超出限购数量");
}
......@@ -231,7 +233,9 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
int number = Integer.parseInt(array[2]);
redisUtils.incrSkuStock(pre, skuId, number);
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