|
@@ -4,16 +4,16 @@
|
|
|
<mapper namespace="cn.reghao.tnb.content.app.geo.db.mapper.CameraPhotoMapper">
|
|
<mapper namespace="cn.reghao.tnb.content.app.geo.db.mapper.CameraPhotoMapper">
|
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into geo_camera_photo
|
|
insert into geo_camera_photo
|
|
|
- (`type`,`album_id`,`object_id`,`channel_id`,`photo_url`,`manufacturer`,`model`,`software`,`shot_at`,`geo`)
|
|
|
|
|
|
|
+ (`album_type`,`album_id`,`object_id`,`channel_code`,`photo_url`,`manufacturer`,`model`,`software`,`shot_at`,`geo`)
|
|
|
values
|
|
values
|
|
|
- (#{type},#{albumId},#{objectId},#{channelId},#{photoUrl},#{manufacturer},#{model},#{software},#{shotAt},point(#{longitude},#{latitude}))
|
|
|
|
|
|
|
+ (#{albumType},#{albumId},#{objectId},#{channelCode},#{photoUrl},#{manufacturer},#{model},#{software},#{shotAt},point(#{longitude},#{latitude}))
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="saveAll" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="saveAll" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert ignore into geo_camera_photo
|
|
insert ignore into geo_camera_photo
|
|
|
- (`type`,`album_id`,`object_id`,`channel_id`,`photo_url`,`manufacturer`,`model`,`software`,`shot_at`,`geo`)
|
|
|
|
|
|
|
+ (`album_type`,`album_id`,`object_id`,`channel_code`,`photo_url`,`manufacturer`,`model`,`software`,`shot_at`,`geo`)
|
|
|
values
|
|
values
|
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
|
- (#{item.type},#{item.albumId},#{item.objectId},#{item.channelId},#{item.photoUrl},#{item.manufacturer},#{item.model},#{item.software},#{item.shotAt},point(#{item.longitude},#{item.latitude}))
|
|
|
|
|
|
|
+ (#{item.albumType},#{item.albumId},#{item.objectId},#{item.channelCode},#{item.photoUrl},#{item.manufacturer},#{item.model},#{item.software},#{item.shotAt},point(#{item.longitude},#{item.latitude}))
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -22,6 +22,11 @@
|
|
|
set album_id=#{albumId}
|
|
set album_id=#{albumId}
|
|
|
where object_id=#{objectId}
|
|
where object_id=#{objectId}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
+ <update id="updateSetAlbumType">
|
|
|
|
|
+ update geo_camera_photo
|
|
|
|
|
+ set album_type=#{albumType}
|
|
|
|
|
+ where object_id=#{objectId}
|
|
|
|
|
+ </update>
|
|
|
|
|
|
|
|
<delete id="delete">
|
|
<delete id="delete">
|
|
|
delete from geo_camera_photo
|
|
delete from geo_camera_photo
|
|
@@ -76,19 +81,29 @@
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findCommentMarkerInfo" resultType="cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo">
|
|
<select id="findCommentMarkerInfo" resultType="cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo">
|
|
|
select reply.item_id,reply.reply_id,reply.extra as sku,reply.reply_content,reply.append_content,
|
|
select reply.item_id,reply.reply_id,reply.extra as sku,reply.reply_content,reply.append_content,
|
|
|
- photo.object_id as upload_id,photo.channel_id,photo.photo_url
|
|
|
|
|
|
|
+ photo.object_id as upload_id,photo.channel_code,photo.photo_url
|
|
|
from geo_camera_photo photo
|
|
from geo_camera_photo photo
|
|
|
inner join geo_mall_reply reply
|
|
inner join geo_mall_reply reply
|
|
|
on photo.album_id=reply.reply_id and photo.id=#{id} and photo.geo is not null
|
|
on photo.album_id=reply.reply_id and photo.id=#{id} and photo.geo is not null
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findMarkerInfo" resultType="cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo">
|
|
<select id="findMarkerInfo" resultType="cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo">
|
|
|
- select object_id as upload_id,channel_id,photo_url
|
|
|
|
|
|
|
+ select object_id as upload_id,channel_code,photo_url
|
|
|
from geo_camera_photo
|
|
from geo_camera_photo
|
|
|
where id=#{id} and geo is not null
|
|
where id=#{id} and geo is not null
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findAlbumMarkerInfo" resultType="cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo">
|
|
<select id="findAlbumMarkerInfo" resultType="cn.reghao.tnb.content.app.geo.model.vo.MarkerInfo">
|
|
|
- select object_id as upload_id,album_id as item_id,channel_id,photo_url
|
|
|
|
|
|
|
+ select object_id as upload_id,album_id as item_id,channel_code,photo_url
|
|
|
from geo_camera_photo
|
|
from geo_camera_photo
|
|
|
where id=#{id} and geo is not null
|
|
where id=#{id} and geo is not null
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+ <select id="findByAlbumId" resultType="cn.reghao.tnb.content.app.geo.model.po.CameraPhoto">
|
|
|
|
|
+ select *
|
|
|
|
|
+ from geo_camera_photo
|
|
|
|
|
+ where album_id=#{albumId}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="findByAlbumType" resultType="cn.reghao.tnb.content.app.geo.model.po.CameraPhoto">
|
|
|
|
|
+ select *
|
|
|
|
|
+ from geo_camera_photo
|
|
|
|
|
+ where album_type is null
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|