Commit d376e6c58a760f4f9c4e58a010f63b598de8af79

Authored by liquanyu
1 parent 04b20e3c48
Exists in master and in 1 other branch dev

产检券

Showing 2 changed files with 12 additions and 8 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java View file @ d376e6c
... ... @@ -181,21 +181,25 @@
181 181 for (Map<String,Object> map : temps)
182 182 {
183 183 Integer type = Integer.parseInt(map.get("type").toString());
184   - Integer showStart = Integer.parseInt(map.get("show_start").toString());
185   - Integer showEnd = Integer.parseInt(map.get("show_end").toString());
186   - if (person.getType() == 1)
  184 +
  185 + if (person.getType() == 1 && type == 2)
187 186 {
188   - if (type == 2 && ((showStart <= start && showEnd >= start) || showStart >= start))
  187 + Integer showStart = Integer.parseInt(map.get("show_start").toString());
  188 + Integer showEnd = Integer.parseInt(map.get("show_end").toString());
  189 + if ((showStart <= start && showEnd >= start) || showStart >= start)
189 190 {
190 191 list.add(map);
191 192 }
192 193 }
193   - else if (person.getType() == 3)
  194 + else if (person.getType() == 3 && type == 6)
194 195 {
195   - if (type == 6 && ((showStart <= start && showEnd >= start) || showStart >= start))
  196 + Integer showStart = Integer.parseInt(map.get("show_start").toString());
  197 + Integer showEnd = Integer.parseInt(map.get("show_end").toString());
  198 + if ((showStart <= start && showEnd >= start) || showStart >= start)
196 199 {
197   - list.add(map);
  200 +
198 201 }
  202 + list.add(map);
199 203 }
200 204 }
201 205 }
platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml View file @ d376e6c
... ... @@ -59,7 +59,7 @@
59 59 </insert>
60 60  
61 61 <select id="findTemp" parameterType="map" resultType="map">
62   - select b.id, b.id as coupon_template_id, b.actual_start, b.actual_end, b.unit_type,b.show_start, c.send_type, c.type from
  62 + select b.id, b.id as coupon_template_id, b.actual_start, b.actual_end, b.unit_type,b.show_start,b.show_end, c.send_type, c.type from
63 63 hospital_coupon_template_group a, coupon_template b, coupon_type c
64 64 where a.hospital_id = #{hospitalId} and a.coupon_template_group_id = b.group_id and b.type_id = c.id and c.type in
65 65 <foreach collection="types" open="(" close=")" separator="," item="type">