征求意见查询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) {
|
public IPage<SarPublicIdea> selectAllP(Integer p, Integer size, String category, String cname, Date start, Date end, String type) {
|
||||||
QueryWrapper<SarPublicIdea> list = new QueryWrapper<>();
|
QueryWrapper<SarPublicIdea> list = new QueryWrapper<>();
|
||||||
if ("1".equals(type)) {
|
if ("1".equals(type)) {
|
||||||
list.like(StringUtils.isNotEmpty(category), "category", category)
|
if (start!=null && end !=null){
|
||||||
.like(StringUtils.isNotEmpty(cname), "cid", cname)
|
list.like(StringUtils.isNotEmpty(category), "category", category)
|
||||||
.ge(start != null, "start_time", start)
|
.like(StringUtils.isNotEmpty(cname), "cid", cname)
|
||||||
.le(end != null, "end_time", end)
|
.ge(start != null, "start_time", start)
|
||||||
.orderByDesc("start_time");
|
.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 {
|
} else {
|
||||||
list.like(StringUtils.isNotEmpty(category), "category", category)
|
list.like(StringUtils.isNotEmpty(category), "category", category)
|
||||||
.like(StringUtils.isNotEmpty(cname), "cname", cname)
|
.like(StringUtils.isNotEmpty(cname), "cname", cname)
|
||||||
|
|||||||
Reference in New Issue
Block a user