2021与蓝度共同重构项目,服务端
liuhaonan
2022-04-26 d57d96ce51231734aa0b4979abeea17271660c1e
dao/src/main/resources/mapper/LightMapper.xml
@@ -53,10 +53,10 @@
        t1.device_code
        FROM
        light t1
        LEFT JOIN pole t2 USING ( device_code )
        LEFT JOIN pole t2 ON t1.device_code = t2.device_code
        <where>
            <if test="clientId != null">
                AND (t2.user_id = #{clientId} OR t2.client_id = #{clientId})
            <if test="userId != null">
                AND (t2.user_id = #{userId} OR t2.client_id = #{userId})
            </if>
            <if test="keyword != null and keyword != ''">
                AND (
@@ -64,7 +64,7 @@
                OR t2.pole_name LIKE CONCAT('%', #{keyword},'%')
                )
            </if>
            <if test="deviceCode != null">
            <if test="deviceCode != null and deviceCode!= ''">
                AND t2.device_code = #{deviceCode}
            </if>
        </where>