Browse Source

Revert "加群接口"

This reverts commit b8f4acce2e20393446ae14c80dc1787be7764da8.
liujc 1 year ago
parent
commit
ea68133145

+ 0 - 38
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/ImGroupController.java

@@ -28,10 +28,8 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.validation.Valid;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Objects;
-import java.util.Set;
 
 /**
  * 即时通讯群组(ImGroup)表控制层
@@ -71,42 +69,6 @@ public class ImGroupController extends BaseController {
         return succeed();
     }
 
-    @ApiOperation("创建群聊")
-    @PostMapping(value = "/create/v2")
-    public HttpResponseResult createV2(@Valid @RequestBody ImGroupWrapper.ImGroup imGroup, BindingResult bindingResult) throws Exception {
-
-        // 将imUserId 转为userId
-        Set<String> imUserIdList = imGroup.getImUserIdList();
-
-        Set<Long> studentIdList = new HashSet<>();
-        for (String imUserId : imUserIdList) {
-            studentIdList.add(Long.parseLong(imGroupService.analysisImUserId(imUserId)));
-        }
-        imGroup.setStudentIdList(studentIdList);
-
-        ValidationKit.ignoreFields(bindingResult,"id");
-        imGroup.setCreateBy(sysUserService.getUserId());
-        imGroupService.create(imGroup);
-        return succeed();
-    }
-
-    @ApiOperation("添加群成员")
-    @PostMapping(value = "/addGroupMember/v2")
-    public HttpResponseResult addGroupMemberV2(@Valid @RequestBody ImGroupWrapper.ImGroup imGroup,
-                                               BindingResult bindingResult) throws Exception {
-        // 将imUserId 转为userId
-        Set<String> imUserIdList = imGroup.getImUserIdList();
-
-        Set<Long> studentIdList = new HashSet<>();
-        for (String imUserId : imUserIdList) {
-            studentIdList.add(Long.parseLong(imGroupService.analysisImUserId(imUserId)));
-        }
-        imGroup.setStudentIdList(studentIdList);
-
-        imGroupService.addGroupMember(imGroup.getGroupId(), imGroup.getStudentIdList());
-        return succeed();
-    }
-
     @ApiOperation("解散群聊")
     @PostMapping(value = "/dismiss/{groupId}")
     public HttpResponseResult dismiss(@ApiParam(value = "群编号", required = true) @PathVariable("groupId") String groupId) throws Exception {