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

Commit 3c7089e8 authored by 胡佳晨's avatar 胡佳晨

修改 删除接口

parent dd90674c
...@@ -130,9 +130,13 @@ public class GoblinListServiceImpl implements IGoblinListService { ...@@ -130,9 +130,13 @@ public class GoblinListServiceImpl implements IGoblinListService {
} }
collectVos = redisUtils.getGoblinListCollect(skuId); collectVos = redisUtils.getGoblinListCollect(skuId);
for (GoblinListCollectVo collectItem : collectVos) { for (GoblinListCollectVo collectItem : collectVos) {
if ((st.isAfter(collectItem.getTimeStart().minusSeconds(1)) && st.isBefore(collectItem.getTimeEnd().minusSeconds(1))) || if (collectItem.getTimeEnd() != null) {
(et.isAfter(collectItem.getTimeStart().minusSeconds(1)) && et.isBefore(collectItem.getTimeEnd().minusSeconds(1)))) { if ((st.isAfter(collectItem.getTimeStart().minusSeconds(1)) && st.isBefore(collectItem.getTimeEnd().minusSeconds(1))) ||
return ResponseDto.failure("sku时间不能重合"); (et.isAfter(collectItem.getTimeStart().minusSeconds(1)) && et.isBefore(collectItem.getTimeEnd().minusSeconds(1)))) {
return ResponseDto.failure("sku时间不能重合");
}
} else {
} }
} }
} else {//未结束时间 } else {//未结束时间
...@@ -141,8 +145,12 @@ public class GoblinListServiceImpl implements IGoblinListService { ...@@ -141,8 +145,12 @@ public class GoblinListServiceImpl implements IGoblinListService {
} }
collectVos = redisUtils.getGoblinListCollect(skuId); collectVos = redisUtils.getGoblinListCollect(skuId);
for (GoblinListCollectVo collectItem : collectVos) { for (GoblinListCollectVo collectItem : collectVos) {
if (st.isAfter(collectItem.getTimeStart().minusSeconds(1)) && st.isBefore(collectItem.getTimeEnd().minusSeconds(1))) { if (collectItem.getTimeEnd() != null) {
return ResponseDto.failure("sku时间不能重合"); if (st.isAfter(collectItem.getTimeStart().minusSeconds(1)) && st.isBefore(collectItem.getTimeEnd().minusSeconds(1))) {
return ResponseDto.failure("sku时间不能重合");
}
}else{
} }
} }
} }
...@@ -271,6 +279,7 @@ public class GoblinListServiceImpl implements IGoblinListService { ...@@ -271,6 +279,7 @@ public class GoblinListServiceImpl implements IGoblinListService {
// 黑名单 // 黑名单
queueUtils.sendMsgByRedisXls(vo.getListId(), "", vo.getBlackUrl(), "4", item.getSkuId()); queueUtils.sendMsgByRedisXls(vo.getListId(), "", vo.getBlackUrl(), "4", item.getSkuId());
} }
redisUtils.delGoblinListCollect(vo.getItemVo().get(0).getSkuId(), listId);
redisUtils.delGoblinListDetailsVo(listId); redisUtils.delGoblinListDetailsVo(listId);
mongoUtils.removeGoblinListDetailsVo(listId); mongoUtils.removeGoblinListDetailsVo(listId);
//sql入库 //sql入库
......
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