更新查询用户列表sql

master
panqihua 2 years ago
parent 8e33f56223
commit 4e31911bc2
  1. 8
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@ -68,14 +68,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_user referrer on u.referrer_id = referrer.user_id
where u.del_flag = '0'
<if test="userId != null and userId != 0">
AND u.user_id = #{userId}
AND u.user_id like concat('%', #{userId}, '%')
</if>
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
</if>
<if test="nickName != null and nickName != ''">
AND u.nick_name like concat('%', #{nickName}, '%')
</if>
<if test="status != null and status != ''">
AND u.status = #{status}
</if>
<if test="sex != null and sex != ''">
AND u.sex = #{sex}
</if>
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>

Loading…
Cancel
Save