| | |
| | | package com.yeshi.fanli.dao.ad;
|
| | |
|
| | | import org.springframework.data.mongodb.core.query.Criteria;
|
| | | import org.springframework.data.mongodb.core.query.Query;
|
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | import com.yeshi.fanli.dao.MongodbBaseDao;
|
| | | import com.yeshi.fanli.entity.ad.DouYinClickEvent;
|
| | |
|
| | | @Repository
|
| | | public class DouYinClickEventDao extends MongodbBaseDao<DouYinClickEvent> {
|
| | |
|
| | | public DouYinClickEvent selectByAid(String aid) {
|
| | | Query query = new Query();
|
| | | query.addCriteria(Criteria.where("aid").is(aid));
|
| | | return findOne(query);
|
| | | }
|
| | |
|
| | | public DouYinClickEvent selectByAndroidId(String androidId) {
|
| | | Query query = new Query();
|
| | | query.addCriteria(Criteria.where("androidId").is(androidId));
|
| | | return findOne(query);
|
| | | }
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.dao.ad; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import com.yeshi.common.MongodbBaseDao; |
| | | import com.yeshi.fanli.entity.ad.DouYinClickEvent; |
| | | |
| | | @Repository |
| | | public class DouYinClickEventDao extends MongodbBaseDao<DouYinClickEvent> { |
| | | |
| | | public DouYinClickEvent selectByCallBack(String callback) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("callback").is(callback)); |
| | | return findOne(query); |
| | | } |
| | | |
| | | public DouYinClickEvent selectByUuid(String uuid) { |
| | | Query query = new Query(); |
| | | query.addCriteria(Criteria.where("uuid").is(uuid)); |
| | | return findOne(query); |
| | | } |
| | | |
| | | /** |
| | | * 查询所有 |
| | | * |
| | | * @param start |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public List<DouYinClickEvent> listAll(int start, int count) { |
| | | Query query = new Query(); |
| | | query.skip(start); |
| | | query.limit(count); |
| | | return findList(query); |
| | | } |
| | | |
| | | } |