update springboot/wumei-iot/src/main/resources/mapper/iot/FirmwareMapper.xml.

对于租户固件查询处做出修改,保证租户只能查看系统定义的固件和自己创建的固件
This commit is contained in:
redamancy_zxp
2022-04-15 03:39:53 +00:00
committed by Gitee
parent 81e9ef6373
commit 843492ccba

View File

@@ -23,16 +23,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select firmware_id, firmware_name, product_id, product_name, tenant_id, tenant_name, is_sys, version, file_path, create_time, update_time, remark from iot_firmware select firmware_id, firmware_name, product_id, product_name, tenant_id, tenant_name, is_sys, version, file_path, create_time, update_time, remark from iot_firmware
</sql> </sql>
<select id="selectFirmwareList" parameterType="com.ruoyi.iot.domain.Firmware" resultMap="FirmwareResult"> <select id="selectFirmwareList" parameterType="com.ruoyi.iot.domain.Firmware" resultMap="FirmwareResult">
<include refid="selectFirmwareVo"/> <include refid="selectFirmwareVo"/>
<where> <where>
<if test="firmwareName != null and firmwareName != ''"> and firmware_name like concat('%', #{firmwareName}, '%')</if> <if test="firmwareName != null and firmwareName != ''"> and firmware_name like concat('%', #{firmwareName}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="tenantName != null and tenantName != ''"> and tenant_name like concat('%', #{tenantName}, '%')</if> <if test="tenantName != null and tenantName != ''"> and tenant_name like concat('%', #{tenantName}, '%') or is_sys = 1</if>
<if test="isSys != null "> and is_sys = #{isSys}</if> <if test="isSys != null "> and is_sys = #{isSys}</if>
<if test="isSys == null "> and is_sys = 1</if>
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
<select id="selectFirmwareByFirmwareId" parameterType="Long" resultMap="FirmwareResult"> <select id="selectFirmwareByFirmwareId" parameterType="Long" resultMap="FirmwareResult">