|
|
@ -51,6 +51,8 @@ import javax.servlet.http.HttpServletRequest; |
|
|
|
import java.io.ByteArrayOutputStream; |
|
|
|
import java.io.File; |
|
|
|
import java.io.FileInputStream; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
@ -299,7 +301,7 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
EpdcAppAuthorizationDTO authorization = this.packageEpdcAppAuthorization(tokenDto, newAppUser.getGrid(), AppUserStatesEnum.STATE_REGISTERED.value()); |
|
|
|
|
|
|
|
// 网格长加入网格党员群并设置为群主
|
|
|
|
this.joinGridPartyGroup(newAppUser, newAppUser.getGridId(), NumConstant.ONE_STR); |
|
|
|
this.joinGridPartyGroup(newAppUser, userGridList, NumConstant.ONE_STR); |
|
|
|
|
|
|
|
return new Result().ok(authorization); |
|
|
|
} |
|
|
@ -727,7 +729,9 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
registeredUser = userResult.getUserDTO(); |
|
|
|
// 用户已认证为党员,绑定网格时加入该网格党员群
|
|
|
|
if (NumConstant.ONE_STR.equals(registeredUser.getPartyFlag())) { |
|
|
|
this.joinGridPartyGroup(registeredUser, userResult.getGridId(), NumConstant.ZERO_STR); |
|
|
|
UserGridRelationDTO userGridRelationDto = new UserGridRelationDTO(); |
|
|
|
userGridRelationDto.setGridId(userResult.getGridId()); |
|
|
|
this.joinGridPartyGroup(registeredUser, Collections.singletonList(userGridRelationDto), NumConstant.ZERO_STR); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -1010,7 +1014,10 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
* @author liuchuang |
|
|
|
* @since 2019/11/21 10:58 |
|
|
|
*/ |
|
|
|
private void joinGridPartyGroup(UserDTO userDto, Long gridId, String lordFlag) { |
|
|
|
private void joinGridPartyGroup(UserDTO userDto, List<UserGridRelationDTO> userGridList, String lordFlag) { |
|
|
|
List<GroupUserFormDTO> formDTOList = new ArrayList<>(userGridList.size()); |
|
|
|
for (UserGridRelationDTO dto: |
|
|
|
userGridList) { |
|
|
|
GroupUserFormDTO formDto = new GroupUserFormDTO(); |
|
|
|
formDto.setUserId(userDto.getId()); |
|
|
|
formDto.setNickname(userDto.getNickname()); |
|
|
@ -1019,8 +1026,11 @@ public class AppUserServiceImpl implements AppUserService { |
|
|
|
formDto.setPartyMember(userDto.getPartyFlag()); |
|
|
|
formDto.setState(GroupUserStateEnum.GROUP_USER_STATE_EXAMINATION_PASSED.getValue()); |
|
|
|
formDto.setLordFlag(lordFlag); |
|
|
|
formDto.setGridId(gridId); |
|
|
|
groupFeignClient.joinGridPartyGroup(formDto); |
|
|
|
formDto.setGridId(dto.getGridId()); |
|
|
|
formDTOList.add(formDto); |
|
|
|
} |
|
|
|
|
|
|
|
groupFeignClient.joinGridPartyGroup(formDTOList); |
|
|
|
// groupTask.joinGridPartyGroup(formDto);
|
|
|
|
} |
|
|
|
|
|
|
|