weimingfei
2025-12-11 3c5e5ed692e2e5248080b064b7d14b8eb9988a8c
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>