|
|
@ -358,8 +358,16 @@ public class ProMemberService implements IProMemberService { |
|
|
|
if (ObjectUtil.isNull(proMember)) { |
|
|
|
throw new BaseException(CodeEnum.NOT_MEMBER); |
|
|
|
} |
|
|
|
//TODO 该成员是项目经理,且项目经理下只有他一个成员的时候,不能删除
|
|
|
|
//该成员是项目经理,且项目经理下只有他一个成员的时候,不能删除
|
|
|
|
List<Long> pmId = proRoleDao.getPmByByProjectId(proMember.getProjectId()); |
|
|
|
if(CollectionUtil.isNotEmpty(pmId)){ |
|
|
|
ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); |
|
|
|
memberRoleExample.createCriteria().andRoleIdEqualTo(pmId.get(0)).andMemberIdEqualTo(deleteMember.getMemberId()); |
|
|
|
long l = proMemberRoleDao.countByExample(memberRoleExample); |
|
|
|
if(l == 1){ |
|
|
|
throw new BaseException(CodeEnum.PM_NOT_MEMBER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//检查操作者的权限
|
|
|
|
int power = proRoleService.selectPowerByRoleName(currentUserId, proMember.getProjectId()); |
|
|
|