Commit 6920e83df7950d63bdca471ab578eb69fb51b6be
1 parent
1afcb663a7
Exists in
master
and in
6 other branches
默认二维码地址 增加
Showing 1 changed file with 17 additions and 11 deletions
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CouponServiceImpl.java
View file @
6920e83
... | ... | @@ -383,18 +383,24 @@ |
383 | 383 | |
384 | 384 | @Override |
385 | 385 | public String findUrl(String code) { |
386 | - Map<String, Object> map = couponMapper.findUrl(code); | |
387 | - String hId = map.get("create_hospital_id").toString(); | |
388 | - String userId = map.get("user_id").toString(); | |
386 | + try { | |
387 | + Map<String, Object> map = couponMapper.findUrl(code); | |
388 | + String hId = map.get("create_hospital_id").toString(); | |
389 | + String userId = map.get("user_id").toString(); | |
389 | 390 | |
390 | - PersonModel person = mongoTemplate.findById(userId, PersonModel.class); | |
391 | + PersonModel person = mongoTemplate.findById(userId, PersonModel.class); | |
391 | 392 | |
392 | - Map<String, String> params = new HashMap<>(); | |
393 | - params.put("hId", hId); | |
394 | - params.put("dpId", person.getType() == 2 ? "1" : "2"); | |
395 | - String s = HttpClientUtil.doGet(PropertiesUtil.getInstance().getDefault("or.code.create.url"), params, "utf-8", null); | |
396 | - JSONObject jsonObject = JSONObject.fromObject(s); | |
397 | - return jsonObject.get("url").toString(); | |
393 | + Map<String, String> params = new HashMap<>(); | |
394 | + params.put("hId", hId); | |
395 | + params.put("dpId", person.getType() == 2 ? "1" : "2"); | |
396 | + String s = HttpClientUtil.doGet(PropertiesUtil.getInstance().getDefault("or.code.create.url"), params, "utf-8", null); | |
397 | + JSONObject jsonObject = JSONObject.fromObject(s); | |
398 | + return jsonObject.get("url").toString(); | |
399 | + } catch (Exception e) { | |
400 | + e.printStackTrace(); | |
401 | + return "http://weixin.qq.com/r/Fi9bQyLEgH--rWYg93oE"; | |
402 | + } | |
403 | + | |
398 | 404 | } |
399 | 405 | |
400 | 406 | @Override |