Commit ae143ec4b1e687a05918e98dfa1abb26bed3f219
1 parent
2e1ab3e7ca
Exists in
master
and in
6 other branches
二维码获取类型抽取
Showing 3 changed files with 27 additions and 6 deletions
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml
View file @
ae143ec
... | ... | @@ -224,9 +224,30 @@ |
224 | 224 | |
225 | 225 | <select id="findCouponInfo" parameterType="map" resultType="map"> |
226 | 226 | select c.type, a.sequence_id, d.name |
227 | - from coupon_info a, coupon_template b, coupon_type c, users d | |
228 | - where a.coupon_template_id = b.id and b.type_id = c.id and a.user_id = d.id and a.status=2 | |
229 | - and a.used_hospital_id = #{hospitalId} | |
227 | + from coupon_info a, coupon_template b, coupon_type c, users d, organization e, hospital_coupon_template_group f | |
228 | + where a.coupon_template_id = b.id and b.type_id = c.id and a.user_id = d.id and a.status=2 and a.create_hospital_id = e.id | |
229 | + and a.used_hospital_id = #{hospitalId} and f.hospital_id = a.used_hospital_id and c.type in | |
230 | + <foreach collection="couponType" open="(" close=")" separator="," item="type"> | |
231 | + #{type} | |
232 | + </foreach> | |
233 | + <if test="startDate != null"> | |
234 | + and a.create_date >= #{startDate} | |
235 | + </if> | |
236 | + <if test="endDate != null"> | |
237 | + and a.create_date <![CDATA[ <= ]]> #{endDate} | |
238 | + </if> | |
239 | + <if test="provinceId != null and provinceId != ''"> | |
240 | + and e.province_id = #{provinceId} | |
241 | + </if> | |
242 | + <if test="cityId != null and cityId != '' "> | |
243 | + and e.city_id = #{cityId} | |
244 | + </if> | |
245 | + <if test="areaId != null and areaId != ''"> | |
246 | + and e.area_id = #{areaId} | |
247 | + </if> | |
248 | + <if test="tempId != null and tempId != ''"> | |
249 | + and f.coupon_template_group_id = #{tempId} | |
250 | + </if> | |
230 | 251 | limit #{currentPage},#{pageSize} |
231 | 252 | </select> |
232 | 253 | </mapper> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ReportController.java
View file @
ae143ec
... | ... | @@ -235,7 +235,7 @@ |
235 | 235 | Integer currentPage, Integer pageSize) { |
236 | 236 | Map<String, Object> param = CollectionUtils.createMap("userId", getUserId(request), "startDate", startDate, |
237 | 237 | "endDate", endDate, "hospitalId", hospitalId, "provinceId", provinceId, "cityId", cityId, "areaId", |
238 | - areaId, "tempId", tempId, "couponType", couponType); | |
238 | + areaId, "tempId", tempId, "couponType", CollectionUtils.asList(couponType), "currentPage", currentPage, "pageSize", pageSize); | |
239 | 239 | return reportService.couponInfo(param); |
240 | 240 | } |
241 | 241 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/CollectionUtils.java
View file @
ae143ec
1 | 1 | package com.lyms.platform.operate.web.utils; |
2 | 2 | |
3 | -import org.eclipse.jetty.util.StringUtil; | |
3 | +import org.apache.commons.lang3.StringUtils; | |
4 | 4 | import org.springframework.util.Assert; |
5 | 5 | |
6 | 6 | import java.util.ArrayList; |
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | for (int i = 0; i < args.length; i++) { |
25 | 25 | String key = args[i++].toString(); |
26 | 26 | Object value = args[i]; |
27 | - if(value != null && StringUtil.isNotBlank(value.toString())) { | |
27 | + if(value != null && StringUtils.isNotBlank(value.toString())) { | |
28 | 28 | map.put(key, value); |
29 | 29 | } |
30 | 30 | } |