| | |
| | | package com.yeshi.makemoney.app.dao.msg; |
| | | |
| | | import com.yeshi.makemoney.app.entity.SystemEnum; |
| | | import com.yeshi.makemoney.app.entity.msg.AppPageNotifyMsg; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | |
| | | if(daoQuery.show!=null){ |
| | | andList.add(Criteria.where("show").is(daoQuery.show)); |
| | | } |
| | | if (daoQuery.system != null) { |
| | | andList.add(Criteria.where("system").is(daoQuery.system)); |
| | | } |
| | | |
| | | if (daoQuery.date != null) { |
| | | andList.add(Criteria.where("startTime").lte(daoQuery.date).and("endTime").gt(daoQuery.date)); |
| | | } |
| | | |
| | | if(daoQuery.content!=null){ |
| | | andList.add(Criteria.where("content").regex(daoQuery.content)); |
| | | } |
| | |
| | | public static class DaoQuery{ |
| | | public AppPageNotifyMsg.AppPageNotifyMsgType type; |
| | | public Boolean show; |
| | | public SystemEnum system; |
| | | public Date date; |
| | | public String content; |
| | | public int start; |
| | | public int count; |