ProjectController.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package com.wtkj.controller;
  2. import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
  3. import com.wtkj.entity.Project;
  4. import com.wtkj.service.IProjectService;
  5. import io.swagger.annotations.Api;
  6. import io.swagger.annotations.ApiOperation;
  7. import lombok.AllArgsConstructor;
  8. import org.springblade.core.tool.api.R;
  9. import org.springframework.web.bind.annotation.PostMapping;
  10. import org.springframework.web.bind.annotation.RequestBody;
  11. import org.springframework.web.bind.annotation.RequestMapping;
  12. import org.springframework.web.bind.annotation.RestController;
  13. /**
  14. * @author Blizzard
  15. * @create at 2023-09-13 15:50
  16. * @describe
  17. */
  18. @RestController
  19. @AllArgsConstructor
  20. @RequestMapping("/project")
  21. @Api(value = "项目模块", tags = "项目模块")
  22. public class ProjectController {
  23. private final IProjectService projectService;
  24. /**
  25. * 创建/修改项目
  26. */
  27. @PostMapping("/submit")
  28. @ApiOperation(value = "新建或者修改项目", notes = "传入project")
  29. @ApiOperationSupport(order = 1)
  30. public R<Boolean> create(@RequestBody Project project) {
  31. return R.status(projectService.saveOrUpdate(project));
  32. }
  33. }