瀏覽代碼

fix: 暂时先注释group功能

370774330@qq.com 5 年之前
父節點
當前提交
55dd8d4189

+ 21 - 21
web/src/main/java/seecoder/devcloud/web/service/impl/user/GroupServiceImp.java

@@ -67,26 +67,26 @@ public class GroupServiceImp implements GroupService {
     }
 
 
-    @Override
-    @Transactional
-    public GroupVO addMember(Integer userId, Integer invitedUserId, Integer groupId) throws EntityNotFoundException {
-        List<Integer> userIds = groupMemberMapper.selectUserIdsByGroupId(groupId);
-        if (!userIds.contains(userId)) {
-            throw new EntityNotFoundException("小组邀请发生错误,用户没有权限!");
-        }
-        if (userIds.contains(invitedUserId)) {
-            throw new RuntimeException("邀请的用户已经加入小组!");
-        }
-        try {
-            gitlabApi.addMemberToGroup(groupId, invitedUserId);
-        } catch (GitLabApiException e) {
-            throw new RuntimeException("将成员加入Group时发生异常[" + e.getMessage() + "]");
-        }
-        groupMemberMapper.insert(groupId,invitedUserId);
-        //todo 
-        return null;
-        }
-
-    }
+//    @Override
+//    @Transactional
+//    public GroupVO addMember(Integer userId, Integer invitedUserId, Integer groupId) throws EntityNotFoundException {
+//        List<Integer> userIds = groupMemberMapper.selectUserIdsByGroupId(groupId);
+//        if (!userIds.contains(userId)) {
+//            throw new EntityNotFoundException("小组邀请发生错误,用户没有权限!");
+//        }
+//        if (userIds.contains(invitedUserId)) {
+//            throw new RuntimeException("邀请的用户已经加入小组!");
+//        }
+//        try {
+//            gitlabApi.addMemberToGroup(groupId, invitedUserId);
+//        } catch (GitLabApiException e) {
+//            throw new RuntimeException("将成员加入Group时发生异常[" + e.getMessage() + "]");
+//        }
+//        groupMemberMapper.insert(groupId,invitedUserId);
+//        //todo
+//        return null;
+//        }
+//
+//    }
 
 }

+ 3 - 3
web/src/main/java/seecoder/devcloud/web/service/user/GroupService.java

@@ -21,7 +21,7 @@ public interface GroupService {
 
     GroupVO createGroup(String name,  Integer userId) throws EntityNotFoundException;
 
-    GroupVO addMember(String code, CustomUserDetails userDetails) throws EntityNotFoundException;
-
-    GroupVO getGroupsById(Integer groupId);
+//    GroupVO addMember(String code, CustomUserDetails userDetails) throws EntityNotFoundException;
+//
+//    GroupVO getGroupsById(Integer groupId);
 }