| | |
| | | public List<TeamFansInfo> query(int start, int count, int type, Long uid, ThreeSaleFocusDTO focusDTO) {
|
| | | Query query = createQuery(type, uid, focusDTO);
|
| | | query.skip(start).limit(count);
|
| | | query.with(new Sort(Sort.Direction.DESC, "weight"));
|
| | | query.with(new Sort(Sort.Direction.DESC, "joinTime"));
|
| | | return findList(query);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | if (!StringUtil.isNullOrEmpty(focusDTO.getMinActiveTime())) {
|
| | | Date date = TimeUtil.parseDotYYYYMMDD(focusDTO.getMinActiveTime());
|
| | | list.add(Criteria.where("joinTime").gte(date));
|
| | | list.add(Criteria.where("activeTime").gte(date));
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(focusDTO.getMaxActiveTime())) {
|
| | |
| | | return query;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 根据用户信息匹配
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<TeamFansInfo> queryByUserInfo(String key) {
|
| | | if (StringUtil.isNullOrEmpty(key))
|
| | | return null;
|
| | | |
| | | Long workerId = null;
|
| | | try {
|
| | | workerId = Long.parseLong(key);
|
| | | } catch (Exception e) {
|
| | | }
|
| | | |
| | | Criteria criteria = null;
|
| | | if (workerId == null) {
|
| | | criteria = new Criteria().orOperator(Criteria.where("phone").is(key),
|
| | | new Criteria().orOperator(Criteria.where("inviteCode").is(key)));
|
| | | } else {
|
| | | criteria = new Criteria().orOperator(Criteria.where("phone").is(key),
|
| | | new Criteria().orOperator(Criteria.where("inviteCode").is(key)),
|
| | | new Criteria().orOperator(Criteria.where("workerId").is(workerId)));
|
| | | }
|
| | | |
| | | Query query = new Query(criteria);
|
| | | return findList(query);
|
| | | }
|
| | |
|
| | | }
|