| | |
| | | package com.yeshi.buwan.dao.juhe.pptv; |
| | | |
| | | import com.yeshi.buwan.dao.base.MongodbBaseDao; |
| | | import com.yeshi.buwan.pptv.entity.PPTVSeries; |
| | | import com.yeshi.buwan.videos.pptv.entity.PPTVSeries; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Repository |
| | | public class PPTVSeriesDao extends MongodbBaseDao<PPTVSeries> { |
| | | |
| | | public List<PPTVSeries> list(int start, int count) { |
| | | Query query = new Query(); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | return findList(query); |
| | | } |
| | | |
| | | |
| | | public List<PPTVSeries> list(String type, int start, int count) { |
| | | Query query = new Query(); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | query.addCriteria(new Criteria().orOperator(Criteria.where("programType2").is(type), Criteria.where("programType").is(type))); |
| | | return findList(query); |
| | | } |
| | | |
| | | } |