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

Commit 3425e8ae authored by 胡佳晨's avatar 胡佳晨

1

parent 9182985a
......@@ -931,7 +931,7 @@ public class GoblinRedisUtils {
if (vo == null && type == 0) {//已开售逻辑
for (GoblinListCollectVo collectVoItem : collectVos) {
int lastStock = getSkuStock(collectVoItem.getListId(), skuId);
log.debug("stock = "+lastStock);
log.debug("all stock = "+lastStock);
int restStock = decrSkuStock(collectVoItem.getListId(), skuId, lastStock);
if (restStock < 0) {
incrSkuStock(collectVoItem.getListId(), skuId, lastStock);
......@@ -976,7 +976,7 @@ public class GoblinRedisUtils {
for (GoblinListCollectVo itemVo : collectVosList) {
//减少上个时间段sku库存
int lastStock = getSkuStock(itemVo.getListId(), skuId);
log.debug("stock = "+lastStock);
log.debug("temp stock = "+lastStock);
int restStock = decrSkuStock(itemVo.getListId(), skuId, lastStock);
if (restStock < 0) {
//库存超过销售量 操作失败回滚库存
......
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