jiangping
2025-06-26 0d2a03ec404b9c047d5d5cd4654a48882135be5f
server/system_service/src/main/resources/mappers/SystemUserMapper.xml
@@ -34,7 +34,7 @@
    LEFT JOIN `company` sd ON sd.ID = usr.COMPANY_ID AND sd.ISDELETED = 0
    LEFT JOIN `member` m ON usr.MEMBER_ID = m.id
    <if test="dto.roleId != null">
      RIGHT JOIN system_user_role sur on sur.USER_ID = usr.ID and sur.ROLE_ID = #{dto.roleId}
      RIGHT JOIN system_user_role sur on sur.USER_ID = usr.ID and sur.DELETED = 0  and sur.ROLE_ID = #{dto.roleId}
    </if>
    <where>
      usr.DELETED = 0
@@ -67,7 +67,10 @@
        AND  usr.`status` = #{dto.status}
      </if>
      <if test="dto.memberType != null ">
        AND  m.`type` = #{dto.memberType}
        AND  usr.`type` = #{dto.memberType}
      </if>
      <if test="dto.workStatus != null ">
        AND  m.WORK_STATUS = #{dto.workStatus}
      </if>
      <if test="dto.companyId != null ">
        AND  usr.COMPANY_ID  = #{dto.companyId}
@@ -75,6 +78,9 @@
      <if test="dto.companyType != null ">
        AND  sd.`type` = #{dto.companyType}
      </if>
      <if test="dto.querySpecial != null and dto.querySpecial == 1 ">
            AND find_in_set(#{dto.companySpecialId},REPLACE(sd.company_path,'/',','))
      </if>
    </where>
    ${orderByClause}
  </select>