|
|
|
@ -4,10 +4,10 @@
|
|
|
|
|
<mapper namespace="com.glxp.api.dao.auth.AuthAdminDao">
|
|
|
|
|
<select id="listAdminPage" parameterType="com.glxp.api.req.auth.FilterAuthUserRequest"
|
|
|
|
|
resultType="com.glxp.api.entity.auth.AuthAdmin">
|
|
|
|
|
SELECT auth_user.*, auth_dept.name deptName,auth_warehouse.name warehouseName
|
|
|
|
|
SELECT auth_user.*, auth_dept.name deptName, auth_warehouse.name warehouseName
|
|
|
|
|
FROM auth_user
|
|
|
|
|
left join auth_dept on auth_user.locDeptCode = auth_dept.code
|
|
|
|
|
LEFT JOIN auth_warehouse on auth_user.locInvCode=auth_warehouse.code
|
|
|
|
|
LEFT JOIN auth_warehouse on auth_user.locInvCode = auth_warehouse.code
|
|
|
|
|
<where>
|
|
|
|
|
<if test="ids != null and ids.size > 0">
|
|
|
|
|
AND id IN
|
|
|
|
@ -19,7 +19,7 @@
|
|
|
|
|
AND userFlag = #{userFlag}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="userName != null and '' != userName">
|
|
|
|
|
AND userName LIKE CONCAT(#{userName}, '%')
|
|
|
|
|
AND userName LIKE CONCAT('%', #{userName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="neUserName != null and '' != neUserName">
|
|
|
|
|
AND userName != #{neUserName}
|
|
|
|
@ -27,8 +27,8 @@
|
|
|
|
|
<if test="lastUpdateTime != null and lastUpdateTime != ''">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
and DATE_FORMAT(lastModifyTime
|
|
|
|
|
, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}
|
|
|
|
|
, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}
|
|
|
|
|
, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
]]>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="deptCode != null and deptCode != ''">
|
|
|
|
@ -118,23 +118,22 @@
|
|
|
|
|
|
|
|
|
|
<insert id="replaceAuthAdmin" keyProperty="id" parameterType="com.glxp.api.entity.auth.AuthAdmin">
|
|
|
|
|
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})
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -189,14 +188,14 @@
|
|
|
|
|
|
|
|
|
|
<select id="selectNotSelectUser" resultType="com.glxp.api.entity.auth.AuthAdmin">
|
|
|
|
|
select *
|
|
|
|
|
from auth_user left join auth_dept_user on auth_user.id=auth_dept_user.userId
|
|
|
|
|
from auth_user
|
|
|
|
|
left join auth_dept_user on auth_user.id = auth_dept_user.userId
|
|
|
|
|
<where>
|
|
|
|
|
userFlag != 0
|
|
|
|
|
<if test="deptId != null and '' != deptId">
|
|
|
|
|
AND auth_dept_user.deptId = #{deptId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="userIds != null and userIds.size() != 0">
|
|
|
|
|
|
|
|
|
|
and auth_user.id not in
|
|
|
|
|
|
|
|
|
|
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
|
|
|
@ -251,5 +250,4 @@
|
|
|
|
|
CustomerId = #{CustomerId}
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|