|
|
|
@ -765,19 +765,18 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
@Override |
|
|
|
public Result<EpdcAppAuthorizationDTO> completeUserInfo(TokenDto tokenDto, EpdcCompleteUserInfoFormDTO infoDto) { |
|
|
|
|
|
|
|
WxMaUserInfo wxMaUserInfo = null; |
|
|
|
UserDTO userDto = ConvertUtils.sourceToTarget(infoDto, UserDTO.class); |
|
|
|
userDto.setId(tokenDto.getUserId()); |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(infoDto.getWxCode())) { |
|
|
|
String sessionKey = this.getUserSessionKey(infoDto.getWxCode()); |
|
|
|
wxMaUserInfo = wxMaServiceUtils.normalWxMaService().getUserService().getUserInfo(sessionKey, infoDto.getEncryptedData(), infoDto.getIv()); |
|
|
|
WxMaUserInfo wxMaUserInfo = wxMaServiceUtils.normalWxMaService().getUserService().getUserInfo(sessionKey, infoDto.getEncryptedData(), infoDto.getIv()); |
|
|
|
if (StringUtils.isBlank(wxMaUserInfo.getUnionId())) { |
|
|
|
return new Result().error("解析微信开放平台ID失败"); |
|
|
|
} |
|
|
|
userDto.setWxUnionId(wxMaUserInfo.getUnionId()); |
|
|
|
} |
|
|
|
|
|
|
|
UserDTO userDto = ConvertUtils.sourceToTarget(infoDto, UserDTO.class); |
|
|
|
userDto.setId(tokenDto.getUserId()); |
|
|
|
userDto.setWxUnionId(wxMaUserInfo.getUnionId()); |
|
|
|
|
|
|
|
// 党员提交,验证身份证号
|
|
|
|
if (YesOrNoEnum.YES.value().equals(userDto.getPartyFlag())) { |
|
|
|
String identityNo = userDto.getIdentityNo(); |
|
|
|
@ -1011,9 +1010,9 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
throw new RenException("查询用户信息失败"); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(userDTOResult.getData().getWxUnionId())) { |
|
|
|
result.setData("1"); |
|
|
|
result.setData(YesOrNoEnum.YES.value()); |
|
|
|
} else { |
|
|
|
result.setData("0"); |
|
|
|
result.setData(YesOrNoEnum.NO.value()); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|