|
|
@@ -5,8 +5,8 @@ import com.xunmei.common.core.web.domain.AjaxResult;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import com.xunmei.system.service.ISysJobService;
|
|
|
-import com.xunmei.system.domain.SysJob;
|
|
|
+import com.xunmei.system.service.IJobService;
|
|
|
+import com.xunmei.system.domain.Job;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.slf4j.Logger;
|
|
|
@@ -20,28 +20,28 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
|
- * SysJobController 前端控制器
|
|
|
+ * JobController 前端控制器
|
|
|
* </p>
|
|
|
*
|
|
|
* @author luojun
|
|
|
* @since 2023-08-04
|
|
|
*/
|
|
|
-@Api(tags = {"SysJobController"})
|
|
|
+@Api(tags = {"JobController"})
|
|
|
@RestController
|
|
|
-@RequestMapping("/sysJob")
|
|
|
-public class SysJobController {
|
|
|
+@RequestMapping("/job")
|
|
|
+public class JobController {
|
|
|
|
|
|
private Logger log = LoggerFactory.getLogger(getClass());
|
|
|
@Resource
|
|
|
- private ISysJobService sysJobService;
|
|
|
+ private IJobService jobService;
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "新增定时任务调度表")
|
|
|
- @RequiresPermissions("system:sysJob:add")
|
|
|
+ @RequiresPermissions("system:job:add")
|
|
|
@PostMapping("/add")
|
|
|
- public AjaxResult add(@RequestBody SysJob sysJob){
|
|
|
+ public AjaxResult add(@RequestBody Job job){
|
|
|
try {
|
|
|
- return sysJobService.add(sysJob);
|
|
|
+ return jobService.add(job);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|
|
|
return error();
|
|
|
@@ -49,11 +49,11 @@ public class SysJobController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除定时任务调度表")
|
|
|
- @RequiresPermissions("system:sysJob:delete")
|
|
|
+ @RequiresPermissions("system:job:delete")
|
|
|
@DeleteMapping("/{id}")
|
|
|
public AjaxResult delete(@PathVariable("id") Long id){
|
|
|
try {
|
|
|
- return sysJobService.delete(id);
|
|
|
+ return jobService.delete(id);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|
|
|
return error();
|
|
|
@@ -61,11 +61,11 @@ public class SysJobController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "更新定时任务调度表")
|
|
|
- @RequiresPermissions("system:sysJob:update")
|
|
|
+ @RequiresPermissions("system:job:update")
|
|
|
@PutMapping("/update")
|
|
|
- public AjaxResult update(@RequestBody SysJob sysJob){
|
|
|
+ public AjaxResult update(@RequestBody Job job){
|
|
|
try {
|
|
|
- return sysJobService.updateData(sysJob);
|
|
|
+ return jobService.updateData(job);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|
|
|
return error();
|
|
|
@@ -73,11 +73,11 @@ public class SysJobController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "查询定时任务调度表分页数据")
|
|
|
- @RequiresPermissions("system:sysJob:findByPage")
|
|
|
+ @RequiresPermissions("system:job:findByPage")
|
|
|
@GetMapping("/findByPage")
|
|
|
- public AjaxResult findListByPage(Page<SysJob> page,SysJob sysJob){
|
|
|
+ public AjaxResult findListByPage(Page<Job> page,Job job){
|
|
|
try {
|
|
|
- return sysJobService.findListByPage(page, sysJob);
|
|
|
+ return jobService.findListByPage(page, job);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|
|
|
return error();
|
|
|
@@ -85,11 +85,11 @@ public class SysJobController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "id查询定时任务调度表")
|
|
|
- @RequiresPermissions("system:sysJob:findById")
|
|
|
+ @RequiresPermissions("system:job:findById")
|
|
|
@GetMapping("/{id}")
|
|
|
public AjaxResult findById(@PathVariable Long id){
|
|
|
try {
|
|
|
- return sysJobService.findById(id);
|
|
|
+ return jobService.findById(id);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|
|
|
return error();
|