2021与蓝度共同重构项目,服务端
liuhaonan
2022-04-25 12b3967ebefcfc31e8e2eeb4fea6c699f5bd04f4
dao/src/main/resources/mapper/LightMapper.xml
@@ -46,4 +46,16 @@
            </if>
        </where>
    </select>
    <select id="listCode" resultType="java.lang.String">
        SELECT
        t1.device_code
        FROM
        light t1
        LEFT JOIN pole t2 USING ( device_code )
        <where>
            <if test="clientId != null">
                AND (t2.user_id = #{clientId} OR t2.client_id = #{clientId})
            </if>
        </where>
    </select>
</mapper>