xiangpei
2024-09-03 6c5d7fa4635b06d30840c39f96bd381b65cb56e7
ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
@@ -89,6 +89,13 @@
        </foreach>
    </select>
    <select id="selectByNumbers" resultType="com.ycl.platform.domain.entity.TMonitor">
        select * from t_monitor where serial_number in
        <foreach collection="numbers" separator="," open="(" close=")" item="number">
            #{number}
        </foreach>
    </select>
    <select id="selectTMonitorList" resultType="com.ycl.platform.domain.vo.TMonitorVO">
        select m.id, m.serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude,
        camera_capture_area, on_state, civil_code, d.dept_id, d.dept_name, d.area, p.province_tag,
@@ -222,6 +229,13 @@
            <if test="deviceType != null">#{deviceType},</if>
        </trim>
    </insert>
    <update id="batchUpdateDeviceType">
        update t_monitor set device_type = #{deviceType} where serial_number in
        <foreach collection="numbers" separator="," open="(" close=")" item="number">
            #{number}
        </foreach>
    </update>
    <update id="updateTMonitor" parameterType="com.ycl.platform.domain.entity.TMonitor">
        update t_monitor
@@ -494,10 +508,14 @@
               #{query.keyword} as keyword
        FROM
            t_monitor tm
                INNER JOIN t_yw_point yp ON yp.serial_number = tm.serial_number
        <where>
            <if test="query.keyword != null and query.keyword != ''">
                AND tm.name like concat('%', #{query.keyword}, '%')
            </if>
            <if test="query.startTIme != null and query.endTime != null">
                AND yp.create_time between #{query.startTime} and #{query.endTime}
            </if>
        </where>
    </select>