|
|
|
@ -45,17 +45,58 @@
|
|
|
|
|
<result column="recv_time" jdbcType="BIGINT" property="recvTime"/>
|
|
|
|
|
<result column="path" jdbcType="VARCHAR" property="path"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<resultMap id="PhotoResultMap" type="com.shxy.xymanager_common.entity.TerminalPhoto">
|
|
|
|
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
|
|
|
|
<result column="term_id" jdbcType="INTEGER" property="termId"/>
|
|
|
|
|
<result column="channel_id" jdbcType="INTEGER" property="channelId"/>
|
|
|
|
|
<result column="preset_id" jdbcType="INTEGER" property="presetId"/>
|
|
|
|
|
<result column="orginal_id" jdbcType="INTEGER" property="orginalId"/>
|
|
|
|
|
<result column="media_type" jdbcType="INTEGER" property="mediaType"/>
|
|
|
|
|
<result column="width" jdbcType="INTEGER" property="width"/>
|
|
|
|
|
<result column="height" jdbcType="INTEGER" property="height"/>
|
|
|
|
|
<result column="file_size" jdbcType="INTEGER" property="fileSize"/>
|
|
|
|
|
<result column="photo_time" jdbcType="BIGINT" property="photoTime"/>
|
|
|
|
|
<result column="recv_time" jdbcType="BIGINT" property="recvTime"/>
|
|
|
|
|
<result column="path" jdbcType="VARCHAR" property="path"/>
|
|
|
|
|
<result column="thumb" jdbcType="VARCHAR" property="thumb"/>
|
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
|
|
<result column="width" jdbcType="INTEGER" property="markWidth"/>
|
|
|
|
|
<result column="height" jdbcType="INTEGER" property="markHeight"/>
|
|
|
|
|
<result column="color" jdbcType="VARCHAR" property="color"/>
|
|
|
|
|
<result column="boder_width" jdbcType="SMALLINT" property="boderWidth"/>
|
|
|
|
|
<collection property="lineList" javaType="list" ofType="com.shxy.xymanager_common.dto.TermChannelCoordinateDto">
|
|
|
|
|
<result column="x1" jdbcType="FLOAT" property="x1"/>
|
|
|
|
|
<result column="x2" jdbcType="FLOAT" property="x2"/>
|
|
|
|
|
<result column="y1" jdbcType="FLOAT" property="y1"/>
|
|
|
|
|
<result column="y2" jdbcType="FLOAT" property="y2"/>
|
|
|
|
|
</collection>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
id, term_id, channel_id,orginal_id, media_type,preset_id, width, height, file_size, photo_time, recv_time,
|
|
|
|
|
path, thumb,create_time
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectPhotoList" resultMap="BaseResultMap">
|
|
|
|
|
<select id="selectPhotoList" resultMap="PhotoResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from terminal_photos
|
|
|
|
|
where term_id = #{terminalid} and photo_time between #{starttime} and #{endtime}
|
|
|
|
|
tp.id as id, tp.term_id as term_id, tp.channel_id as channel_id,tp.orginal_id as orginal_id,
|
|
|
|
|
tp.media_type as media_type,tp.preset_id as preset_id, tp.width as width, tp.height as height,
|
|
|
|
|
tp.file_size as file_size, tp.photo_time as photo_time, tp.recv_time as recv_time,
|
|
|
|
|
tp.path as path, tp.thumb as thumb,tp.create_time as create_time,
|
|
|
|
|
tpm.width as width,
|
|
|
|
|
tpm.height as height,
|
|
|
|
|
tpm.color as color,
|
|
|
|
|
tpm.boder_width as boder_width,
|
|
|
|
|
tpm.id as mark_id,
|
|
|
|
|
tpmp.id as path_id,
|
|
|
|
|
tpmp.x1 as x1,
|
|
|
|
|
tpmp.x2 as x2,
|
|
|
|
|
tpmp.y1 as y1,
|
|
|
|
|
tpmp.y2 as y2
|
|
|
|
|
from terminal_photos tp left join terminal_photo_marks tpm on tp.mark_id = tpm.id
|
|
|
|
|
left join terminal_photo_mark_paths tpmp on tpmp.mark_id = tpm.id
|
|
|
|
|
where tp.term_id = #{terminalid} and photo_time between #{starttime} and #{endtime}
|
|
|
|
|
<if test="channelid != null and channelid.size>0">
|
|
|
|
|
and channel_id in
|
|
|
|
|
and tp.channel_id in
|
|
|
|
|
<foreach collection="channelid" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
@ -397,7 +438,18 @@
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteById">
|
|
|
|
|
|
|
|
|
|
<update id="updatePhotoMarkId" parameterType="com.shxy.xymanager_common.vo.PhotoMarkVo">
|
|
|
|
|
update `terminal_photos`
|
|
|
|
|
<set>
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
mark_id = #{id,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{photoId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteByMarkId">
|
|
|
|
|
delete from terminal_photo_mark_paths
|
|
|
|
|
where mark_id = #{markId}
|
|
|
|
|
</delete>
|
|
|
|
|