|
@@ -3,13 +3,13 @@
|
|
|
|
|
|
|
|
<mapper namespace="cn.reghao.tnb.content.app.vod.db.mapper.VideoPostTagMapper">
|
|
<mapper namespace="cn.reghao.tnb.content.app.vod.db.mapper.VideoPostTagMapper">
|
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="save" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into vod_video_tags
|
|
|
|
|
|
|
+ insert into vod_video_tag
|
|
|
(`video_id`,`scope`,`tag_id`)
|
|
(`video_id`,`scope`,`tag_id`)
|
|
|
values
|
|
values
|
|
|
(#{videoId},#{scope},#{tagId})
|
|
(#{videoId},#{scope},#{tagId})
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="saveAll" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="saveAll" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert ignore into vod_video_tags
|
|
|
|
|
|
|
+ insert ignore into vod_video_tag
|
|
|
(`video_id`,`scope`,`tag_id`)
|
|
(`video_id`,`scope`,`tag_id`)
|
|
|
values
|
|
values
|
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
@@ -18,19 +18,19 @@
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="updateSetScope">
|
|
<update id="updateSetScope">
|
|
|
- update vod_video_tags
|
|
|
|
|
|
|
+ update vod_video_tag
|
|
|
set `scope`=#{scope}
|
|
set `scope`=#{scope}
|
|
|
where video_id=#{videoId}
|
|
where video_id=#{videoId}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
- <select id="findAll" resultType="cn.reghao.tnb.content.app.vod.model.po.VideoPostTag">
|
|
|
|
|
|
|
+ <select id="findAll" resultType="cn.reghao.tnb.content.app.vod.model.po.VideoTag">
|
|
|
select *
|
|
select *
|
|
|
- from vod_video_tags
|
|
|
|
|
|
|
+ from vod_video_tag
|
|
|
limit 1000
|
|
limit 1000
|
|
|
</select>
|
|
</select>
|
|
|
<select id="countVideosByTag" resultType="java.lang.Integer">
|
|
<select id="countVideosByTag" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
select count(*)
|
|
|
- from vod_video_tags
|
|
|
|
|
|
|
+ from vod_video_tag
|
|
|
where tag_id=#{tagId} and scope in
|
|
where tag_id=#{tagId} and scope in
|
|
|
<foreach collection="scopes" item="id" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="scopes" item="id" index="index" open="(" close=")" separator=",">
|
|
|
#{id}
|
|
#{id}
|
|
@@ -38,7 +38,7 @@
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findVideosByPage" resultType="java.lang.String">
|
|
<select id="findVideosByPage" resultType="java.lang.String">
|
|
|
select video_id
|
|
select video_id
|
|
|
- from vod_video_tags
|
|
|
|
|
|
|
+ from vod_video_tag
|
|
|
where tag_id=#{tagId} and scope in
|
|
where tag_id=#{tagId} and scope in
|
|
|
<foreach collection="scopes" item="id" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="scopes" item="id" index="index" open="(" close=")" separator=",">
|
|
|
#{id}
|
|
#{id}
|
|
@@ -46,12 +46,12 @@
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findVideoTags" resultType="java.lang.String">
|
|
<select id="findVideoTags" resultType="java.lang.String">
|
|
|
select tag_id
|
|
select tag_id
|
|
|
- from vod_video_tags
|
|
|
|
|
|
|
+ from vod_video_tag
|
|
|
where video_id=#{videoId}
|
|
where video_id=#{videoId}
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findByGroupBy" resultType="java.lang.String">
|
|
<select id="findByGroupBy" resultType="java.lang.String">
|
|
|
select video_id
|
|
select video_id
|
|
|
- from vod_video_tags
|
|
|
|
|
|
|
+ from vod_video_tag
|
|
|
group by video_id
|
|
group by video_id
|
|
|
</select>
|
|
</select>
|
|
|
</mapper>
|
|
</mapper>
|