1.查询用户修改模糊查询

master
x_z 2 years ago
parent 5ae0c76f29
commit 3ed574424e

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

Loading…
Cancel
Save