diff --git a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java index ab8d63b..bfc7ecf 100644 --- a/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java +++ b/platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java @@ -180,20 +180,19 @@ public class CouponServiceImpl implements CouponService { for (Map map : temps) { + Integer type = Integer.parseInt(map.get("type").toString()); + Integer showStart = Integer.parseInt(map.get("show_start").toString()); + Integer showEnd = Integer.parseInt(map.get("show_end").toString()); if (person.getType() == 1) { - Integer type = Integer.parseInt(map.get("type").toString()); - Integer showStart = Integer.parseInt(map.get("show_start").toString()); - if (type == 2 && showStart <= start) + if (type == 2 && ((showStart <= start && showEnd >= start) || showStart >= start)) { list.add(map); } } else if (person.getType() == 3) { - Integer type = Integer.parseInt(map.get("type").toString()); - Integer showStart = Integer.parseInt(map.get("show_start").toString()); - if (type == 6 && showStart <= start) + if (type == 6 && ((showStart <= start && showEnd >= start) || showStart >= start)) { list.add(map); }