From 1fb23cbeeaaeda0a66cf8fe8977c3f5915743cc7 Mon Sep 17 00:00:00 2001
From: fengjin <1435304038@qq.com>
Date: 星期五, 21 十月 2022 15:13:10 +0800
Subject: [PATCH] Merge branch 'zigonggao_dev' into huacheng_test

---
 flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java b/flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java
index 15c2464..8c134dd 100644
--- a/flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java
+++ b/flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java
@@ -3,7 +3,9 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.dg.core.ResultData;
 import com.dg.core.annotation.Authorization;
+import com.dg.core.annotation.CurrentUser;
 import com.dg.core.db.gen.entity.RoleManagementEntity;
+import com.dg.core.db.gen.entity.SysUser;
 import com.dg.core.service.IRoleManagementService;
 import com.dg.core.util.TableDataInfo;
 import io.swagger.annotations.Api;
@@ -33,7 +35,8 @@
     @GetMapping("/getList")
     @Authorization
     public TableDataInfo selectConfigList(@RequestParam(value = "pageNum",required = false) Integer pageNum,
-                                          @RequestParam(value = "pageSize",required = false) Integer pageSize)
+                                          @RequestParam(value = "pageSize",required = false) Integer pageSize,
+                                          @RequestParam(value = "name",required = false) String name)
     {
         if(pageNum==null)
         {
@@ -46,9 +49,9 @@
         }
 
         Page<RoleManagementEntity> pageParam = new Page<>(pageNum,pageSize);
-        List<RoleManagementEntity> list = iRoleManagementService.selectConfigList(pageParam,pageSize);
+        List<RoleManagementEntity> list = iRoleManagementService.selectConfigList(pageParam,pageSize,name);
 
-        int num=iRoleManagementService.countNum();
+        int num=iRoleManagementService.countNum(name);
         return getDataTable(list,num);
     }
 
@@ -60,9 +63,9 @@
     @ApiOperation("新增角色")
     @PostMapping("/add")
     @Authorization
-    public ResultData insertConfig(@RequestBody RoleManagementEntity entity)
+    public ResultData insertConfig(@RequestBody RoleManagementEntity entity, @CurrentUser SysUser sysUser)
     {
-//        entity.setCreateUserId(sysUser.getUserId()+"");
+        entity.setCreateUserId(sysUser.getUserId()+"");
         return toAjax(iRoleManagementService.insertConfig(entity));
     }
 

--
Gitblit v1.7.1