From 2573d09a4a305b7cb4ba9ab82daa8a8e2a4cdeb4 Mon Sep 17 00:00:00 2001 From: cjl <276999030@qq.com> Date: Tue, 26 Sep 2023 20:02:25 +0800 Subject: [PATCH] feat:补充提交 --- 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