|
|
|
@ -94,27 +94,13 @@
|
|
|
|
|
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="PhotoResultMap">
|
|
|
|
|
<select id="selectPhotoList" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
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 tp.channel_id in
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
from terminal_photos
|
|
|
|
|
where term_id = #{terminalid} and photo_time between #{starttime} and #{endtime}
|
|
|
|
|
<if test="channelid != null">
|
|
|
|
|
and channel_id in
|
|
|
|
|
<foreach collection="channelid" item="item" index="index" open="(" close=")" separator=",">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|