SmartDepartmentControllerAPI.java 2.0 KB

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