Pārlūkot izejas kodu

修改put和delete请求

Administrator 2 gadi atpakaļ
vecāks
revīzija
104cc5e233

+ 2 - 2
boman-api/boman-api-system/src/main/java/com/boman/system/api/RemoteSysMenuService.java

@@ -39,10 +39,10 @@ public interface RemoteSysMenuService {
      * @param id
      * @return
      */
-    @DeleteMapping("/menu/remove/{id}")
+    @GetMapping("/menu/remove/{id}")
     public AjaxResult remove(@PathVariable("id") Long id);
 
-    @PutMapping("/menu")
+    @PostMapping("/menu/put")
     public AjaxResult edit(@Validated @RequestBody SysMenu menu);
 
 

+ 1 - 1
boman-auth/src/main/java/com/boman/auth/controller/TokenController.java

@@ -117,7 +117,7 @@ public class TokenController {
         return sysLoginService.phoneScanLogin(form);
     }
 
-    @DeleteMapping("logout")
+    @GetMapping("logout")
     public R<?> logout(HttpServletRequest request) {
         LoginUser loginUser = tokenService.getLoginUser(request);
         if (StringUtils.isNotNull(loginUser)) {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
boman-common/boman-common-security/src/main/java/com/boman/common/security/service/TokenService.java


+ 2 - 2
boman-modules/boman-gen/src/main/java/com/boman/gen/controller/GenController.java

@@ -139,7 +139,7 @@ public class GenController extends BaseController {
      */
     @PreAuthorize(hasPermi = "tool:gen:edit")
     @Log(title = "代码生成", businessType = BusinessType.UPDATE)
-    @PutMapping
+    @PostMapping("/put")
     public AjaxResult editSave(@Validated @RequestBody GenTable genTable) {
         genTableService.validateEdit(genTable);
         genTableService.updateGenTable(genTable);
@@ -152,7 +152,7 @@ public class GenController extends BaseController {
      */
     @PreAuthorize(hasPermi = "tool:gen:remove")
     @Log(title = "代码生成", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{tableIds}")
+    @GetMapping("/delete/{tableIds}")
     public AjaxResult remove(@PathVariable Long[] tableIds) {
         genTableService.deleteGenTableByIds(tableIds);
         //loadTableServer.loadTable(new GenTable());

+ 2 - 2
boman-modules/boman-gen/src/main/java/com/boman/gen/controller/GenTableColumnController.java

@@ -65,7 +65,7 @@ public class GenTableColumnController extends BaseController {
     * @Date 2021/3/24
     */
     @Log(title = "修改业务表字段", businessType = BusinessType.UPDATE)
-    @PutMapping
+    @PostMapping("/put")
     public AjaxResult edit(@Validated @RequestBody GenTableColumn genTableColumn)
     {
         genTableColumn.setUpdateBy(SecurityUtils.getUsername());
@@ -76,7 +76,7 @@ public class GenTableColumnController extends BaseController {
      * 删除表字段
      */
     @Log(title = "删除表字段", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{columnIds}")
+    @GetMapping("/delete/{columnIds}")
     public AjaxResult remove(@PathVariable String columnIds)
     {
         return toAjax(genTableColumnService.deleteGenTableColumnByColumnIds(columnIds));

+ 2 - 2
boman-modules/boman-gen/src/main/java/com/boman/gen/controller/GenTableRelationController.java

@@ -57,7 +57,7 @@ public class GenTableRelationController extends BaseController {
     /**
      * 修改关联关系表
      */
-    @PutMapping
+    @PostMapping("/put")
     public AjaxResult edit(@Validated @RequestBody GenTableRelation genTableRelation)
     {
 
@@ -68,7 +68,7 @@ public class GenTableRelationController extends BaseController {
     /**
      * 删除关联关系表
      */
-    @DeleteMapping("/{ids}")
+    @GetMapping("/delete/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)
     {
         return toAjax(genTableRelationService.deleteGenTableRelation(ids));

+ 5 - 5
boman-modules/boman-job/src/main/java/com/boman/job/controller/SysJobController.java

@@ -94,7 +94,7 @@ public class SysJobController extends BaseController
      */
     @PreAuthorize(hasPermi = "monitor:job:edit")
     @Log(title = "定时任务", businessType = BusinessType.UPDATE)
-    @PutMapping
+    @PostMapping("/put")
     public AjaxResult edit(@RequestBody SysJob sysJob) throws SchedulerException, TaskException
     {
         if (!CronUtils.isValid(sysJob.getCronExpression()))
@@ -110,7 +110,7 @@ public class SysJobController extends BaseController
      */
     @PreAuthorize(hasPermi = "monitor:job:changeStatus")
     @Log(title = "定时任务", businessType = BusinessType.UPDATE)
-    @PutMapping("/changeStatus")
+    @PostMapping("/changeStatus")
     public AjaxResult changeStatus(@RequestBody SysJob job) throws SchedulerException
     {
         SysJob newJob = jobService.selectJobById(job.getJobId());
@@ -121,9 +121,9 @@ public class SysJobController extends BaseController
     /**
      * 定时任务立即执行一次
      */
-    @PreAuthorize(hasPermi = "monitor:job:changeStatus")
+    @PreAuthorize(hasPermi = "monitor:job:run")
     @Log(title = "定时任务", businessType = BusinessType.UPDATE)
-    @PutMapping("/run")
+    @PostMapping("/run")
     public AjaxResult run(@RequestBody SysJob job) throws SchedulerException
     {
         jobService.run(job);
@@ -135,7 +135,7 @@ public class SysJobController extends BaseController
      */
     @PreAuthorize(hasPermi = "monitor:job:remove")
     @Log(title = "定时任务", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{jobIds}")
+    @GetMapping("/delete/{jobIds}")
     public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
     {
         jobService.deleteJobByIds(jobIds);

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels