| | |
| | | * List<GiveVIPApplyInfo> 返回类型
|
| | | * @throws
|
| | | */
|
| | | public List<GiveVIPApplyInfo> list(Long targetUid, Integer state, int start, int count) {
|
| | | public List<GiveVIPApplyInfo> listByTargetUid(Long targetUid, Integer state, int start, int count) {
|
| | | Query query = new Query();
|
| | |
|
| | | List<Criteria> list = new ArrayList<Criteria>();
|
| | |
| | | return findList(query);
|
| | | }
|
| | |
|
| | | public long count(Long targetUid, Integer state) {
|
| | | public long countByTargetUid(Long targetUid, Integer state) {
|
| | | Query query = new Query();
|
| | |
|
| | | List<Criteria> list = new ArrayList<Criteria>();
|
| | |
| | | }
|
| | | return count(query);
|
| | | }
|
| | | |
| | | |
| | | |
| | | public List<GiveVIPApplyInfo> listBySourceUid(Long sourceUid, Integer state, int start, int count) {
|
| | | Query query = new Query();
|
| | |
|
| | | List<Criteria> list = new ArrayList<Criteria>();
|
| | | if (sourceUid != null)
|
| | | list.add(Criteria.where("sourceUid").is(sourceUid));
|
| | |
|
| | | if (state != null)
|
| | | list.add(Criteria.where("state").is(state));
|
| | |
|
| | | if (list.size() > 0) {
|
| | | Criteria[] cas = new Criteria[list.size()];
|
| | | for (int i = 0; i < list.size(); i++)
|
| | | cas[i] = list.get(i);
|
| | | query.addCriteria(new Criteria().andOperator(cas));
|
| | | }
|
| | | query.skip(start);
|
| | | query.limit(count);
|
| | | query.with(new Sort(Sort.Direction.DESC, "createTime"));
|
| | | return findList(query);
|
| | | }
|
| | |
|
| | | public long countBySourceUid(Long sourceUid, Integer state) {
|
| | | Query query = new Query();
|
| | |
|
| | | List<Criteria> list = new ArrayList<Criteria>();
|
| | | if (sourceUid != null)
|
| | | list.add(Criteria.where("sourceUid").is(sourceUid));
|
| | |
|
| | | if (state != null)
|
| | | list.add(Criteria.where("state").is(state));
|
| | |
|
| | | if (list.size() > 0) {
|
| | |
|
| | | Criteria[] cas = new Criteria[list.size()];
|
| | | for (int i = 0; i < list.size(); i++)
|
| | | cas[i] = list.get(i);
|
| | | query.addCriteria(new Criteria().andOperator(cas));
|
| | | }
|
| | | return count(query);
|
| | | }
|
| | |
|
| | | public void updateSelective(GiveVIPApplyInfo info) {
|
| | | Query query = new Query();
|