2021与蓝度共同重构项目,服务端
liuhaonan
2022-05-27 c0359a005dab3c7b168ed25db2fa4dfc67c7546a
dao/src/main/resources/mapper/MonitorMapper.xml
@@ -18,6 +18,28 @@
        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
        <result property="netAddress" column="net_address" jdbcType="VARCHAR"/>
    </resultMap>
    <select id="newListMonitorOnBind" resultType="com.sandu.ximon.dao.bo.MonitorBo">
        SELECT
        t1.*, t2.pole_id,
        t3.pole_name, t3.province,t3.city,t3.region,t3.address
        FROM
        monitor t1
        LEFT JOIN pole_binding t2 ON t1.device_serial = t2.device_code
        AND t2.device_type = 7
        LEFT JOIN pole t3 ON t3.id = t2.pole_id
        <where>
            <if test="userid != null">
                AND (t3.user_id = #{userid} OR t3.client_id = #{userid})
            </if>
            <if test="keyword != null and keyword != ''">
                AND (
                t1.device_serial LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                OR t1.note LIKE CONCAT(CONCAT('%', #{keyword}), '%')
                OR t1.id LIKE CONCAT(CONCAT('%', #{keyword}), '%'))
            </if>
        </where>
    </select>
    <select id="listMonitorByIds" resultType="com.sandu.ximon.dao.bo.MonitorBo">
        SELECT