| | |
| | | if (daoQuery.type != null) { |
| | | andList.add(Criteria.where("type").is(daoQuery.type)); |
| | | } |
| | | |
| | | if (daoQuery.typeList != null && daoQuery.typeList.size() > 0) { |
| | | Criteria[] ors = new Criteria[daoQuery.typeList.size()]; |
| | | for (int i = 0; i < ors.length; i++) { |
| | | ors[i] = Criteria.where("type").is(daoQuery.typeList.get(i)); |
| | | } |
| | | andList.add(new Criteria().orOperator(ors)); |
| | | } |
| | | |
| | | if (daoQuery.maxValidateTime != null) { |
| | | andList.add(Criteria.where("validateTime").lt(daoQuery.maxValidateTime)); |
| | | } |
| | |
| | | public static class DaoQuery { |
| | | public SystemEnum system; |
| | | public GoldCornGetType type; |
| | | public List<GoldCornGetType> typeList; |
| | | public Date maxValidateTime; |
| | | public Date minValidateTime; |
| | | public int start; |