浏览代码

小小训练营活动

zouxuan 3 年之前
父节点
当前提交
42b890744c

+ 2 - 2
mec-web/src/main/java/com/ym/mec/web/controller/ImGroupController.java

@@ -50,12 +50,12 @@ public class ImGroupController extends BaseController {
 
 	@ApiOperation("查询群列表")
 	@GetMapping(value = "/queryGroupList")
-	public HttpResponseResult<List<ImGroup>> queryGroupList(String search,String ignoreIds) {
+	public HttpResponseResult<List<ImGroup>> queryGroupList(String search) {
 		SysUser sysUser = sysUserFeignService.queryUserInfo();
 		if (Objects.isNull(sysUser)) {
 			return failed(HttpStatus.FORBIDDEN, "请登录");
 		}
-		return succeed(imGroupService.queryByUserId(sysUser.getId(), search,ignoreIds));
+		return succeed(imGroupService.queryByUserId(sysUser.getId(), search,null));
 	}
 
 	@ApiOperation("查询群详情")

+ 23 - 4
mec-web/src/main/java/com/ym/mec/web/controller/ImSendGroupMessageController.java

@@ -1,16 +1,21 @@
 package com.ym.mec.web.controller;
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.entity.ImGroup;
 import com.ym.mec.biz.dal.entity.ImSendGroupMessage;
+import com.ym.mec.biz.service.ImGroupService;
 import com.ym.mec.biz.service.ImSendGroupMessageService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Objects;
 
 @Api(tags = "群消息定时发送")
 @RequestMapping("imSendGroupMessage")
@@ -19,6 +24,10 @@ public class ImSendGroupMessageController extends BaseController {
 
     @Autowired
     private ImSendGroupMessageService imSendGroupMessageService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+    @Autowired
+    private ImGroupService imGroupService;
 
     @ApiOperation("发送群聊消息")
     @PostMapping(value = "/send")
@@ -40,4 +49,14 @@ public class ImSendGroupMessageController extends BaseController {
         imSendGroupMessageService.deleteGroupMessage(id);
         return succeed();
     }
+
+    @ApiOperation("查询群列表(没有在消息列表的)")
+    @GetMapping(value = "/queryGroupList")
+    public HttpResponseResult<List<ImGroup>> queryGroupList(String search,String ignoreIds) {
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if (Objects.isNull(sysUser)) {
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+        return succeed(imGroupService.queryByUserId(sysUser.getId(), search,ignoreIds));
+    }
 }