|
|
|
@ -283,11 +283,11 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
// 组装用户注册信息
|
|
|
|
EpdcGridLeaderRegisterDTO gridLeaderRegister = this.packageGridLeaderWhileRegister(leaderRegisterDto.getSysUser(), formDto.getWxCode()); |
|
|
|
List<UserGridRelationDTO> userGridList = ConvertUtils.sourceToTarget(leaderRegisterDto.getLeaderGridList(), UserGridRelationDTO.class); |
|
|
|
for(UserGridRelationDTO item: userGridList){ |
|
|
|
item.setAllDeptNames(item.getDistrict()+"-"+item.getStreet()+"-"+item.getCommunity()+"-"+item.getGrid()); |
|
|
|
item.setAllDeptIds(item.getDistrictId()+","+item.getStreetId()+","+item.getCommunityId()+","+item.getGridId()); |
|
|
|
item.setParentDeptIds(item.getDistrict()+"-"+item.getStreet()+"-"+item.getCommunity()); |
|
|
|
item.setParentDeptNames(item.getDistrictId()+","+item.getStreetId()+","+item.getCommunityId()); |
|
|
|
for (UserGridRelationDTO item : userGridList) { |
|
|
|
item.setAllDeptNames(item.getDistrict() + "-" + item.getStreet() + "-" + item.getCommunity() + "-" + item.getGrid()); |
|
|
|
item.setAllDeptIds(item.getDistrictId() + "," + item.getStreetId() + "," + item.getCommunityId() + "," + item.getGridId()); |
|
|
|
item.setParentDeptIds(item.getDistrict() + "-" + item.getStreet() + "-" + item.getCommunity()); |
|
|
|
item.setParentDeptNames(item.getDistrictId() + "," + item.getStreetId() + "," + item.getCommunityId()); |
|
|
|
} |
|
|
|
EpdcGridLeaderRegisterFormDTO registerDto = new EpdcGridLeaderRegisterFormDTO(); |
|
|
|
registerDto.setGridLeader(gridLeaderRegister); |
|
|
|
@ -804,7 +804,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
return new Result().error(verification); |
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
userDto.setIdentityNo(null); |
|
|
|
} |
|
|
|
// 验证手机号
|
|
|
|
@ -827,7 +827,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
Result<UserDTO> completeResult = userFeignClient.completeUserInfo(dto); |
|
|
|
if (!completeResult.success()) { |
|
|
|
//党员认证失败
|
|
|
|
if(100006001==completeResult.getCode()){ |
|
|
|
if (100006001 == completeResult.getCode()) { |
|
|
|
EpdcAppAuthorizationDTO authorizationDto = new EpdcAppAuthorizationDTO(); |
|
|
|
authorizationDto.setResultCode(YesOrNoEnum.YES.value()); |
|
|
|
authorizationDto.setResultMsg(completeResult.getMsg()); |
|
|
|
@ -867,7 +867,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
if (result.success() && null != result.getData()) { |
|
|
|
EpdcCompleteUserInfoDTO dto = ConvertUtils.sourceToTarget(result.getData(), EpdcCompleteUserInfoDTO.class); |
|
|
|
if (("0").equals(result.getData().getState())) { |
|
|
|
dto.setGridId(tokenDto.getGridId()); |
|
|
|
dto.setGridId(tokenDto.getGridId()); |
|
|
|
//未完善信息获取用户当前所在的网格的后两级机构(社区-网格),返回给前端
|
|
|
|
Result<ParentAndAllDeptDTO> resultParentAndAllDeptDTO = adminFeignClient.getParentAndAllDept(dto.getGridId()); |
|
|
|
if (resultParentAndAllDeptDTO.success() && null != resultParentAndAllDeptDTO.getData()) { |
|
|
|
@ -963,9 +963,15 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
} |
|
|
|
String sessionKey = this.getUserSessionKey(formDto.getWxCode()); |
|
|
|
WxMaUserInfo wxMaUserInfo = wxMaServiceUtils.normalWxMaService().getUserService().getUserInfo(sessionKey, formDto.getEncryptedData(), formDto.getIv()); |
|
|
|
if (StringUtils.isBlank(wxMaUserInfo.getUnionId())) { |
|
|
|
// 标准文案后续修改
|
|
|
|
return new Result().error("微信接口异常"); |
|
|
|
// 是否需要unionId,0 否 1 是
|
|
|
|
Object requireUnionid = redisUtils.get("epdc:unionid:require"); |
|
|
|
if (null != requireUnionid && YesOrNoEnum.NO.value().equals(requireUnionid.toString())) { |
|
|
|
log.info("更新用户微信信息,不考虑微信unionid"); |
|
|
|
} else { |
|
|
|
if (StringUtils.isBlank(wxMaUserInfo.getUnionId())) { |
|
|
|
// 标准文案后续修改
|
|
|
|
return new Result().error("微信接口异常"); |
|
|
|
} |
|
|
|
} |
|
|
|
UserDTO userDTO = new UserDTO(); |
|
|
|
userDTO.setId(userDetail.getUserId()); |
|
|
|
@ -1031,7 +1037,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
*/ |
|
|
|
private void joinGridPartyGroup(UserDTO userDto, List<UserGridRelationDTO> userGridList, String lordFlag) { |
|
|
|
List<GroupUserFormDTO> formDTOList = new ArrayList<>(userGridList.size()); |
|
|
|
for (UserGridRelationDTO dto: |
|
|
|
for (UserGridRelationDTO dto : |
|
|
|
userGridList) { |
|
|
|
GroupUserFormDTO formDto = new GroupUserFormDTO(); |
|
|
|
formDto.setUserId(userDto.getId()); |
|
|
|
|