From 239927b057f65a040594f7a4cb08c8881b303797 Mon Sep 17 00:00:00 2001
From: cjl <276999030@qq.com>
Date: Fri, 18 Aug 2023 14:52:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cjl-230812' into cjl-230812
---
screen-api/src/main/java/com/moral/api/controller/GroupController.java | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/controller/GroupController.java b/screen-api/src/main/java/com/moral/api/controller/GroupController.java
index 9dacceb..eb3efcc 100644
--- a/screen-api/src/main/java/com/moral/api/controller/GroupController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/GroupController.java
@@ -12,12 +12,12 @@
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.moral.api.entity.Group;
import com.moral.api.service.GroupService;
@@ -103,20 +103,19 @@
return ResultMessage.ok(pageResult);
}
- @ApiOperation(value = "���������������������ids", notes = "���������������������ids")
+ @ApiOperation(value = "���������������������������", notes = "���������������������������")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "������id", required = true, paramType = "query", dataType = "int"),
@ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String")
})
- @RequestMapping(value = "getGroupIds", method = RequestMethod.GET)
- public ResultMessage getGroupIds(Integer userId) {
- System.out.println(userId);
- if (userId == null) {
+ @RequestMapping(value = "getGroup", method = RequestMethod.GET)
+ public ResultMessage getGroup(Integer userId) {
+ if (ObjectUtils.isEmpty(userId)) {
return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(),
ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
}
- List<Integer> groupIds = userGroupService.getGroupIds(userId);
- return ResultMessage.ok(groupIds);
+ Map<String, Object> group = groupService.getGroup(userId);
+ return ResultMessage.ok(group);
}
@ApiOperation(value = "���������������", notes = "���������������")
--
Gitblit v1.8.0