新项目信息界面-添加swagger

dev
wish 1 year ago
parent 827898a83f
commit c492700f6b
  1. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/newlayout/controller/NewProjectController.java

@ -2,6 +2,8 @@ package org.jeecg.modules.demo.newlayout.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
@ -27,6 +29,7 @@ import java.util.List;
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("/newprojectx/newprojectx") @RequestMapping("/newprojectx/newprojectx")
@Api(value = "新项目信息展示", tags = "新项目展示")
public class NewProjectController { public class NewProjectController {
@Autowired @Autowired
private IProjectxService projectService; private IProjectxService projectService;
@ -39,6 +42,7 @@ public class NewProjectController {
* @return {@link Result}<{@link ?}> * @return {@link Result}<{@link ?}>
*/ */
@GetMapping("/list") @GetMapping("/list")
@ApiOperation(value = "查询所有项目")
public Result<?> list(Projectx projectx, HttpServletRequest request) { public Result<?> list(Projectx projectx, HttpServletRequest request) {
QueryWrapper<Projectx> queryWrapper = QueryGenerator.initQueryWrapper( QueryWrapper<Projectx> queryWrapper = QueryGenerator.initQueryWrapper(
projectx, request.getParameterMap()); projectx, request.getParameterMap());
@ -56,6 +60,7 @@ public class NewProjectController {
* @return {@link Result}<{@link Page}<{@link ?}>> * @return {@link Result}<{@link Page}<{@link ?}>>
*/ */
@GetMapping("/page") @GetMapping("/page")
@ApiOperation(value = "分页查询所有项目信息")
public Result<Page<?>> page(@RequestParam(value = "page", defaultValue = "1") public Result<Page<?>> page(@RequestParam(value = "page", defaultValue = "1")
Integer page, Integer page,
@RequestParam(value = "pageSize", defaultValue = "5") @RequestParam(value = "pageSize", defaultValue = "5")
@ -79,6 +84,7 @@ public class NewProjectController {
* @return {@link Result}<{@link ProjectDto}> * @return {@link Result}<{@link ProjectDto}>
*/ */
@GetMapping("/queryById") @GetMapping("/queryById")
@ApiOperation("根据id查询项目信息")
public Result<ProjectDto> getProjectDtoById(Projectx projectx) { public Result<ProjectDto> getProjectDtoById(Projectx projectx) {
ProjectDto projectDto = projectService.queryDtoById(projectx); ProjectDto projectDto = projectService.queryDtoById(projectx);
return Result.OK(projectDto); return Result.OK(projectDto);

Loading…
Cancel
Save