李昊 4 years ago
parent
commit
d83611db19

+ 2 - 0
gx_api/GxPress/Service/GxPress.Service.Implement/Group/GroupService.RemoveUser.cs

@@ -66,6 +66,8 @@ namespace GxPress.Service.Implement.Group
             }
             else
             {
+                if (groupUser.GroupUserRoleId == GroupUserRoleTyeConst.SuperAdmin)
+                    throw new BusinessException("你的身份是小组创建者,请先转让小组给他人,然后才能退出小组!");
                 query = Q.NewQuery();
                 query.Where(nameof(Entity.GroupUser.UserId), userId);
                 query.Where(nameof(Entity.GroupUser.GroupId), groupId);