2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-27 c0359a005dab3c7b168ed25db2fa4dfc67c7546a
dao/src/main/resources/mapper/IPBroadcastMapper.xml
@@ -17,6 +17,26 @@
        ,terminal_name,streetlight_id,
        bind_states,exist
    </sql>
    <select id="newListTerminalOnBind" parameterType="java.lang.String">
        SELECT
        t1.*, t2.pole_id,
        t3.pole_name
        FROM
        broadcast_v2_terminal t1
        LEFT JOIN pole_binding t2 ON t1.id = t2.device_code
        AND t2.device_type = 5
        LEFT JOIN pole t3 ON t3.id = t2.pole_id
        <where>
            <if test="keyword != null and keyword != ''">
                AND t1.id LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                OR t1.terminal_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
            </if>
            <if test="userid != null">
                AND (t3.user_id = #{userid} OR t3.client_id = #{userid})
            </if>
        </where>
    </select>
    <select id="listAll" resultType="com.sandu.ximon.dao.domain.BroadcastTerminalV2Entity">
        SELECT
        t1.*, t3.pole_name
@@ -28,7 +48,6 @@
    </select>
    <select id="getBroadcastTerminalList" resultType="com.sandu.ximon.dao.bo.BroadcastTerminalV2EntityBo">
        SELECT
        t1.*, t2.pole_id,
        t3.pole_name