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 319c4ef4..e5351209 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 @@ -48,22 +48,26 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl list = new QueryWrapper<>(); if ("1".equals(type)) { if (start!=null && end !=null){ + String date1 = (new SimpleDateFormat("yyyy-MM-dd")).format(start); + String date2 = (new SimpleDateFormat("yyyy-MM-dd")).format(end); 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) + .ge(start != null, "start_time", date1) + .le(end != null, "end_time", date2) .orderByDesc("start_time"); }else if (start!=null){ + String date1 = (new SimpleDateFormat("yyyy-MM-dd")).format(start); list.like(StringUtils.isNotEmpty(category), "category", category) .like(StringUtils.isNotEmpty(cname), "cid", cname) - .le(start != null, "start_time", start) - .ge(start != null, "end_time", start) + .le(start != null, "start_time", date1) + .ge(start != null, "end_time", date1) .orderByDesc("start_time"); }else if (end!=null){ + String date2 = (new SimpleDateFormat("yyyy-MM-dd")).format(end); list.like(StringUtils.isNotEmpty(category), "category", category) .like(StringUtils.isNotEmpty(cname), "cid", cname) - .le(end != null, "start_time", end) - .ge(end != null, "end_time", end) + .le(end != null, "start_time", date2) + .ge(end != null, "end_time", date2) .orderByDesc("start_time"); }else { list.like(StringUtils.isNotEmpty(category), "category", category) @@ -71,9 +75,10 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl page = new Page<>(p, size);