|
@@ -3,66 +3,66 @@
|
|
<mapper namespace="cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouGroupTemplateMapper">
|
|
<mapper namespace="cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouGroupTemplateMapper">
|
|
|
|
|
|
<select id="getMd5ByPhotoId" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getMd5ByPhotoId" resultType="com.alibaba.fastjson.JSONObject">
|
|
- select
|
|
|
|
- signature as 'md5',
|
|
|
|
- material_type as 'materialType'
|
|
|
|
- from ctop_kuaishou_video_get
|
|
|
|
- where photo_id = #{photoId}
|
|
|
|
- and signature is not null
|
|
|
|
- limit 1
|
|
|
|
|
|
+ select signature as 'md5', material_type as 'materialType'
|
|
|
|
+ from ctop_kuaishou_video_get
|
|
|
|
+ where photo_id = #{photoId}
|
|
|
|
+ and signature is not null limit 1
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getImageListByMd5" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getImageListByMd5" resultType="com.alibaba.fastjson.JSONObject">
|
|
- select
|
|
|
|
- signature as 'md5',
|
|
|
|
- url as 'url'
|
|
|
|
- from ctop_material_cut_frame
|
|
|
|
- where video_signature = #{md5}
|
|
|
|
- ORDER BY RAND() LIMIT #{imageCount}
|
|
|
|
|
|
+ select signature as 'md5', url as 'url'
|
|
|
|
+ from ctop_material_cut_frame
|
|
|
|
+ where video_signature = #{md5}
|
|
|
|
+ ORDER BY RAND() LIMIT #{imageCount}
|
|
</select>
|
|
</select>
|
|
<select id="getImageJsonByMd5" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getImageJsonByMd5" resultType="com.alibaba.fastjson.JSONObject">
|
|
- select
|
|
|
|
- signature as 'md5',
|
|
|
|
- url as 'url'
|
|
|
|
- from ctop_material_cut_frame
|
|
|
|
- where video_signature = #{md5}
|
|
|
|
- ORDER BY RAND() LIMIT 1
|
|
|
|
|
|
+ select signature as 'md5', url as 'url'
|
|
|
|
+ from ctop_material_cut_frame
|
|
|
|
+ where video_signature = #{md5}
|
|
|
|
+ ORDER BY RAND() LIMIT 1
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getApiCreateCount" resultType="java.lang.Integer">
|
|
<select id="getApiCreateCount" resultType="java.lang.Integer">
|
|
select count(1)
|
|
select count(1)
|
|
- from
|
|
|
|
- ctop_kuaishou_group
|
|
|
|
- where account_id = #{accountId}
|
|
|
|
|
|
+ from ctop_kuaishou_group
|
|
|
|
+ where account_id = #{accountId}
|
|
and unit_type = #{unitType}
|
|
and unit_type = #{unitType}
|
|
- and DATE_FORMAT(group_create_time,'%Y-%m-%d') = #{date}
|
|
|
|
|
|
+ and DATE_FORMAT(group_create_time, '%Y-%m-%d') = #{date}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getUrlByPhotoId" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getUrlByPhotoId" resultType="com.alibaba.fastjson.JSONObject">
|
|
- select
|
|
|
|
- cover_url as 'coverUrl',
|
|
|
|
- url as 'url'
|
|
|
|
- from
|
|
|
|
- ctop_kuaishou_video_get
|
|
|
|
- where photo_id = #{photoId}
|
|
|
|
- and status = 0
|
|
|
|
- limit 1
|
|
|
|
|
|
+ select cover_url as 'coverUrl', url as 'url'
|
|
|
|
+ from ctop_kuaishou_video_get
|
|
|
|
+ where photo_id = #{photoId}
|
|
|
|
+ and status = 0 limit 1
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="getIdList" resultType="java.lang.Long">
|
|
|
|
- select id from ctop_kuaishou_group_template
|
|
|
|
- where task_status = 0
|
|
|
|
- order by create_time asc
|
|
|
|
- limit 70
|
|
|
|
|
|
+ <select id="getUrlByPhotoIds" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
+ select
|
|
|
|
+ cover_url as 'coverUrl',
|
|
|
|
+ url as 'url'
|
|
|
|
+ from
|
|
|
|
+ ctop_kuaishou_video_get
|
|
|
|
+ where account_id = #{accountId}
|
|
|
|
+ and photo_id in
|
|
|
|
+ <foreach collection="photoIds" item="item" separator=","
|
|
|
|
+ open="(" close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="getIdList" resultType="java.lang.Long">
|
|
|
|
+ select id
|
|
|
|
+ from ctop_kuaishou_group_template
|
|
|
|
+ where task_status = 0
|
|
|
|
+ order by create_time asc limit 70
|
|
|
|
+ </select>
|
|
|
|
|
|
|
|
|
|
<select id="getConfig" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="getConfig" resultType="com.alibaba.fastjson.JSONObject">
|
|
- select
|
|
|
|
- library_id as 'libraryId'
|
|
|
|
- from ctop_kuaishou_library_config
|
|
|
|
- where project_id = #{projectId}
|
|
|
|
|
|
+ select library_id as 'libraryId'
|
|
|
|
+ from ctop_kuaishou_library_config
|
|
|
|
+ where project_id = #{projectId}
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|