SmartDepartmentControllerAPI.java 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package com.template.api;
  2. import com.fasterxml.jackson.core.JsonProcessingException;
  3. import com.template.model.pojo.SmartDepartment;
  4. import com.template.model.request.insertDepartmentRequest;
  5. import com.template.model.request.updateDepartmentRequest;
  6. import com.template.model.result.CommonResult;
  7. import io.swagger.annotations.Api;
  8. import io.swagger.annotations.ApiOperation;
  9. import org.springframework.validation.BindingResult;
  10. import org.springframework.validation.annotation.Validated;
  11. import org.springframework.web.bind.annotation.*;
  12. import java.io.UnsupportedEncodingException;
  13. /**
  14. * @Author: binguo
  15. * @Date: 2023/3/30 星期四 17:28
  16. * @Description: com.video.api
  17. * @Version: 1.0
  18. */
  19. @RequestMapping("/api/smartDepartment")
  20. @Api(tags = {"SmartDepartmentControllerAPI"}, value = "部门")
  21. public interface SmartDepartmentControllerAPI {
  22. @PostMapping(value = "/insertSmartDepartment")
  23. @ApiOperation(value = "添加部门", notes = "添加部门数据", httpMethod = "POST")
  24. CommonResult insertSmartDepartment(@Validated @RequestBody insertDepartmentRequest smartApply, BindingResult bindingResult) throws Exception;
  25. @PostMapping(value = "/updateSmartDepartmentById")
  26. @ApiOperation(value = "编辑部门数据", notes = "编辑部门数据", httpMethod = "POST")
  27. CommonResult updateSmartDepartmentById(@Validated @RequestBody updateDepartmentRequest udr, BindingResult bindingResult) throws Exception;
  28. @GetMapping(value = "/queryPageSmartDepartment")
  29. @ApiOperation(value = "部门分页数据", notes = "部门分页数据", httpMethod = "GET")
  30. CommonResult queryPageSmartDepartments(@RequestParam int currentPage, @RequestParam int pageCount, String name);
  31. @GetMapping(value = "/deleteSmartDepartmentById")
  32. @ApiOperation(value = "根据ID删除指定部门", notes = "根据ID删除指定部门", httpMethod = "GET")
  33. CommonResult deleteSmartDepartmentById(@RequestParam int id);
  34. @GetMapping(value = "/queryDepartmentTree")
  35. @ApiOperation(value = "查询部门树形结构数据", notes = "查询部门树形结构数据", httpMethod = "GET")
  36. CommonResult queryDepartmentTree(String name, @RequestHeader("user_head") String userhead);
  37. @GetMapping(value = "/queryAllDepartmentTree")
  38. @ApiOperation(value = "查询所有部门树形结构数据", notes = "查询所有部门树形结构数据", httpMethod = "GET")
  39. CommonResult queryAllDepartmentTree(String name, @RequestHeader("user_head") String userhead);
  40. }