|
@@ -164,6 +164,11 @@ public class EnterpriseInviteRecordServiceImpl implements EnterpriseInviteRecord
|
|
|
// 不是管理员 不能操作加入
|
|
|
throw exception(ENTERPRISE_INVITE_RECORD_NOT_ADMIN);
|
|
|
}
|
|
|
+ if(userBind.getEnterpriseId()
|
|
|
+ .equals(invite.getEnterpriseId())) {
|
|
|
+ // 自己加入自己
|
|
|
+ throw exception(ENTERPRISE_INVITE_RECORD_EXIST_ENTERPRISE);
|
|
|
+ }
|
|
|
if (enterpriseService.checkHasParent(enterpriseId)) {
|
|
|
// 自己的公司已有所属上级
|
|
|
throw exception(ENTERPRISE_INVITE_RECORD_EXIST_PARENT);
|