Commit e8e9ae28d3b395608458e78523088635f9cdb2b0
1 parent
d2c200b484
Exists in
master
and in
1 other branch
update code
Showing 1 changed file with 5 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CouponPrintController.java
View file @
e8e9ae2
| ... | ... | @@ -199,6 +199,11 @@ |
| 199 | 199 | param.put("code", code); |
| 200 | 200 | Map<String,String> couponInfo = couponService.findCouponByCode(param); |
| 201 | 201 | |
| 202 | + if (couponInfo == null || couponInfo.size() == 0) | |
| 203 | + { | |
| 204 | + return RespBuilder.buildErro(ResponseCode.COUPON_NOT_FOUND); | |
| 205 | + } | |
| 206 | + | |
| 202 | 207 | Object type = couponInfo.get("type"); |
| 203 | 208 | //验证优惠劵是否可以使用 |
| 204 | 209 | BaseObjectResponse objectResponse = couponService.validate(code,Integer.parseInt(type.toString()),hospitalId); |