提交 cb7ce61b authored 作者: 000516's avatar 000516

分页查询人员由LambdaQueryWrapper改为xml

...@@ -250,25 +250,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -250,25 +250,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectUserPage" resultType="com.sfa.system.api.domain.SysUser"> <select id="selectUserPage" resultType="com.sfa.system.api.domain.SysUser">
select * select *
from sys_user where del_flag = '0' from sys_user su
where del_flag = '0'
<if test="sysUserWq.status != null and sysUserWq.status != ''"> <if test="sysUserWq.status != null and sysUserWq.status != ''">
and status = #{sysUserWq.status} and su.status = #{sysUserWq.status}
</if> </if>
<if test="sysUserWq.deptId != null"> <if test="sysUserWq.deptId != null">
and dept_id = #{sysUserWq.deptId} and su.dept_id = #{sysUserWq.deptId}
</if> </if>
<if test="sysUserWq.nickNameLike != null and sysUserWq.nickNameLike != ''"> <if test="sysUserWq.nickNameLike != null and sysUserWq.nickNameLike != ''">
and nick_name like concat('%',#{sysUserWq.nickNameLike},'%') and su.nick_name like concat('%',#{sysUserWq.nickNameLike},'%')
</if> </if>
<if test="sysUserWq.userNameLike != null and sysUserWq.userNameLike != ''"> <if test="sysUserWq.userNameLike != null and sysUserWq.userNameLike != ''">
and user_name like concat('%',#{sysUserWq.userNameLike},'%') and su.user_name like concat('%',#{sysUserWq.userNameLike},'%')
</if> </if>
<if test="sysUserWq.phonenumberLike != null and sysUserWq.phonenumberLike != ''"> <if test="sysUserWq.phonenumberLike != null and sysUserWq.phonenumberLike != ''">
and phonenumber like concat('%',#{sysUserWq.phonenumberLike},'%') and su.phonenumber like concat('%',#{sysUserWq.phonenumberLike},'%')
</if> </if>
<if test="sysUserWq.beginTime != null and sysUserWq.endTime != null"> <if test="sysUserWq.beginTime != null and sysUserWq.endTime != null">
AND create_time BETWEEN #{sysUserWq.beginTime} AND #{sysUserWq.endTime} AND su.create_time BETWEEN #{sysUserWq.beginTime} AND #{sysUserWq.endTime}
</if> </if>
<if test="sysUserWq.roleId != null">
and su.user_id in (select user_id from sys_user_role where role_id = #{sysUserWq.roleId})
</if>
</select> </select>
<update id="updateUserPostByPostId"> <update id="updateUserPostByPostId">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论