he2802 4 лет назад
Родитель
Сommit
d3ca31aa10

+ 13 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/system/SysDictTypeController.java

@@ -1,6 +1,9 @@
 package com.zhongzheng.controller.system;
 
 import java.util.List;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
@@ -28,6 +31,7 @@ import com.zhongzheng.modules.system.service.ISysDictTypeService;
  *
  * @author zhongzheng
  */
+@Api(tags ="字典管理")
 @RestController
 @RequestMapping("/system/dict/type")
 public class SysDictTypeController extends BaseController
@@ -35,6 +39,7 @@ public class SysDictTypeController extends BaseController
     @Autowired
     private ISysDictTypeService dictTypeService;
 
+    @ApiOperation("获取字典列表")
     @PreAuthorize("@ss.hasPermi('system:dict:list')")
     @GetMapping("/list")
     public TableDataInfo list(SysDictType dictType)
@@ -57,6 +62,7 @@ public class SysDictTypeController extends BaseController
     /**
      * 查询字典类型详细
      */
+    @ApiOperation("查询字典类型详细")
     @PreAuthorize("@ss.hasPermi('system:dict:query')")
     @GetMapping(value = "/{dictId}")
     public AjaxResult getInfo(@PathVariable Long dictId)
@@ -67,6 +73,7 @@ public class SysDictTypeController extends BaseController
     /**
      * 新增字典类型
      */
+    @ApiOperation("新增字典类型")
     @PreAuthorize("@ss.hasPermi('system:dict:add')")
     @Log(title = "字典类型", businessType = BusinessType.INSERT)
     @PostMapping
@@ -83,9 +90,10 @@ public class SysDictTypeController extends BaseController
     /**
      * 修改字典类型
      */
+    @ApiOperation("修改字典类型")
     @PreAuthorize("@ss.hasPermi('system:dict:edit')")
     @Log(title = "字典类型", businessType = BusinessType.UPDATE)
-    @PutMapping
+    @PostMapping("/edit")
     public AjaxResult edit(@Validated @RequestBody SysDictType dict)
     {
         if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
@@ -99,9 +107,10 @@ public class SysDictTypeController extends BaseController
     /**
      * 删除字典类型
      */
+    @ApiOperation("删除字典类型")
     @PreAuthorize("@ss.hasPermi('system:dict:remove')")
     @Log(title = "字典类型", businessType = BusinessType.DELETE)
-    @DeleteMapping("/{dictIds}")
+    @PostMapping("/delete/{dictIds}")
     public AjaxResult remove(@PathVariable Long[] dictIds)
     {
         return toAjax(dictTypeService.deleteDictTypeByIds(dictIds));
@@ -110,6 +119,7 @@ public class SysDictTypeController extends BaseController
     /**
      * 清空缓存
      */
+
     @PreAuthorize("@ss.hasPermi('system:dict:remove')")
     @Log(title = "字典类型", businessType = BusinessType.CLEAN)
     @DeleteMapping("/clearCache")
@@ -122,6 +132,7 @@ public class SysDictTypeController extends BaseController
     /**
      * 获取字典选择框列表
      */
+    @ApiOperation("获取字典选择框列表")
     @GetMapping("/optionselect")
     public AjaxResult optionselect()
     {

+ 2 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/system/SysMenuController.java

@@ -152,8 +152,8 @@ public class SysMenuController extends BaseController
     @ApiOperation("删除菜单")
     @PreAuthorize("@ss.hasPermi('system:menu:remove')")
     @Log(title = "菜单管理", businessType = BusinessType.DELETE)
-    @PostMapping("/delete")
-    public AjaxResult remove(@RequestBody Long menuId)
+    @PostMapping("/delete/{menuId}")
+    public AjaxResult remove(@PathVariable Long menuId)
     {
         if (menuService.hasChildByMenuId(menuId))
         {

+ 2 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/system/SysRoleController.java

@@ -171,8 +171,8 @@ public class SysRoleController extends BaseController
     @ApiOperation("删除角色")
     @PreAuthorize("@ss.hasPermi('system:role:remove')")
     @Log(title = "角色管理", businessType = BusinessType.DELETE)
-    @PostMapping("/delete")
-    public AjaxResult remove(@RequestBody Long[] roleIds)
+    @PostMapping("/delete/{roleIds}")
+    public AjaxResult remove(@PathVariable Long[] roleIds)
     {
         return toAjax(roleService.deleteRoleByIds(roleIds));
     }

+ 1 - 2
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/TokenService.java

@@ -170,8 +170,7 @@ public class TokenService
         long currentTime = System.currentTimeMillis();
         if (expireTime - currentTime <= MILLIS_MINUTE_TEN)
         {
-            //令牌保持不过期
-        //    refreshToken(loginUser);
+            refreshToken(loginUser);
         }
     }