|
|
|
@@ -153,6 +153,13 @@ public class WxInfoController extends BaseController { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
this.checkLoginUserPhone(buUser, appPlat); |
|
|
|
} catch (Exception e) { |
|
|
|
return new ResultData(ErrorCode.SYS_SERVER_ERROR.getCode(), e.getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
//处理登陆用户 |
|
|
|
cUser = cuserFactory.getBUserService(appPlat).handleLoginUser(cUser,null); |
|
|
|
resultMap.put("token", cUser.getToken()); |
|
|
|
@@ -301,7 +308,8 @@ public class WxInfoController extends BaseController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@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) { |
|
|
|
logger.debug(map.toString()); |
|
|
|
Map resultMap = new HashMap(); |
|
|
|
@@ -310,7 +318,7 @@ public class WxInfoController extends BaseController { |
|
|
|
String iv = map.get("iv"); |
|
|
|
String openId = map.get("openId"); |
|
|
|
String session_key = map.get("session_key"); |
|
|
|
|
|
|
|
String isCheck = map.get("isCheck"); |
|
|
|
//登录凭证不能为空 |
|
|
|
if (StringUtils.isBlank(encryptedData)) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "encryptedData 不能为空"); |
|
|
|
@@ -338,10 +346,12 @@ public class WxInfoController extends BaseController { |
|
|
|
resultMap.put("msg", "授权手机成功!"); |
|
|
|
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); |
|
|
|
|