| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.welampiot.dao.VideoMonitorDao">
- <select id="getListByVO" resultType="com.welampiot.dto.VideoMonitorDTO" parameterType="com.welampiot.vo.VideoMonitorVO">
- select id,name,image from video_monitor
- where lamp_pole_id = 0
- <if test="sectionList != null and !sectionList.isEmpty()">
- and sectionid in
- <foreach item="vo" collection="sectionList" open="(" separator="," close=")">
- #{vo}
- </foreach>
- </if>
- order by id desc
- <if test="offset != null and limit != null">
- limit #{offset},#{limit}
- </if>
- </select>
- <select id="getVideoListBySectionList" resultType="com.welampiot.dto.VideoMonitorDTO">
- select v.id,v.name,v.latitude,v.longitude,v.image
- from video_monitor v
- where 1=1
- <if test="sectionList != null and !sectionList.isEmpty()">
- and v.sectionid in
- <foreach collection="sectionList" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- </select>
- <update id="changeVideoMonitorLocationById" parameterType="VideoMonitorDTO">
- update
- video_monitor v
- set
- v.longitude = #{longitude},
- v.latitude = #{latitude}
- where v.id = #{id}
- </update>
- </mapper>
|