| | |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | @Repository |
| | | public class VideoFunTV2Dao extends MongodbBaseDao<VideoFunTV2> { |
| | |
| | | return findOne(query); |
| | | } |
| | | |
| | | /** |
| | | * 查询所有 |
| | | * |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public List<VideoFunTV2> listAll(int start, int count) { |
| | | Query query = new Query(); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | return findList(query); |
| | | } |
| | | |
| | | |
| | | public void deleteByVideoId(Long videoId){ |
| | | Query query = Query.query(Criteria.where("_id").is(videoId)); |
| | | mongoTemplate.remove(query, getEntityClass()); |
| | | } |
| | | |
| | | } |