From c82afc8c461956e45be0aa29ca2a7fe3f18ee6f7 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 28 十二月 2021 11:23:33 +0800
Subject: [PATCH] update RedisUtils 迁移到 utils/redis 包下

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
index d90cabe..4f119e4 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java
@@ -4,6 +4,7 @@
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.PageQuery;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -11,6 +12,7 @@
 import com.ruoyi.system.service.ISysPostService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,14 +42,14 @@
     @ApiOperation("鑾峰彇宀椾綅鍒楄〃")
     @PreAuthorize("@ss.hasPermi('system:post:list')")
     @GetMapping("/list")
-    public TableDataInfo<SysPost> list(SysPost post) {
-        return postService.selectPagePostList(post);
+    public TableDataInfo<SysPost> list(SysPost post, PageQuery pageQuery) {
+        return postService.selectPagePostList(post, pageQuery);
     }
 
     @ApiOperation("瀵煎嚭宀椾綅鍒楄〃")
     @Log(title = "宀椾綅绠$悊", businessType = BusinessType.EXPORT)
     @PreAuthorize("@ss.hasPermi('system:post:export')")
-    @GetMapping("/export")
+    @PostMapping("/export")
     public void export(SysPost post, HttpServletResponse response) {
         List<SysPost> list = postService.selectPostList(post);
         ExcelUtil.exportExcel(list, "宀椾綅鏁版嵁", SysPost.class, response);
@@ -59,7 +61,7 @@
     @ApiOperation("鏍规嵁宀椾綅缂栧彿鑾峰彇璇︾粏淇℃伅")
     @PreAuthorize("@ss.hasPermi('system:post:query')")
     @GetMapping(value = "/{postId}")
-    public AjaxResult<SysPost> getInfo(@PathVariable Long postId) {
+    public AjaxResult<SysPost> getInfo(@ApiParam("宀椾綅ID") @PathVariable Long postId) {
         return AjaxResult.success(postService.selectPostById(postId));
     }
 
@@ -76,7 +78,6 @@
         } else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) {
             return AjaxResult.error("鏂板宀椾綅'" + post.getPostName() + "'澶辫触锛屽矖浣嶇紪鐮佸凡瀛樺湪");
         }
-        post.setCreateBy(getUsername());
         return toAjax(postService.insertPost(post));
     }
 
@@ -93,7 +94,6 @@
         } else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) {
             return AjaxResult.error("淇敼宀椾綅'" + post.getPostName() + "'澶辫触锛屽矖浣嶇紪鐮佸凡瀛樺湪");
         }
-        post.setUpdateBy(getUsername());
         return toAjax(postService.updatePost(post));
     }
 
@@ -104,7 +104,7 @@
     @PreAuthorize("@ss.hasPermi('system:post:remove')")
     @Log(title = "宀椾綅绠$悊", businessType = BusinessType.DELETE)
     @DeleteMapping("/{postIds}")
-    public AjaxResult<Void> remove(@PathVariable Long[] postIds) {
+    public AjaxResult<Void> remove(@ApiParam("宀椾綅ID涓�") @PathVariable Long[] postIds) {
         return toAjax(postService.deletePostByIds(postIds));
     }
 

--
Gitblit v1.9.3