zhibing.pu
2024-08-10 1916f55359bb6c8f34548c26767569b000decbfc
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -125,8 +125,22 @@
   </select>
    <select id="getList" resultType="com.ruoyi.system.api.domain.SysUser">
      select *,nick_name nickName,login_date loginDate,create_time createTime,user_id userId from sys_user where 1=1
      <if test="phonenumber !=null and phonenumber !=''">
         and phonenumber like concat("%", #{phonenumber},"%")
      <if test="req.search !=null and req.search !=''">
         and (phonenumber like concat("%", #{phonenumber},"%") or nick_name like concat("%", #{phonenumber},"%"))
      </if>
      <if test="null != req.siteId">
         and user_id in (select user_id from t_user_site where site_id = #{req.siteId})
          and user_id in (select user_id from sys_user_role where role_id in (select role_id from t_role_site where site_id = #{req.siteId}))
      </if>
       <if test="null != req.roleIds and req.roleIds.size() > 0">
          and user_id in (select user_id from sys_user_role where role_id in
          <foreach collection="req.roleIds" item="item" index="index" open="(" separator="," close=")">
             #{item}
          </foreach>
          )
       </if>
      <if test="null != req.status">
         and status = #{req.status}
      </if>
       and del_flag = '0' and roleType =1
      order by create_time desc