提交代码

dev-discount
胡锐 3 years ago
parent cf36751ddc
commit b4e31c13cc
  1. 12
      hai-cweb/src/main/java/com/cweb/controller/HighUserCardController.java

@ -177,18 +177,12 @@ public class HighUserCardController {
@ResponseBody
@ApiOperation(value = "根据手机号获取汇联通工会卡列表")
public ResponseData getHuiLianTongCardByPhone(@RequestParam(name = "phone", required = true) String phone,
@RequestParam(name = "smsCode", required = true) String smsCode,
HttpServletRequest request) {
try {
// 用户
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
// 获取手机号验证码
String phoneSmsCode = (String) redisUtil.get(phone);
// 验证码校验
if (StringUtils.isNotBlank(phoneSmsCode) && Objects.equals(phoneSmsCode,smsCode)) {
// 验证码校验成功
// 根据手机号查询卡号
JSONObject jsonObject = HuiLianTongUnionCardConfig.queryCardByMobile(phone);
@ -203,14 +197,10 @@ public class HighUserCardController {
card.put("bindStatus", false);
}
}
redisUtil.del(phone);
return ResponseMsgUtil.success(cards);
} else {
}
System.out.println(jsonObject);
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "查询失败");
}
}
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "验证码错误");
} catch (Exception e) {
log.error("HighUserCardController --> getHuiLianTongCardByPhone() error!", e);
return ResponseMsgUtil.exception(e);

Loading…
Cancel
Save