2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-11 ebecb50ecf3c53428fac4f3bd09d98110d6bc8d7
dao/src/main/resources/mapper/PoleBindingMapper.xml
@@ -23,8 +23,14 @@
    <select id="getPoleByBinding" resultType="com.sandu.ximon.dao.domain.Pole">
        SELECT t2.*
        FROM `pole_binding` t1
                 LEFT JOIN pole t2 ON t1.pole_id = t2.id
        LEFT JOIN pole t2 ON t1.pole_id = t2.id
        WHERE t1.device_type = #{type}
          AND t1.device_code = #{Mac}
        AND t1.device_code = #{Mac}
        <if test="userId != null">
            AND (
            t2.user_id = #{userId}
            OR t2.client_id = #{userId}
            )
        </if>
    </select>
</mapper>