Commit b8f08ef1f2c0824f8eef94ef9b79c1e84a05ff38

Authored by jiangjiazhi
1 parent 21c31a36a7

增加过滤掉为null的code

Showing 1 changed file with 7 additions and 5 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java View file @ b8f08ef
... ... @@ -443,11 +443,13 @@
443 443  
444 444 @Override
445 445 public Map<String, Object> getPatientsInfoByCode(String code) {
446   - Map<String, Object> param = new HashMap<>();
447   - param.put("code", code);
448   - List<CouponInfo> list = couponMapper.findList(param);
449   - if(CollectionUtils.isNotEmpty(list)) {
450   - return getPatientsInfo(list.get(0).getUserId());
  446 + if(org.apache.commons.lang.StringUtils.isNotEmpty(code)){
  447 + Map<String, Object> param = new HashMap<>();
  448 + param.put("code", code);
  449 + List<CouponInfo> list = couponMapper.findList(param);
  450 + if(CollectionUtils.isNotEmpty(list)) {
  451 + return getPatientsInfo(list.get(0).getUserId());
  452 + }
451 453 }
452 454 return null;
453 455 }