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

Commit 94bf5d7f authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin

parents 715c622d 373a1585
......@@ -119,8 +119,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
// 判断库存
String pre = GoblinStatusConst.MarketPreStatus.getPre(skuId);
int limitCount = skuVo.getBuyLimit() == 0 ? Integer.MAX_VALUE : skuVo.getBuyLimit();
int surplusGeneral = redisUtils.decrSkuStock(pre, skuId, number);
skuAndPreListAndNumber.add(skuId + "," + pre + "," + number);
//判断限购
if (noZhengzaiOrder(uid)) {
String res1 = orderUtils.judgeOrderLimit(uid, skuId, number, limitCount);
......@@ -128,6 +126,8 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
throw new Exception("已超出限购数量");
}
}
int surplusGeneral = redisUtils.decrSkuStock(pre, skuId, number);
skuAndPreListAndNumber.add(skuId + "," + pre + "," + number);
//库存回滚
if (surplusGeneral < 0) {
throw new Exception("已售罄");
......@@ -306,14 +306,14 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
GoblinOrderAttr orderAttr = GoblinOrderAttr.getNew();
orderAttr.setOrderAttrId(IDGenerator.nextTimeId2());
orderAttr.setOrderId(orderId);
if (!writeOffCode.equals("EMPTY")) {
orderAttr.setExpressContacts(addressesVo.getName());
orderAttr.setExpressAddress(addressesVo.getProvince() + "," + addressesVo.getCounty() + "," + addressesVo.getCity());
orderAttr.setExpressAddressDetail(addressesVo.getAddress());
orderAttr.setExpressPhone(addressesVo.getPhone());
orderAttr.setExpressType(1);
orderAttr.setCreatedAt(now);
}
// if (!writeOffCode.equals("EMPTY")) {
// orderAttr.setExpressContacts(addressesVo.getName());
// orderAttr.setExpressAddress(addressesVo.getProvince() + "," + addressesVo.getCounty() + "," + addressesVo.getCity());
// orderAttr.setExpressAddressDetail(addressesVo.getAddress());
// orderAttr.setExpressPhone(addressesVo.getPhone());
// orderAttr.setExpressType(1);
// orderAttr.setCreatedAt(now);
// }
//返回值
GoblinOrderPreParam preParam = GoblinOrderPreParam.getNew();
preParam.setPriceActual(storeOrder.getPriceActual());
......
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