2021与蓝度共同重构项目,服务端
liuhaonan
2022-10-26 c7be2ef037c5aebb0cd8f1f33e5fa934389e6083
dao/src/main/resources/mapper/LightMapper.xml
@@ -23,7 +23,11 @@
        <result property="poleId" column="pole_id" jdbcType="BIGINT"/>
        <result property="poleCode" column="pole_code" jdbcType="VARCHAR"/>
        <result property="poleName" column="pole_name" jdbcType="VARCHAR"/>
        <result property="taskName" column="task_name" jdbcType="VARCHAR"/>
        <collection property="taskNameIdBos" ofType="com.sandu.ximon.dao.bo.LightTaskNameIdBo">
            <result property="taskId" column="task_id" jdbcType="BIGINT"/>
            <result property="taskName" column="task_name" jdbcType="VARCHAR"/>
            <result property="lightAddress" column="light_address" jdbcType="VARCHAR"/>
        </collection>
    </resultMap>
@@ -33,10 +37,13 @@
        t2.id AS pole_id,
        t2.pole_code,
        t2.pole_name,
        t4.task_name
        t4.task_id AS task_id,
        t4.task_name AS task_name,
        t3.light_address AS light_address
        FROM
        light t1
        LEFT JOIN pole t2 USING ( device_code )
        LEFT JOIN pole_binding t5 ON t1.device_code = t5.device_code
        LEFT JOIN pole t2 ON t2.id=t5.pole_id AND t5.device_type=0
        LEFT JOIN light_task_pole_relation t3 ON t3.pole_id = t2.id
        LEFT JOIN light_task t4 ON t3.task_id = t4.task_id
        <where>
@@ -50,7 +57,6 @@
                )
            </if>
        </where>
        GROUP BY t1.device_code
    </select>
    <select id="listCode" resultType="java.lang.String">
        SELECT