|
|
@ -371,14 +371,18 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
|
@Override |
|
|
|
public void applyCreateGroup(ApplyCreateGroupFormDTO applyCreateGroupFormDTO) { |
|
|
|
// 查看是不是支部小组,在查询创建者是不是党员,不是党员就不走下面逻辑了
|
|
|
|
if (applyCreateGroupFormDTO.getGroupType().equals(ModuleConstant.GROUP_TYPE_BRANCH)){ |
|
|
|
Result<Boolean> booleanResult = epmetUserOpenFeignClient.selectIsPartyMemberByUserId(applyCreateGroupFormDTO.getUserId()); |
|
|
|
if (!booleanResult.success()){ |
|
|
|
throw new RenException(ModuleConstant.IS_PARTY_MEMBER_ERR); |
|
|
|
} |
|
|
|
if (!booleanResult.getData()){ |
|
|
|
throw new RenException(EpmetErrorCode.PARTY_MEMBER_CREATE_BRANCH_GROUP.getCode()); |
|
|
|
if (StringUtils.isNotEmpty(applyCreateGroupFormDTO.getGroupType())) { |
|
|
|
if (applyCreateGroupFormDTO.getGroupType().equals(ModuleConstant.GROUP_TYPE_BRANCH)) { |
|
|
|
Result<Boolean> booleanResult = epmetUserOpenFeignClient.selectIsPartyMemberByUserId(applyCreateGroupFormDTO.getUserId()); |
|
|
|
if (!booleanResult.success()) { |
|
|
|
throw new RenException(ModuleConstant.IS_PARTY_MEMBER_ERR); |
|
|
|
} |
|
|
|
if (!booleanResult.getData()) { |
|
|
|
throw new RenException(EpmetErrorCode.PARTY_MEMBER_CREATE_BRANCH_GROUP.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
applyCreateGroupFormDTO.setGroupType(ModuleConstant.GROUP_TYPE_ORDINARY); |
|
|
|
} |
|
|
|
//1、校验是否同名
|
|
|
|
List<ResiGroupEntity> resiGroupEntityList = this.getResiGroupEntityList(applyCreateGroupFormDTO); |
|
|
|