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