|
@@ -102,6 +102,9 @@ public class WxAppletApi {
|
|
if (null == orderType) {
|
|
if (null == orderType) {
|
|
return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "订单类别不能为空。");
|
|
return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "订单类别不能为空。");
|
|
}
|
|
}
|
|
|
|
+ if (StringUtil.isBlank(order.getDescription())) {
|
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "商品描述不能为空。");
|
|
|
|
+ }
|
|
String appId = appletType == AppletType.HOSPITAL_SERVICE ?
|
|
String appId = appletType == AppletType.HOSPITAL_SERVICE ?
|
|
PropertiesUtil.getLocalProperty("appletAppId") :
|
|
PropertiesUtil.getLocalProperty("appletAppId") :
|
|
PropertiesUtil.getLocalProperty("appletMallAppId");
|
|
PropertiesUtil.getLocalProperty("appletMallAppId");
|
|
@@ -432,4 +435,22 @@ public class WxAppletApi {
|
|
inquiry.setOpenId(makeSpecialOpenId(appletType, inquiry.getOpenId()));
|
|
inquiry.setOpenId(makeSpecialOpenId(appletType, inquiry.getOpenId()));
|
|
return electronicHealthCardService.linkHealthCard(inquiry.getHealthCode(), inquiry.getOpenId());
|
|
return electronicHealthCardService.linkHealthCard(inquiry.getHealthCode(), inquiry.getOpenId());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @PostMapping("/setDefaultCard")
|
|
|
|
+ public ResultVo<String> setDefaultCard(@RequestBody BaseInquiry inquiry) {
|
|
|
|
+ AppletType appletType = inquiry.getAppletType();
|
|
|
|
+ if (null == appletType) {
|
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "小程序类别不能为空。");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtil.isBlank(inquiry.getOpenId())) {
|
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "openId不能为空。");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtil.isBlank(inquiry.getPatientId())) {
|
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "patientId不能为空。");
|
|
|
|
+ }
|
|
|
|
+ String openId = makeSpecialOpenId(appletType, inquiry.getOpenId());
|
|
|
|
+ log.info("设置默认就诊卡:{}", JSONObject.toJSON(inquiry));
|
|
|
|
+ appletDao.updateDefaultCard(inquiry.getPatientId(), openId);
|
|
|
|
+ return ResultVoUtil.success();
|
|
|
|
+ }
|
|
}
|
|
}
|