2021与蓝度共同重构项目,服务端
MercuryZ
2022-03-31 ef270bd1855b5ce3f398c5df024840a498e33a8f
dao/src/main/resources/mapper/LightReportDataMapper.xml
@@ -51,15 +51,18 @@
            light_report_data t1
                LEFT JOIN pole t2 USING ( device_code )
        <where>
            1 = 1
            <if test="deviceCode != null and deviceCode != ''">
                AND t1.device_code = #{deviceCode}
            </if>
            <if test="keyword != null and keyword != ''">
                AND (
                t1.device_code LIKE CONCAT('%', #{keyword},'%')
                OR t2.pole_name LIKE CONCAT('%', #{keyword},'%')
                )
            </if>
            <if test="deviceCode != null and keyword != ''">
                AND t1.device_code = #{deviceCode}
            </if>
        </where>
        ORDER BY t1.light_report_data_id DESC
    </select>