Commit 5732f62a57eb582ac3f97571eb684dbe0b1a4a56
1 parent
0336a9f35f
Exists in
master
and in
6 other branches
优惠券统计列表加个孕妇户籍地址,上面搜索项也要增加一个(update)
Showing 2 changed files with 35 additions and 14 deletions
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml
View file @
5732f62
| ... | ... | @@ -775,20 +775,6 @@ |
| 775 | 775 | #{key} |
| 776 | 776 | </foreach> |
| 777 | 777 | </if> |
| 778 | -<!-- 隆化居住地筛选参数 --> | |
| 779 | - <if test="provinceId != null"> | |
| 780 | - and d.province_id = #{provinceId} | |
| 781 | - </if> | |
| 782 | - <if test="cityId != null"> | |
| 783 | - and d.city_id = #{cityId} | |
| 784 | - </if> | |
| 785 | - <if test="areaId != null"> | |
| 786 | - and d.area_id = #{areaId} | |
| 787 | - </if> | |
| 788 | - <if test="streetId != null"> | |
| 789 | - and d.street_id = #{streetId} | |
| 790 | - </if> | |
| 791 | -<!-- ################################## --> | |
| 792 | 778 | <if test="coupon_order != null"> |
| 793 | 779 | and b.coupon_order = #{coupon_order} |
| 794 | 780 | </if> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/OrgCouponServiceImpl.java
View file @
5732f62
| ... | ... | @@ -165,6 +165,41 @@ |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | } |
| 168 | + //隆化省市县筛选 | |
| 169 | + String provinceId=(null!=param.get("provinceId")) ? param.get("provinceId").toString() : ""; | |
| 170 | + String cityId=(null!=param.get("cityId")) ? param.get("cityId").toString() : ""; | |
| 171 | + String areaId=(null!=param.get("areaId")) ? param.get("areaId").toString() : ""; | |
| 172 | + String streetId=(null!=param.get("streetId")) ? param.get("streetId").toString() : ""; | |
| 173 | + if (StringUtils.isNotEmpty(provinceId)) { | |
| 174 | + Criteria criteria = new Criteria(); | |
| 175 | + criteria = criteria.and("provinceRegisterId").is(provinceId); | |
| 176 | + if(StringUtils.isNotEmpty(cityId)){ | |
| 177 | + criteria.and("cityRegisterId").is(cityId); | |
| 178 | + } | |
| 179 | + if (StringUtils.isNotEmpty(areaId)){ | |
| 180 | + criteria.and("areaRegisterId").is(areaId); | |
| 181 | + } | |
| 182 | + if(StringUtils.isNotEmpty(streetId)){ | |
| 183 | + criteria.and("streetRegisterId").is(streetId); | |
| 184 | + } | |
| 185 | + if(StringUtils.isNotEmpty(key)){ | |
| 186 | + keys.clear(); | |
| 187 | + criteria.orOperator(Criteria.where("name").is(key), Criteria.where("cardNo").is(key), Criteria.where("phone").is(key)); | |
| 188 | + } | |
| 189 | + List<Patients> patients = mongoTemplate.find(Query.query(criteria), Patients.class); | |
| 190 | + if (CollectionUtils.isNotEmpty(patients)) { | |
| 191 | + for (Patients patients1 : patients) { | |
| 192 | + keys.add(patients1.getPid()); | |
| 193 | + } | |
| 194 | + } else { | |
| 195 | + List<Map<String, Object>> couponInfos = new ArrayList<>(); | |
| 196 | + String subTitle = null; | |
| 197 | + int count = 0; | |
| 198 | + PageResult pageResult = new PageResult(count, currentPage, (Integer) param.get("pageSize"), CollectionUtils.createMap("couponInfos", couponInfos, "subTitle", subTitle)); | |
| 199 | + return RespBuilder.buildSuccess(pageResult); | |
| 200 | + } | |
| 201 | + | |
| 202 | + } | |
| 168 | 203 | param.put("keys", keys); |
| 169 | 204 | |
| 170 | 205 | Integer type = 4; |