| | |
| | | public class SuperHomeRecommendSpecialDao extends MongodbBaseDao<SuperHomeRecommendSpecial> { |
| | | |
| | | |
| | | public List<SuperHomeRecommendSpecial> list(SuperHomeRecommendSpecialDao.DaoQuery daoQuery) { |
| | | private Query getQuery(SuperHomeRecommendSpecialDao.DaoQuery daoQuery) { |
| | | Query query = new Query(); |
| | | List<Criteria> andList = new ArrayList<>(); |
| | | |
| | |
| | | |
| | | if (daoQuery.detailSystemId != null) { |
| | | andList.add(Criteria.where("detailSystemId").is(daoQuery.detailSystemId)); |
| | | } |
| | | |
| | | if (daoQuery.showName != null) { |
| | | andList.add(Criteria.where("showName").regex(daoQuery.showName)); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | query.addCriteria(criteria); |
| | | |
| | | return query; |
| | | |
| | | } |
| | | |
| | | public List<SuperHomeRecommendSpecial> list(SuperHomeRecommendSpecialDao.DaoQuery daoQuery) { |
| | | Query query = getQuery(daoQuery); |
| | | query.skip(daoQuery.start); |
| | | query.limit(daoQuery.count); |
| | | query.with(new Sort(new Sort.Order(Sort.Direction.DESC, "weight"))); |
| | | |
| | | return findList(query); |
| | | } |
| | | |
| | | |
| | | public long count(SuperHomeRecommendSpecialDao.DaoQuery daoQuery) { |
| | | Query query = getQuery(daoQuery); |
| | | return count(query); |
| | | } |
| | | |
| | | public void updateSelective(SuperHomeRecommendSpecial bean) { |
| | |
| | | public static class DaoQuery { |
| | | public String specialId; |
| | | public String detailSystemId; |
| | | public String showName; |
| | | public int start; |
| | | public int count; |
| | | } |