| | |
| | | <result property="cameraDept" column="camera_dept"/> |
| | | <result property="hybm" column="hybm"/> |
| | | <result property="lxbm" column="lxbm"/> |
| | | <result property="deviceType" column="device_type"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTMonitorVo"> |
| | |
| | | encoded_format, |
| | | camera_dept, |
| | | hybm, |
| | | lxbm |
| | | lxbm, |
| | | device_type |
| | | from t_monitor |
| | | </sql> |
| | | |
| | |
| | | where m.serial_number in |
| | | <foreach collection="list" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </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> |
| | | |
| | |
| | | <if test="cameraDept != null">camera_dept,</if> |
| | | <if test="hybm != null">hybm,</if> |
| | | <if test="lxbm != null">lxbm,</if> |
| | | <if test="deviceType != null">device_type,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if> |
| | |
| | | <if test="cameraDept != null">#{cameraDept},</if> |
| | | <if test="hybm != null">#{hybm},</if> |
| | | <if test="lxbm != null">#{lxbm},</if> |
| | | <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 |
| | |
| | | <if test="cameraDept != null">camera_dept = #{cameraDept},</if> |
| | | <if test="hybm != null">hybm = #{hybm},</if> |
| | | <if test="lxbm != null">lxbm = #{lxbm},</if> |
| | | <if test="deviceType != null">device_type = #{deviceType},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | #{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> |
| | | |