From a2e2e31e6d9ef98b0dfde70424d86de30f1669bd Mon Sep 17 00:00:00 2001 From: x_z Date: Wed, 1 Feb 2023 17:40:23 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=92=8C=E5=9F=BA=E7=A1=80=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/req/auth/FilterDeptUserReqeust.java | 2 ++ .../req/auth/FilterInvSubWarehouseRequest.java | 2 ++ .../com/glxp/api/res/auth/DeptUserResponse.java | 5 +++++ .../service/auth/impl/SysRoleServiceImpl.java | 6 ++++++ .../mybatis/mapper/auth/AuthAdminDao.xml | 4 ++-- .../mybatis/mapper/auth/DeptUserDao.xml | 17 +++++++++++------ .../mybatis/mapper/auth/InvSubWarehouseDao.xml | 3 +++ .../mybatis/mapper/monitor/SysOperLogMapper.xml | 2 +- .../mapper/schedule/SystemParamConfigDao.xml | 3 +++ 9 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/glxp/api/req/auth/FilterDeptUserReqeust.java b/src/main/java/com/glxp/api/req/auth/FilterDeptUserReqeust.java index 37d6d18c..90eb160d 100644 --- a/src/main/java/com/glxp/api/req/auth/FilterDeptUserReqeust.java +++ b/src/main/java/com/glxp/api/req/auth/FilterDeptUserReqeust.java @@ -7,4 +7,6 @@ import lombok.Data; public class FilterDeptUserReqeust extends ListPageRequest { private Long deptId; private Long userId; + + private String key; } diff --git a/src/main/java/com/glxp/api/req/auth/FilterInvSubWarehouseRequest.java b/src/main/java/com/glxp/api/req/auth/FilterInvSubWarehouseRequest.java index 128e165a..85463ed2 100644 --- a/src/main/java/com/glxp/api/req/auth/FilterInvSubWarehouseRequest.java +++ b/src/main/java/com/glxp/api/req/auth/FilterInvSubWarehouseRequest.java @@ -11,4 +11,6 @@ public class FilterInvSubWarehouseRequest extends ListPageRequest { private String name; private String parentId; private Boolean defaultInv; + + private String key; } diff --git a/src/main/java/com/glxp/api/res/auth/DeptUserResponse.java b/src/main/java/com/glxp/api/res/auth/DeptUserResponse.java index 5fd9174e..ebac94b1 100644 --- a/src/main/java/com/glxp/api/res/auth/DeptUserResponse.java +++ b/src/main/java/com/glxp/api/res/auth/DeptUserResponse.java @@ -10,4 +10,9 @@ public class DeptUserResponse { private String userName; private String employeeName; private String deptName; + + /** + * 备注 + */ + private String comments; } diff --git a/src/main/java/com/glxp/api/service/auth/impl/SysRoleServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/SysRoleServiceImpl.java index 5939d2cd..744b79d7 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/SysRoleServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/SysRoleServiceImpl.java @@ -2,6 +2,7 @@ package com.glxp.api.service.auth.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageHelper; import com.glxp.api.constant.Constant; import com.glxp.api.dao.auth.SysRoleMapper; @@ -137,6 +138,11 @@ public class SysRoleServiceImpl implements ISysRoleService { filterRoleRequest.setNeRoleId(role.getRoleId()); List sysRoles = sysRoleMapper.selectRoleList(filterRoleRequest); if (CollUtil.isNotEmpty(sysRoles)) { + for (SysRole sysRole : sysRoles) { + if (StrUtil.isNotBlank(sysRole.getRoleName()) && StrUtil.isNotBlank(role.getRoleName()) && !role.getRoleName().equals(sysRole.getRoleName())) { + return Constant.UNIQUE; + } + } return Constant.NOT_UNIQUE; } else { return Constant.UNIQUE; diff --git a/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml b/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml index 02ae2125..f5f30ca1 100644 --- a/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml +++ b/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml @@ -6,7 +6,7 @@ - SELECT auth_dept_user.*,auth_user.userName,auth_user.employeeName,auth_dept.`name` deptName - FROM auth_dept_user INNER JOIN auth_user - on auth_dept_user.userId = auth_user.id - INNER JOIN auth_dept on auth_dept_user.deptId = auth_dept.id + SELECT auth_dept_user.*, auth_user.userName, auth_user.employeeName, auth_dept.`name` deptName, auth_user.comments + FROM auth_dept_user + INNER JOIN auth_user + on auth_dept_user.userId = auth_user.id + INNER JOIN auth_dept on auth_dept_user.deptId = auth_dept.id - + and deptId = #{deptId} - + and userId = #{userId} + + and (auth_user.userName like concat('%', #{key}, '%') or + auth_user.employeeName like concat('%', #{key}, '%')) + diff --git a/src/main/resources/mybatis/mapper/auth/InvSubWarehouseDao.xml b/src/main/resources/mybatis/mapper/auth/InvSubWarehouseDao.xml index f6b7c281..4e492d7c 100644 --- a/src/main/resources/mybatis/mapper/auth/InvSubWarehouseDao.xml +++ b/src/main/resources/mybatis/mapper/auth/InvSubWarehouseDao.xml @@ -216,6 +216,9 @@ AND a.defaultInv = #{defaultInv} + + AND a.name like concat('%', #{key}, '%') + diff --git a/src/main/resources/mybatis/mapper/monitor/SysOperLogMapper.xml b/src/main/resources/mybatis/mapper/monitor/SysOperLogMapper.xml index dca33e32..43e7f0e0 100644 --- a/src/main/resources/mybatis/mapper/monitor/SysOperLogMapper.xml +++ b/src/main/resources/mybatis/mapper/monitor/SysOperLogMapper.xml @@ -53,7 +53,7 @@ AND `operator_type` = #{operatorType} - AND `oper_name` = #{operName} + AND auth_user.employeeName like concat('%', #{operName}, '%') AND `dept_name` = #{deptName} diff --git a/src/main/resources/mybatis/mapper/schedule/SystemParamConfigDao.xml b/src/main/resources/mybatis/mapper/schedule/SystemParamConfigDao.xml index dd532ead..948e368a 100644 --- a/src/main/resources/mybatis/mapper/schedule/SystemParamConfigDao.xml +++ b/src/main/resources/mybatis/mapper/schedule/SystemParamConfigDao.xml @@ -15,6 +15,9 @@ and paramType = #{paramType} + + AND paramName like CONCAT('%', #{key}, '%') + order BY id