| @@ -301,7 +301,8 @@ public class WxInfoController extends BaseController { | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| @PostMapping("/getUserPhoneForBuser") | @PostMapping("/getUserPhoneForBuser") | ||||
| @ApiOperation(value = "登录后授权获取用户的手机号", notes="{\"appId\":\"string\",\"encryptedData\":\"string\",\"iv\":\"string\",\"openId\":\"string\",\"session_key\":\"string\"}") | |||||
| @ApiOperation(value = "登录后授权获取用户的手机号", notes="{\"appId\":\"string\",\"encryptedData\":\"string\",\"iv\":\"string\"," | |||||
| + "\"openId\":\"string\",\"session_key\":\"string\",\"isCheck\":\"string\"}") | |||||
| public ResultData getUserPhoneForBuser(@RequestBody Map<String, String> map) { | public ResultData getUserPhoneForBuser(@RequestBody Map<String, String> map) { | ||||
| logger.debug(map.toString()); | logger.debug(map.toString()); | ||||
| Map resultMap = new HashMap(); | Map resultMap = new HashMap(); | ||||
| @@ -310,7 +311,7 @@ public class WxInfoController extends BaseController { | |||||
| String iv = map.get("iv"); | String iv = map.get("iv"); | ||||
| String openId = map.get("openId"); | String openId = map.get("openId"); | ||||
| String session_key = map.get("session_key"); | String session_key = map.get("session_key"); | ||||
| String isCheck = map.get("isCheck"); | |||||
| //登录凭证不能为空 | //登录凭证不能为空 | ||||
| if (StringUtils.isBlank(encryptedData)) { | if (StringUtils.isBlank(encryptedData)) { | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "encryptedData 不能为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "encryptedData 不能为空"); | ||||
| @@ -338,10 +339,12 @@ public class WxInfoController extends BaseController { | |||||
| resultMap.put("msg", "授权手机成功!"); | resultMap.put("msg", "授权手机成功!"); | ||||
| resultMap.put("phone", phone); | resultMap.put("phone", phone); | ||||
| try { | |||||
| checkLoginUserPhone(buser, phone,this.getLoginBUser().getPhone()); | |||||
| }catch(Exception e) { | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(),e.getMessage()); | |||||
| if (StringUtils.isNotBlank(isCheck) && "Y".equals(isCheck)) { | |||||
| try { | |||||
| checkLoginUserPhone(buser, phone,this.getLoginBUser().getPhone()); | |||||
| }catch(Exception e) { | |||||
| return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(),e.getMessage()); | |||||
| } | |||||
| } | } | ||||
| return new ResultData(resultMap); | return new ResultData(resultMap); | ||||