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

Commit e8cdd4b3 authored by 胡佳晨's avatar 胡佳晨

修改 主动删除回滚库存到原始sku上

parent 93e1332f
...@@ -138,7 +138,7 @@ public class GoblinListServiceImpl implements IGoblinListService { ...@@ -138,7 +138,7 @@ public class GoblinListServiceImpl implements IGoblinListService {
return ResponseDto.failure("sku时间不能重合"); return ResponseDto.failure("sku时间不能重合");
} }
} else { } else {
if(st.isBefore(collectItem.getTimeStart().minusSeconds(1)) && et.isAfter(collectItem.getTimeStart().minusSeconds(1))){ if (st.isBefore(collectItem.getTimeStart().minusSeconds(1)) && et.isAfter(collectItem.getTimeStart().minusSeconds(1))) {
return ResponseDto.failure("sku时间不能重合");//开始结束时间不能包含只有开始时间的时间段 return ResponseDto.failure("sku时间不能重合");//开始结束时间不能包含只有开始时间的时间段
} }
} }
...@@ -283,6 +283,13 @@ public class GoblinListServiceImpl implements IGoblinListService { ...@@ -283,6 +283,13 @@ public class GoblinListServiceImpl implements IGoblinListService {
// 黑名单 // 黑名单
queueUtils.sendMsgByRedisXls(vo.getListId(), "", vo.getBlackUrl(), "4", item.getSkuId()); queueUtils.sendMsgByRedisXls(vo.getListId(), "", vo.getBlackUrl(), "4", item.getSkuId());
} }
//库存
int restStock = redisUtils.getSkuStock(vo.getListId(), vo.getItemVo().get(0).getSkuId());
if (restStock > 0) {
redisUtils.incrSkuStock(null, vo.getItemVo().get(0).getSkuId(), restStock);
}
redisUtils.delGoblinListCollect(vo.getItemVo().get(0).getSkuId(), listId); redisUtils.delGoblinListCollect(vo.getItemVo().get(0).getSkuId(), listId);
redisUtils.delGoblinListDetailsVo(listId); redisUtils.delGoblinListDetailsVo(listId);
mongoUtils.removeGoblinListDetailsVo(listId); mongoUtils.removeGoblinListDetailsVo(listId);
......
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