hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
@@ -50,6 +50,9 @@
            <if test="height != 0">
                and t.height = #{height}
            </if>
            <if test="cell == 2">
                and t.thickness &lt; #{maxThickness}
            </if>
        </where>
        order by total_count desc, glass_count, abs(t.slot - #{currentSlot})
        )
@@ -93,18 +96,19 @@
            AND t1.state = 100
            AND t1.device_id = #{deviceId}
            <if test="width != 0">
                and t.width = #{width}
                and t1.width = #{width}
            </if>
            <if test="height != 0">
                and t.height = #{height}
                and t1.height = #{height}
            </if>
            <if test="cell == 1">
                and #{minOneFirstLength} &lt;= GREATEST(t.width, t.width)
                and #{minOneSecondLength} &lt;= least(t.width, t.width)
                and #{minOneFirstLength} &lt;= GREATEST(t1.width, t1.height)
                and #{minOneSecondLength} &lt;= least(t1.width, t1.height)
            </if>
            <if test="cell == 2">
                and #{maxTwoFirstLength} &gt;= GREATEST(t.width, t.width)
                and #{maxTwoSecondLength} &gt;= least(t.width, t.width)
                and #{maxTwoFirstLength} &gt;= GREATEST(t1.width, t1.height)
                and #{maxTwoSecondLength} &gt;= least(t1.width, t1.height)
                and t1.thickness &lt; #{maxThickness}
            </if>
        </where>
        ORDER BY abs(t.slot - #{currentCell})