Commit 0cd6e70348ffbfe086bf02d46516e4c47faf4537

Authored by litao
1 parent ac4ec827e7

优惠券时间对比规则更改

Showing 3 changed files with 9 additions and 2 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java View file @ 0cd6e70
... ... @@ -168,6 +168,14 @@
168 168 if("1".equals(sendType.toString())) {
169 169 couponMapper.save(couponInfo);
170 170 } else if("2".equals(sendType.toString())) {
  171 +
  172 + /** 孕妇 > 分娩、出院小结、产后复查【分娩券、出院小结券、产后复查券全部发放】 */
  173 + List<String> list = Arrays.asList("4", "5", "6");
  174 + if(personType == 1 && list.contains(temp.get("type").toString())) {
  175 + couponMapper.save(couponInfo);
  176 + continue;
  177 + }
  178 +
171 179 Object actualStart = temp.get("actual_start");
172 180 Object actualEnd = temp.get("actual_end");
173 181 Object unitType = temp.get("unit_type");
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ 0cd6e70
... ... @@ -44,7 +44,6 @@
44 44 select b.id, b.id as coupon_template_id, b.actual_start, b.actual_end, b.unit_type, c.send_type, c.type from
45 45 hospital_coupon_template_group a, coupon_template b, coupon_type c
46 46 where a.hospital_id = #{hospitalId} and a.coupon_template_group_id = b.group_id and b.type_id = c.id and c.type in
47   - /*(4, 5, 6)*/
48 47 <foreach collection="types" open="(" close=")" separator="," item="type">
49 48 #{type}
50 49 </foreach>
platform-common/src/main/java/com/lyms/platform/common/result/ResponseCode.java View file @ 0cd6e70
... ... @@ -20,7 +20,7 @@
20 20  
21 21 COUPON_NOT_FOUND(1001, "优惠券不存在"),
22 22 COUPON_NOT_UNIQUE(1002, "优惠券有多个"),
23   - COUPON_TIME_OUT(1003, "优惠券已过期"),
  23 + COUPON_TIME_OUT(1003, "当前优惠券不在使用时间范围内"),
24 24 COUPON_IS_USERD(1004, "优惠券已被使用"),
25 25 COUPON_IS_DISABLED(1005, "优惠券已被禁用");
26 26