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

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

修改 添加接口 的 sku时间重合判断

parent a2986147
......@@ -134,12 +134,12 @@ public class GoblinListServiceImpl implements IGoblinListService {
if ((st.isAfter(collectItem.getTimeStart().minusSeconds(1)) && st.isBefore(collectItem.getTimeEnd().minusSeconds(1))) ||
(et.isAfter(collectItem.getTimeStart().minusSeconds(1)) && et.isBefore(collectItem.getTimeEnd().minusSeconds(1))) ||
(st.isBefore(collectItem.getTimeStart().minusSeconds(1)) && et.isAfter(collectItem.getTimeEnd().minusSeconds(1)))
) {
) {//开始时间不能在其他时间段内/结束间不能在其他时间段内/开始结束时间不能包含其他时间段
return ResponseDto.failure("sku时间不能重合");
}
} else {
if(st.isBefore(collectItem.getTimeStart().minusSeconds(1)) && et.isAfter(collectItem.getTimeStart().minusSeconds(1))){
return ResponseDto.failure("sku时间不能重合");
return ResponseDto.failure("sku时间不能重合");//开始结束时间不能包含只有开始时间的时间段
}
}
}
......
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