征求意见查询bug修复
This commit is contained in:
+13
-5
@@ -47,11 +47,19 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl<SarPublicIdeaDao, SarP
|
||||
public IPage<SarPublicIdea> selectAllP(Integer p, Integer size, String category, String cname, Date start, Date end, String type) {
|
||||
QueryWrapper<SarPublicIdea> 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)
|
||||
|
||||
Reference in New Issue
Block a user