From 7089f3646c3b4f5c1e01b671d5aa5b15a23c1211 Mon Sep 17 00:00:00 2001 From: zengwh <81383286@qq.com> Date: Fri, 20 Aug 2021 17:27:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=A7=93=E5=90=8D=E6=9F=A5=E8=AF=A2=EF=BC=8C=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=9B=86=E5=90=88=E5=A2=9E=E5=8A=A0=E6=89=80=E5=B1=9E?= =?UTF-8?q?=E7=A7=91=E5=AE=A4=E5=90=8D=E7=A7=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/WEB-INF/views/userDir/user.jsp | 6 +++++- power-admin/src/main/webapp/static/js/user.js | 3 ++- .../src/main/java/com/manage/vo/User.java | 10 ++++++++++ .../resources/mapper/Power_UserMapper.xml | 19 +++++++++++++++---- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/power-admin/src/main/webapp/WEB-INF/views/userDir/user.jsp b/power-admin/src/main/webapp/WEB-INF/views/userDir/user.jsp index 712c2b1..66b8f3c 100644 --- a/power-admin/src/main/webapp/WEB-INF/views/userDir/user.jsp +++ b/power-admin/src/main/webapp/WEB-INF/views/userDir/user.jsp @@ -108,6 +108,10 @@ +
+ + +
<%--
@@ -298,7 +302,7 @@ - + <%@ include file="/WEB-INF/jspf/importExcelJsp.jspf" %> \ No newline at end of file diff --git a/power-admin/src/main/webapp/static/js/user.js b/power-admin/src/main/webapp/static/js/user.js index 41edb3c..d2331a2 100644 --- a/power-admin/src/main/webapp/static/js/user.js +++ b/power-admin/src/main/webapp/static/js/user.js @@ -26,6 +26,7 @@ var form = ''; page : (params.offset / params.limit) + 1, //当前页码 userName:$("#user_name").val(), userEmail:$("#user_email").val(), + name:$("#searchName").val(), searchRoleId:$("#roleId").val(), deptId : $("#dept_id option:selected").val(), effective : $("#effective option:selected").val(), @@ -532,7 +533,7 @@ function exportExcel(){ message: "没有选中,您确定要按搜索栏条件导出?", operate: function (reselt) { if (reselt) { - var url = path+"/user/export?userName="+$("#user_name").val()+"&searchRoleId="+$("#roleId").val()+"&deptId="+$("#dept_id").val()+"&effective="+$("#effective").val(); + var url = path+"/user/export?userName="+$("#user_name").val()+"&searchRoleId="+$("#roleId").val()+"&deptId="+$("#dept_id").val()+"&effective="+$("#effective").val()+"&name="+$("#searchName").val(); window.location.href = url; } } diff --git a/power-dao/src/main/java/com/manage/vo/User.java b/power-dao/src/main/java/com/manage/vo/User.java index 3095d48..11ebe4e 100644 --- a/power-dao/src/main/java/com/manage/vo/User.java +++ b/power-dao/src/main/java/com/manage/vo/User.java @@ -27,6 +27,16 @@ public class User { private String deptCode; + private String deptName; + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + public String getDeptCode() { return deptCode; } diff --git a/power-dao/src/main/resources/mapper/Power_UserMapper.xml b/power-dao/src/main/resources/mapper/Power_UserMapper.xml index e7b188c..6ea35e4 100644 --- a/power-dao/src/main/resources/mapper/Power_UserMapper.xml +++ b/power-dao/src/main/resources/mapper/Power_UserMapper.xml @@ -317,6 +317,9 @@ and power_user.user_name LIKE '%${userName}%' + + and power_user.name LIKE '%${name}%' + and power_user.user_email LIKE '%${userEmail}%' @@ -369,6 +372,9 @@ and power_user.user_name LIKE '%${userName}%' + + and power_user.name LIKE '%${name}%' + and power_user.user_email LIKE '%${userEmail}%' @@ -549,14 +555,19 @@ power_user.dept_id, power_user.dept_code, power_role.role_name, - name + NAME, + power_dept.dept_name FROM power_user_dict - INNER JOIN power_user ON power_user_dict.user_id = power_user.user_id AND power_user.effective = 1 AND power_user.role_id != 0 - LEFT JOIN power_role ON power_user.role_id = power_role.role_id AND power_role.effective = 1 + INNER JOIN power_user ON power_user_dict.user_id = power_user.user_id + AND power_user.effective = 1 + AND power_user.role_id != 0 + LEFT JOIN power_role ON power_user.role_id = power_role.role_id + AND power_role.effective = 1 + LEFT JOIN power_dept ON power_user.dept_id = power_dept.dept_id AND power_dept.effective = 1 WHERE - dict_id = ( + power_user_dict.dict_id = ( SELECT dict_id FROM