diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandIdea/service/Impl/SarPublicIdeaServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandIdea/service/Impl/SarPublicIdeaServiceImpl.java index 2a9b9275..28c53f45 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandIdea/service/Impl/SarPublicIdeaServiceImpl.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarStandIdea/service/Impl/SarPublicIdeaServiceImpl.java @@ -47,11 +47,19 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl selectAllP(Integer p, Integer size, String category, String cname, Date start, Date end, String type) { QueryWrapper list = new QueryWrapper<>(); if ("1".equals(type)) { - list.like(StringUtils.isNotEmpty(category), "category", category) - .like(StringUtils.isNotEmpty(cname), "cid", cname) - .ge(start != null, "start_time", start) - .le(end != null, "end_time", end) - .orderByDesc("start_time"); + if (start!=null && end !=null){ + list.like(StringUtils.isNotEmpty(category), "category", category) + .like(StringUtils.isNotEmpty(cname), "cid", cname) + .ge(start != null, "start_time", start) + .le(end != null, "end_time", end) + .orderByDesc("start_time"); + }else { + list.like(StringUtils.isNotEmpty(category), "category", category) + .like(StringUtils.isNotEmpty(cname), "cid", cname) + .le(start != null, "start_time", start) + .ge(end != null, "end_time", end) + .orderByDesc("start_time"); + } } else { list.like(StringUtils.isNotEmpty(category), "category", category) .like(StringUtils.isNotEmpty(cname), "cname", cname)