diff --git a/autoplan-front b/autoplan-front index 44e1f0a..432642f 160000 --- a/autoplan-front +++ b/autoplan-front @@ -1 +1 @@ -Subproject commit 44e1f0a198dd2687bdb40f86c5f59adb1b50d1de +Subproject commit 432642f4546a3a507786cb75059e18cd36e69b60 diff --git a/src/main/java/com/github/system/auth/controller/LoginController.java b/src/main/java/com/github/system/auth/controller/LoginController.java index 7caeb73..1514515 100644 --- a/src/main/java/com/github/system/auth/controller/LoginController.java +++ b/src/main/java/com/github/system/auth/controller/LoginController.java @@ -11,9 +11,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; @@ -33,14 +31,14 @@ public class LoginController { private UserService userService; @ApiOperation("用户名密码登录") - @RequestMapping("/formLogin") + @PostMapping("/formLogin") @SaIgnore public AjaxResult formLogin(@Validated @RequestBody LoginModel loginModel) { return loginService.formLogin(loginModel); } @ApiOperation("获取图形验证码") - @RequestMapping("/getImageCaptcha") + @GetMapping("/getImageCaptcha") @SaIgnore public void getImageCaptcha(HttpServletResponse response) throws IOException { loginService.getValidCode(response); @@ -63,7 +61,7 @@ public AjaxResult me() { } @ApiOperation("修改密码") - @RequestMapping("/editSelfPassword") + @PostMapping("/editSelfPassword") public AjaxResult editSelfPassword(@RequestBody SysUserVo sysUserVo) { if (StrUtil.isBlank(sysUserVo.getPassword())) { return AjaxResult.doError("密码不能为空!"); diff --git a/src/main/java/com/github/system/auth/controller/RegController.java b/src/main/java/com/github/system/auth/controller/RegController.java index ea66cd2..22110d6 100644 --- a/src/main/java/com/github/system/auth/controller/RegController.java +++ b/src/main/java/com/github/system/auth/controller/RegController.java @@ -5,6 +5,7 @@ import com.github.system.auth.vo.RegModel; import com.github.system.base.dto.AjaxResult; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -19,7 +20,7 @@ public class RegController { private RegService regService; @SaIgnore - @RequestMapping("/doReg") + @PostMapping("/doReg") public AjaxResult doReg(@RequestBody @Validated RegModel regModel) { return regService.doReg(regModel); } diff --git a/src/main/java/com/github/system/base/controller/SysConfigController.java b/src/main/java/com/github/system/base/controller/SysConfigController.java index 4aeeecb..a17ea95 100644 --- a/src/main/java/com/github/system/base/controller/SysConfigController.java +++ b/src/main/java/com/github/system/base/controller/SysConfigController.java @@ -24,8 +24,8 @@ public class SysConfigController { @Resource private SysConfigService sysConfigService; - @RequestMapping("/page") - public Page page(@RequestBody Page page) { + @GetMapping("/page") + public Page page(Page page) { return sysConfigService.page(page); } diff --git a/src/main/java/com/github/system/base/controller/SysUserController.java b/src/main/java/com/github/system/base/controller/SysUserController.java index 1443ce3..d661fdc 100644 --- a/src/main/java/com/github/system/base/controller/SysUserController.java +++ b/src/main/java/com/github/system/base/controller/SysUserController.java @@ -24,8 +24,8 @@ public class SysUserController { private UserService userService; @ApiOperation("分页查询") - @RequestMapping("/page") - public Page page(@RequestBody Page page, @RequestBody SysUserVo sysUserVo) { + @GetMapping("/page") + public Page page(Page page, SysUserVo sysUserVo) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.select(SysUser.class, i -> !"password".equals(i.getProperty())); lambdaQueryWrapper.eq(StrUtil.isNotEmpty(sysUserVo.getUsername()), SysUser::getUsername, sysUserVo.getUsername()); @@ -43,7 +43,7 @@ public AjaxResult delete(@PathVariable Long id) { } @ApiOperation("更新") - @RequestMapping("/update") + @PostMapping("/update") public AjaxResult update(@RequestBody SysUserVo sysUserVo) { if (userService.checkIfAdmin(sysUserVo.getId())) { return AjaxResult.doError("不能修改管理员用户!"); @@ -52,7 +52,7 @@ public AjaxResult update(@RequestBody SysUserVo sysUserVo) { } @ApiOperation("新增") - @RequestMapping("/save") + @PostMapping("/save") public AjaxResult save(@RequestBody SysUserVo sysUserVo) { return AjaxResult.status(userService.saveUser(sysUserVo)); } diff --git a/src/main/java/com/github/system/quartz/controller/QuartzJobController.java b/src/main/java/com/github/system/quartz/controller/QuartzJobController.java index c93ff31..8764fb8 100644 --- a/src/main/java/com/github/system/quartz/controller/QuartzJobController.java +++ b/src/main/java/com/github/system/quartz/controller/QuartzJobController.java @@ -30,9 +30,9 @@ public class QuartzJobController { private SysQuartzJobService sysQuartzJobService; - @RequestMapping("/page") + @GetMapping("/page") @ApiOperation("定时任务调度分页查询") - public Page page(@RequestBody Page page, SysQuartzJobVo sysQuartzJobVo) { + public Page page(Page page, SysQuartzJobVo sysQuartzJobVo) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.eq(StrUtil.isNotEmpty(sysQuartzJobVo.getJobName()), SysQuartzJob::getJobName, sysQuartzJobVo.getJobName()); lambdaQueryWrapper.eq(sysQuartzJobVo.getStatus() != null, SysQuartzJob::getStatus, sysQuartzJobVo.getStatus()); diff --git a/src/main/java/com/github/system/quartz/controller/QuartzJobLogController.java b/src/main/java/com/github/system/quartz/controller/QuartzJobLogController.java index 47a16d7..568044e 100644 --- a/src/main/java/com/github/system/quartz/controller/QuartzJobLogController.java +++ b/src/main/java/com/github/system/quartz/controller/QuartzJobLogController.java @@ -27,9 +27,9 @@ public class QuartzJobLogController { private SysQuartzJobLogService sysQuartzJobLogService; - @RequestMapping("/page") + @GetMapping("/page") @ApiOperation("定时任务调度日志表集合查询") - public Page page(@RequestBody Page page, @RequestBody(required = false) SysQuartzJobVo sysQuartzJobVo) { + public Page page(Page page, SysQuartzJobVo sysQuartzJobVo) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); List excludeField = List.of("exceptionInfo"); lambdaQueryWrapper.select(SysQuartzJobLog.class, i -> !excludeField.contains(i.getProperty())); diff --git a/src/main/java/com/github/system/task/controller/AutoIndexController.java b/src/main/java/com/github/system/task/controller/AutoIndexController.java index 35fda91..1c7c4ca 100644 --- a/src/main/java/com/github/system/task/controller/AutoIndexController.java +++ b/src/main/java/com/github/system/task/controller/AutoIndexController.java @@ -24,7 +24,7 @@ public class AutoIndexController { private AutoIndexService autoIndexService; @ApiOperation("列表") - @RequestMapping("/list") + @GetMapping("/list") public List list() { return autoIndexService.userList(); } @@ -60,15 +60,15 @@ public List getSettingColumn(@PathVariable String indexId) } @ApiOperation("管理员分页列表") - @RequestMapping("/admin/page") + @GetMapping("/admin/page") @SaCheckRole("ADMIN") - public Page adminPage(@RequestBody Page page) { + public Page adminPage(Page page) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); return autoIndexService.page(page, lambdaQueryWrapper); } @ApiOperation("修改") - @RequestMapping("/admin/update") + @PostMapping("/admin/update") @SaCheckRole("ADMIN") public AjaxResult adminUpdate(@RequestBody AutoIndex autoIndex) { if (autoIndexService.updateById(autoIndex)) { @@ -78,7 +78,7 @@ public AjaxResult adminUpdate(@RequestBody AutoIndex autoIndex) { } @ApiOperation("修改开启状态") - @RequestMapping("/admin/changeEnable") + @PostMapping("/admin/changeEnable") @SaCheckRole("ADMIN") public AjaxResult adminChangeEnable(@RequestBody AutoIndex autoIndex) { AutoIndex entity = autoIndexService.getById(autoIndex.getId()); diff --git a/src/main/java/com/github/system/task/controller/AutoTaskController.java b/src/main/java/com/github/system/task/controller/AutoTaskController.java index 25d3dda..f0818b0 100644 --- a/src/main/java/com/github/system/task/controller/AutoTaskController.java +++ b/src/main/java/com/github/system/task/controller/AutoTaskController.java @@ -21,14 +21,14 @@ public class AutoTaskController { private AutoTaskService autoTaskService; @ApiOperation("任务分页查询") - @RequestMapping("/{indexId}/page") - public Page taskPage(@RequestBody Page page, @PathVariable String indexId) throws Exception { + @GetMapping("/{indexId}/page") + public Page taskPage(Page page, @PathVariable String indexId) throws Exception { return autoTaskService.taskPage(page, indexId); } @ApiOperation("我的任务列表分页") - @RequestMapping("/mine/page") - public Page minePage(@RequestBody Page page) throws Exception { + @GetMapping("/mine/page") + public Page minePage(Page page) throws Exception { return autoTaskService.minePage(page); } @@ -59,25 +59,25 @@ public AjaxResult run(@PathVariable Long taskId) throws Exception { } @ApiOperation("校验任务") - @RequestMapping("/{indexId}/check") + @PostMapping("/{indexId}/check") public AjaxResult checkUser(@PathVariable Long indexId, @RequestBody AutoTaskVo autoTaskVo) throws Exception { return AjaxResult.doSuccess(autoTaskService.checkOrSaveUser(indexId, autoTaskVo, false)); } @ApiOperation("校验任务并保存") - @RequestMapping("/{indexId}/checkAndSave") + @PostMapping("/{indexId}/checkAndSave") public AjaxResult checkUserAndSave(@PathVariable Long indexId, @RequestBody AutoTaskVo autoTaskVo) throws Exception { return AjaxResult.doSuccess(autoTaskService.checkOrSaveUser(indexId, autoTaskVo, true)); } @ApiOperation("校验任务并更新") - @RequestMapping("/checkAndUpdate") + @PostMapping("/checkAndUpdate") public AjaxResult checkUserAndSave(@RequestBody AutoTaskVo autoTaskVo) throws Exception { return AjaxResult.doSuccess(autoTaskService.checkAndUpdate(autoTaskVo, true)); } @ApiOperation("编辑情况下的校验任务") - @RequestMapping("/checkUserWithTask") + @PostMapping("/checkUserWithTask") public AjaxResult checkUserWithTask(@RequestBody AutoTaskVo autoTaskVo) throws Exception { return AjaxResult.doSuccess(autoTaskService.checkAndUpdate(autoTaskVo, false)); } diff --git a/src/main/java/com/github/system/task/controller/TaskLogController.java b/src/main/java/com/github/system/task/controller/TaskLogController.java index 69ee502..6ef4192 100644 --- a/src/main/java/com/github/system/task/controller/TaskLogController.java +++ b/src/main/java/com/github/system/task/controller/TaskLogController.java @@ -26,8 +26,8 @@ public class TaskLogController { @ApiOperation("列表") @SaCheckRole("ADMIN") - @RequestMapping("/list") - public Page list(@RequestBody Page page, @RequestBody HistoryTaskLogVo historyTaskLogVo) { + @GetMapping("/list") + public Page list(Page page, HistoryTaskLogVo historyTaskLogVo) { LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.select(HistoryTaskLog.class, i -> !"text".equals(i.getProperty())); lambdaQueryWrapper.eq(StrUtil.isNotEmpty(historyTaskLogVo.getType()), HistoryTaskLog::getType, historyTaskLogVo.getType());