From ccf75464534965c47866449b2b4e457a6dadede9 Mon Sep 17 00:00:00 2001
From: liriming <1343021927@qq.com>
Date: 星期一, 14 十月 2024 14:13:00 +0800
Subject: [PATCH] 定时任务权限修改

---
 shasteel-biz/src/main/java/com/iailab/module/shasteel/job/controller/admin/ScheduleJobController.java |   22 ++++++----------------
 1 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/controller/admin/ScheduleJobController.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/controller/admin/ScheduleJobController.java
index 9b647fb..d2e8659 100644
--- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/controller/admin/ScheduleJobController.java
+++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/controller/admin/ScheduleJobController.java
@@ -1,6 +1,5 @@
 package com.iailab.module.shasteel.job.controller.admin;
 
-import com.iailab.framework.common.constant.Constant;
 import com.iailab.framework.common.pojo.CommonResult;
 import com.iailab.framework.common.pojo.PageResult;
 import com.iailab.framework.common.util.object.BeanUtils;
@@ -14,8 +13,6 @@
 import com.iailab.module.shasteel.job.service.ScheduleJobService;
 import com.iailab.module.shasteel.job.vo.ScheduleJobReqVO;
 import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
@@ -31,7 +28,7 @@
  * @author Mark sunlightcs@gmail.com
  */
 @RestController
-@RequestMapping("/job/schedule")
+@RequestMapping("/shasteel/job/schedule")
 @Tag(name = "定时任务")
 public class ScheduleJobController {
 	@Resource
@@ -39,14 +36,7 @@
 
 	@GetMapping("page")
 	@Operation(summary = "分页")
-	@Parameters({
-		@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", required = true) ,
-		@Parameter(name = Constant.LIMIT, description = "每页显示记录数", required = true) ,
-		@Parameter(name = Constant.ORDER_FIELD, description = "排序字段") ,
-		@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") ,
-		@Parameter(name = "beanName", description = "beanName")
-	})
-	@PreAuthorize("@ss.hasPermission('data:schedule:query')")
+	@PreAuthorize("@ss.hasPermission('shasteel:schedule:query')")
 	public CommonResult<PageResult<ScheduleJobDTO>> page(@Validated ScheduleJobReqVO reqVO){
 		reqVO.setTenantId(TenantContextHolder.getTenantId());
 		PageResult<ScheduleJobEntity> page = scheduleJobService.page(reqVO);
@@ -56,7 +46,7 @@
 
 	@GetMapping("info")
 	@Operation(summary = "信息")
-	@PreAuthorize("@ss.hasPermission('data:schedule:query')")
+	@PreAuthorize("@ss.hasPermission('shasteel:schedule:query')")
 	public CommonResult<ScheduleJobDTO> info(@RequestParam("id") Long id){
 		ScheduleJobDTO schedule = scheduleJobService.get(id);
 		
@@ -65,7 +55,7 @@
 
 	@PostMapping("/create")
 	@Operation(summary = "保存")
-	@PreAuthorize("@ss.hasPermission('data:schedule:create')")
+	@PreAuthorize("@ss.hasPermission('shasteel:schedule:create')")
 	public CommonResult save(@RequestBody ScheduleJobDTO dto){
 		ValidationUtils.validate(dto, AddGroup.class, DefaultGroup.class);
 		
@@ -76,7 +66,7 @@
 
 	@PutMapping("/update")
 	@Operation(summary = "修改")
-	@PreAuthorize("@ss.hasPermission('data:schedule:update')")
+	@PreAuthorize("@ss.hasPermission('shasteel:schedule:update')")
 	public CommonResult update(@RequestBody ScheduleJobDTO dto){
 		ValidationUtils.validate(dto, UpdateGroup.class, DefaultGroup.class);
 				
@@ -87,7 +77,7 @@
 
 	@DeleteMapping("/delete")
 	@Operation(summary = "删除")
-	@PreAuthorize("@ss.hasPermission('data:schedule:delete')")
+	@PreAuthorize("@ss.hasPermission('shasteel:schedule:delete')")
 	public CommonResult delete(@RequestParam("id") Long id){
 		scheduleJobService.deleteBatch(id);
 		

--
Gitblit v1.9.3