From 6399834d0e6e51ade5699df1ac2fcf3a687d5dcb Mon Sep 17 00:00:00 2001 From: anthonywj Date: Wed, 14 Jun 2023 10:52:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E6=9F=A5=E8=AF=A2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/req/auth/FilterAuthUserRequest.java | 1 + .../api/req/sup/UserCompanyConfigRequest.java | 3 - .../mybatis/mapper/auth/AuthAdminDao.xml | 60 ++++++++++--------- .../mapper/sup/UserCompanyOnlineMapper.xml | 6 +- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/main/java/com/glxp/api/req/auth/FilterAuthUserRequest.java b/src/main/java/com/glxp/api/req/auth/FilterAuthUserRequest.java index 5037b4a..fe17f20 100644 --- a/src/main/java/com/glxp/api/req/auth/FilterAuthUserRequest.java +++ b/src/main/java/com/glxp/api/req/auth/FilterAuthUserRequest.java @@ -19,6 +19,7 @@ public class FilterAuthUserRequest extends ListPageRequest { private List ids; private String lastUpdateTime; + private String employeeName; //用户名 != private String neUserName; diff --git a/src/main/java/com/glxp/api/req/sup/UserCompanyConfigRequest.java b/src/main/java/com/glxp/api/req/sup/UserCompanyConfigRequest.java index 8c3145a..db356c4 100644 --- a/src/main/java/com/glxp/api/req/sup/UserCompanyConfigRequest.java +++ b/src/main/java/com/glxp/api/req/sup/UserCompanyConfigRequest.java @@ -10,9 +10,6 @@ import lombok.Data; @Data public class UserCompanyConfigRequest { - @ApiModelProperty(value = "id") - private Integer id; - /** * 企业ID */ diff --git a/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml b/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml index 8ba584c..43d2815 100644 --- a/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml +++ b/src/main/resources/mybatis/mapper/auth/AuthAdminDao.xml @@ -6,7 +6,7 @@ resultType="com.glxp.api.entity.auth.AuthAdmin"> SELECT auth_user.*, auth_dept.name deptName FROM auth_user - left join auth_dept on auth_user.locDeptCode = auth_dept.code + left join auth_dept on auth_user.locDeptCode = auth_dept.code AND id IN @@ -20,14 +20,17 @@ AND userName LIKE CONCAT('%', #{userName}, '%') + + AND employeeName LIKE CONCAT('%', #{employeeName}, '%') + AND userName != #{neUserName} = DATE_FORMAT(#{lastUpdateTime} - , '%Y-%m-%d %H:%i:%S') + , '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime} + , '%Y-%m-%d %H:%i:%S') ]]> @@ -66,10 +69,10 @@ - INSERT INTO auth_user( id,userName, passWord, lastLoginIp, lastLoginTime, createTime, userFlag + INSERT INTO auth_user( id, userName, passWord, lastLoginIp, lastLoginTime, createTime, userFlag , employeeName, CustomerId, lastModifyTime, locDeptCode, locInvCode, comments) - values - (#{id}, #{userName}, + values + (#{id}, #{userName}, #{passWord}, @@ -107,23 +110,22 @@ replace - INTO auth_user(id, userName, passWord, lastLoginIp, - lastLoginTime, createTime, userFlag, lastModifyTime, employeeName,CustomerId,locDeptCode,locInvCode,comments) - values ( - #{id}, - #{userName}, - #{passWord}, - #{lastLoginIp}, - #{lastLoginTime}, - #{createTime}, - #{userFlag,jdbcType=INTEGER}, - #{lastModifyTime}, - #{employeeName}, - #{CustomerId}, - #{locDeptCode}, - #{locInvCode}, - #{comments} - ) + INTO auth_user(id, userName, passWord, lastLoginIp, + lastLoginTime, createTime, userFlag, lastModifyTime, employeeName, CustomerId, + locDeptCode, locInvCode, comments) + values (#{id}, + #{userName}, + #{passWord}, + #{lastLoginIp}, + #{lastLoginTime}, + #{createTime}, + #{userFlag,jdbcType=INTEGER}, + #{lastModifyTime}, + #{employeeName}, + #{CustomerId}, + #{locDeptCode}, + #{locInvCode}, + #{comments}) @@ -178,14 +180,14 @@ - SELECT user_company_online.*, ucc.heartRate, ucc.remark + SELECT uco.userId, uco.lastIp, uco.updateTime, ucc.heartRate, ucc.remark FROM user_company_config ucc - left join user_company_online on user_company_online.companyId = ucc.companyId - where user_company_online.companyId = #{companyId} + left join user_company_online uco on uco.companyId = ucc.companyId + where ucc.companyId = #{companyId}