From 6588756cf95e8295a93a2826137322b2e7fc6e80 Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期三, 19 十月 2022 14:27:47 +0800
Subject: [PATCH] 修改【角色管理】无法搜索 bug
---
flower_city/src/main/java/com/dg/core/controller/RoleManagementController.java | 12 +++++++++---
1 files changed, 9 insertions(+), 3 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 c724c8d..6c609d4 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
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dg.core.ResultData;
+import com.dg.core.annotation.Authorization;
import com.dg.core.db.gen.entity.RoleManagementEntity;
import com.dg.core.service.IRoleManagementService;
import com.dg.core.util.TableDataInfo;
@@ -30,8 +31,10 @@
*/
@ApiOperation("查询角色列表")
@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)
{
@@ -44,9 +47,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);
}
@@ -57,6 +60,7 @@
*/
@ApiOperation("新增角色")
@PostMapping("/add")
+ @Authorization
public ResultData insertConfig(@RequestBody RoleManagementEntity entity)
{
// entity.setCreateUserId(sysUser.getUserId()+"");
@@ -70,6 +74,7 @@
*/
@ApiOperation("编辑角色")
@PostMapping("/update")
+ @Authorization
public ResultData updateConfig(@RequestBody RoleManagementEntity entity)
{
// entity.setUpdateUserId(sysUser.getUserId()+"");
@@ -82,6 +87,7 @@
* @return
*/
@DeleteMapping("/delete")
+ @Authorization
public ResultData deleteConfigById(@RequestParam(value = "Id",required = false) String Id)
{
if(StringUtils.isEmpty(Id))
--
Gitblit v1.7.1