ZengTao
2025-04-01 a52b87449e493d4312cc81c33a4169eb6be3c144
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageMapper.xml
@@ -10,13 +10,20 @@
        <result column="remain_width" property="remainWidth" jdbcType="INTEGER"/>
    </resultMap>
    <update id="resetSlotRemainWidth">
        <foreach collection="list" item="item" separator=";" open="begin" close=";end;">
            update edg_storage_cage set remain_width = #{item.remainWidth} where
            device_id = #{item.deviceId} and slot = #{item.slot}
        </foreach>
    </update>
    <select id="getEdgStorageCageBySize" resultMap="baseMap">
        select t.*
        from edg_storage_cage t
                 left join edg_storage_cage_details t1 on t.slot = t1.slot
        where t.device_id = #{deviceId}
          and t1.state = 100
          and t.remain_width >= #{width}
          and t.remain_width >= GREATEST(#{width}, #{height})
          and t1.width = #{width}
          and t1.height = #{height}
          and t.enable_state = 1