StaffPurviewController.java 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package com.dk.mdm.controller.mst;
  2. import com.dk.common.response.ResponseResultVO;
  3. import com.dk.mdm.model.pojo.mst.StaffPurview;
  4. import com.dk.common.controller.BaseController;
  5. import com.dk.common.service.BaseService;
  6. import com.dk.mdm.model.vo.mst.StaffVO;
  7. import com.dk.mdm.service.mst.StaffService;
  8. import io.swagger.annotations.ApiOperation;
  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.beans.factory.annotation.Autowired;
  13. import org.springframework.web.bind.annotation.RestController;
  14. import io.swagger.annotations.Api;
  15. import com.dk.mdm.service.mst.StaffPurviewService;
  16. import java.util.Map;
  17. /**
  18. * @desc : 员工数据范围API接口
  19. * @author : 姜永辉
  20. * @date : 2023/1/4 9:25
  21. */
  22. @Api(tags = "员工数据范围API接口")
  23. @RestController
  24. @RequestMapping("/mst/staff_purview")
  25. public class StaffPurviewController{
  26. public BaseService<StaffPurview> getService() {
  27. return staffPurviewService;
  28. }
  29. @Autowired
  30. private StaffPurviewService staffPurviewService;
  31. @Autowired
  32. private StaffService staffService;
  33. /**
  34. * @desc : 员工数据范围
  35. * @author : 姜永辉
  36. * @date : 2024/2/26 10:36
  37. */
  38. @ApiOperation(
  39. value = "获取员工权限",
  40. notes = "获取员工权限"
  41. )
  42. @PostMapping("get_staff_purview")
  43. public ResponseResultVO<Map<String, Object>> getStaffPurview(@RequestBody Map<String, Object> param) {
  44. return staffPurviewService.getStaffPurview(param);
  45. }
  46. /**
  47. * @desc : 新建员工--员工数据范围
  48. * @author : 姜永辉
  49. * @date : 2023/1/9 10:48
  50. */
  51. @ApiOperation(value = "新建员工--权限", notes = "新建员工--权限")
  52. @PostMapping({"save_staff_purview"})
  53. public ResponseResultVO<?> saveStaffPurview(@RequestBody StaffVO staffVO) {
  54. return staffService.saveStaffPurview(staffVO);
  55. }
  56. }