MrShi
2025-05-21 e5e5a84d84e7a2b4715bd58096043e565ae0e107
server/system_service/src/main/resources/mappers/SystemDataPermissionMapper.xml
@@ -64,13 +64,9 @@
      <if test="dto.type != null">
        AND sdp.`TYPE` =  #{dto.type}
      </if>
      <if test="role.companyId != null">
        AND role.`COMPANY_ID` =  #{role.companyId}
      </if>
      <if test="userId != null">
        AND exists (select sr.id from system_user_role sr where sr.role_id=sdp.role_id and sr.user_id=#{userId} and sr.STATUS=0 and sr.deleted=0)
        AND exists (select sr.id from system_user_role sr where sr.role_id=sdp.role_id and sr.user_id=#{userId} and sr.deleted=0)
      </if>
    </where>
    order by role.`TYPE` asc
  </select>
</mapper>