|
|
@@ -291,14 +291,16 @@ public class AflCenterUserInfoServiceImpl implements AflCenterUserInfoService{ |
|
|
|
return aflCenterUserInfo; |
|
|
|
} |
|
|
|
|
|
|
|
private void getUpdatePersonalAccountInfoVo(UpdatePersonalAccountInfoVo updatePersonalAccountInfoVo,AflCenterUserInfo aflCenterUserInfo){ |
|
|
|
private void getUpdatePersonalAccountInfoVo(UpdatePersonalAccountInfoVo updatePersonalAccountInfoVo,AflCenterUserInfo aflCenterUserInfo) throws ServiceHandleException { |
|
|
|
isParam(aflCenterUserInfo); |
|
|
|
updatePersonalAccountInfoVo.setOpenId(aflCenterUserInfo.getOpenId()); |
|
|
|
updatePersonalAccountInfoVo.setAccountId(aflCenterUserInfo.getAccountId()); |
|
|
|
updatePersonalAccountInfoVo.setAccessToken(aflCenterUserInfo.getAccessToken()); |
|
|
|
updatePersonalAccountInfoVo.setName(aflCenterUserInfo.getNewName()); |
|
|
|
updatePersonalAccountInfoVo.setAddress(aflCenterUserInfo.getNewAddress()); |
|
|
|
} |
|
|
|
private void getUpdateCompanyAccountInfoVo(UpdateCompanyAccountInfoVo updateCompanyAccountInfoVo, AflCenterUserInfo aflCenterUserInfo){ |
|
|
|
private void getUpdateCompanyAccountInfoVo(UpdateCompanyAccountInfoVo updateCompanyAccountInfoVo, AflCenterUserInfo aflCenterUserInfo) throws ServiceHandleException { |
|
|
|
isParam(aflCenterUserInfo); |
|
|
|
updateCompanyAccountInfoVo.setOpenId(aflCenterUserInfo.getOpenId()); |
|
|
|
updateCompanyAccountInfoVo.setAccountId(aflCenterUserInfo.getAccountId()); |
|
|
|
updateCompanyAccountInfoVo.setAccessToken(aflCenterUserInfo.getAccessToken()); |
|
|
@@ -313,6 +315,18 @@ public class AflCenterUserInfoServiceImpl implements AflCenterUserInfoService{ |
|
|
|
public void getToken(AflCenterUserInfo aflCenterUserInfo) throws ServiceHandleException { |
|
|
|
if (StringUtils.isEmpty(aflCenterUserInfo.getOpenId())||StringUtils.isEmpty(aflCenterUserInfo.getAccessToken())){ |
|
|
|
UserInfoAuthenticationRequestVo userInfoAuthenticationRequestVo = new UserInfoAuthenticationRequestVo(); |
|
|
|
if (StringUtils.isEmpty(aflCenterUserInfo.getIdNum())){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("获取token失败,该用户证件号为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(aflCenterUserInfo.getMobile())){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("获取token失败,该用户手机号为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(aflCenterUserInfo.getName())){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("获取token失败,该用户姓名为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(aflCenterUserInfo.getIdType())){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("获取token失败,该用户证件类型为空"); |
|
|
|
} |
|
|
|
userInfoAuthenticationRequestVo.setId(aflCenterUserInfo.getIdNum()); |
|
|
|
userInfoAuthenticationRequestVo.setMobile(aflCenterUserInfo.getMobile()); |
|
|
|
userInfoAuthenticationRequestVo.setName(aflCenterUserInfo.getName()); |
|
|
@@ -397,4 +411,22 @@ public class AflCenterUserInfoServiceImpl implements AflCenterUserInfoService{ |
|
|
|
return cb.and(list.toArray(p)); |
|
|
|
})); |
|
|
|
} |
|
|
|
|
|
|
|
private void isParam(AflCenterUserInfo aflCenterUserInfo) throws ServiceHandleException { |
|
|
|
if (StringUtils.isEmpty(aflCenterUserInfo.getOpenId())){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("修改账户信息失败,错误原因:该用户用户编号不能为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(aflCenterUserInfo.getAccountId())){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("修改账户信息失败,错误原因:该用户账户编号不能为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(aflCenterUserInfo.getAccessToken())){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("修改账户信息失败,错误原因:该用户接口凭证不能为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(aflCenterUserInfo.getNewName())){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("修改账户信息失败,错误原因:该用户变更姓名不能为空"); |
|
|
|
} |
|
|
|
if (StringUtils.isEmpty(aflCenterUserInfo.getNewAddress())){ |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("修改账户信息失败,错误原因:该用户变更地址不能为空"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |