|
|
@@ -24,21 +24,34 @@
|
|
|
</update>
|
|
|
|
|
|
|
|
|
- <select id="getIAPPlatformList" resultType="cn.com.ctop.job.bytedance.data.entity.AigcProductPlatform">
|
|
|
+ <select id="getPlatformList" resultType="cn.com.ctop.job.bytedance.data.entity.AigcProductPlatform">
|
|
|
select t1.platform_id, t1.advertiser_id, t1.type, t1.platform_type, t1.platform_name, t1.mini_instance_id, t1.update_time, t1.create_time, t1.mi_appid, t1.membership_types, t1.max_charge, t1.min_charge, t1.recommended_charge, t1.single_price, t1._status, t1.social_credit_code, t1.movie_auth_status, t1.is_bytedance, t1.is_wechat, t1.is_dys, t1.source, ifnull(t1.mini_app_advertiser_id,t1.advertiser_id) as mini_app_advertiser_id, t3.access_token,
|
|
|
'天津星链视界信息技术有限公司' as copyright_owner
|
|
|
FROM deepthink.bytedance_product_main_advertiser t1
|
|
|
left join deepthink.bytedance_advertiser_list t2 on t1.advertiser_id=t2.advertiser_id
|
|
|
left join deepthink.bytedance_auth_list t3 on t2.admin_advertiser_id=t3.admin_advertiser_id
|
|
|
- where t1.`type`=2 and t1.`_status`=0 and platform_type=1 and t1.mini_instance_id is not null
|
|
|
- </select>
|
|
|
- <select id="getIAPPlatformInitList" resultType="cn.com.ctop.job.bytedance.data.entity.AigcProductPlatform">
|
|
|
+ where t1.`_status`=0 and platform_type=1 and t1.mini_instance_id is not null
|
|
|
+ <if test="businessMethod != null">
|
|
|
+ <choose>
|
|
|
+ <when test="businessMethod = 'IAP'">and t1.`type`=2 </when>
|
|
|
+ <when test="businessMethod = 'IAA'">and t1.`type`=1 </when>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
+ <if test="platformId != null and platformId != ''">
|
|
|
+ and t1.platform_id = #{platformId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="getPlatformInitList" resultType="cn.com.ctop.job.bytedance.data.entity.AigcProductPlatform">
|
|
|
select t1.platform_id, t1.advertiser_id, t1.type, t1.platform_type, t1.platform_name, t1.mini_instance_id, t1.update_time, t1.create_time, t1.mi_appid, t1.membership_types, t1.max_charge, t1.min_charge, t1.recommended_charge, t1.single_price, t1._status, t1.social_credit_code, t1.movie_auth_status, t1.is_bytedance, t1.is_wechat, t1.is_dys, t1.source, ifnull(t1.mini_app_advertiser_id,t1.advertiser_id) as mini_app_advertiser_id, t3.access_token,
|
|
|
'天津星链视界信息技术有限公司' as copyright_owner
|
|
|
FROM deepthink.bytedance_product_main_advertiser t1
|
|
|
left join deepthink.bytedance_advertiser_list t2 on t1.advertiser_id=t2.advertiser_id
|
|
|
left join deepthink.bytedance_auth_list t3 on t2.admin_advertiser_id=t3.admin_advertiser_id
|
|
|
- where t1.`type`=2 and t1.`_status`=0 and platform_type=1
|
|
|
+ where t1.`_status`=0 and platform_type=1
|
|
|
+ <choose>
|
|
|
+ <when test="businessMethod != null and businessMethod = 'IAP'">and t1.`type`=2 </when>
|
|
|
+ <when test="businessMethod != null and businessMethod = 'IAA'">and t1.`type`=1 </when>
|
|
|
+ </choose>
|
|
|
</select>
|
|
|
<select id="getIAAPlatformList" resultType="cn.com.ctop.job.bytedance.data.entity.AigcProductPlatform">
|
|
|
select t1.platform_id, t1.advertiser_id, t1.type, t1.platform_type, t1.platform_name, t1.mini_instance_id, t1.update_time, t1.create_time, t1.mi_appid, t1.membership_types, t1.max_charge, t1.min_charge, t1.recommended_charge, t1.single_price, t1._status, t1.social_credit_code, t1.movie_auth_status, t1.is_bytedance, t1.is_wechat, t1.is_dys, t1.source, ifnull(t1.mini_app_advertiser_id,t1.advertiser_id) as mini_app_advertiser_id, t3.access_token,
|
|
|
@@ -71,7 +84,7 @@
|
|
|
LEFT JOIN thirtpart.ly_video_category category ON video.category_id = category.id
|
|
|
LEFT JOIN (select video_id, min(sort) as sort, max(pay_amount/100.0) as maxpay, min(pay_amount/100.0) as minpay from thirtpart.ly_video_details where is_pay=1 group by video_id) payinfo ON video.id = payinfo.video_id
|
|
|
where (video.is_free = 1 or (payinfo.sort is not null and maxpay>0))
|
|
|
- and video.created_at > 1743436800
|
|
|
+ and (video.created_at > 1743436800 or video.updated_at > 1743436800)
|
|
|
and video.source in (1,3)
|
|
|
</select>
|
|
|
<select id="getIAAVideoList" resultType="cn.com.ctop.job.bytedance.data.entity.AigcProductAlbum">
|
|
|
@@ -89,10 +102,14 @@
|
|
|
where video.is_iaa_show=1 and video.created_at > 1743436800
|
|
|
and video.source in (1,3)
|
|
|
</select>
|
|
|
- <select id="getIAPProductTypeEnums" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
+ <select id="getProductTypeEnums" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select first_type_name, first_type_id, second_type_name, second_type_id, third_type_name, third_type_id
|
|
|
from deepthink.bytedance_product_group_types
|
|
|
- where `type`=2
|
|
|
+ where 1=1
|
|
|
+ <choose>
|
|
|
+ <when test="businessMethod != null and businessMethod = 'IAP'">and `type`=2 </when>
|
|
|
+ <when test="businessMethod != null and businessMethod = 'IAA'">and`type`=1 </when>
|
|
|
+ </choose>
|
|
|
</select>
|
|
|
<select id="getIAAProductTypeEnums" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select first_type_name, first_type_id, second_type_name, second_type_id, third_type_name, third_type_id
|
|
|
@@ -149,12 +166,18 @@
|
|
|
left join deepthink.bytedance_advertiser_list t2 on t1.advertiser_id=t2.advertiser_id
|
|
|
left join deepthink.bytedance_auth_list t3 on t2.admin_advertiser_id=t3.admin_advertiser_id
|
|
|
where t1.`_status`=0 and platform_type=3 and t1.is_dys=1
|
|
|
+ <if test="platformId != null and platformId != ''">
|
|
|
+ and t1.platform_id = #{platformId}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<select id="randomFanqieMovieImgs" resultType="java.lang.String">
|
|
|
select movie_url
|
|
|
from deepthink.changdu_movie_config
|
|
|
limit #{count}
|
|
|
</select>
|
|
|
+ <select id="allPlatform" resultType="java.lang.String">
|
|
|
+ select platform_id from deepthink.bytedance_product_main_advertiser where status=0
|
|
|
+ </select>
|
|
|
<insert id="batchInsertFanqiePlayletInfo" >
|
|
|
replace into deepthink.dys_distribute_promote_link
|
|
|
(playlet_id, playlet_purchase_panel_id, movie_name, promote_link, business_method, movie_source)
|
|
|
@@ -171,4 +194,14 @@
|
|
|
(#{item.playletId}, #{item.playletPurchasePanelId}, #{item.name}, #{item.albumLink}, #{item.businessMethod}, #{item.source})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
+ <insert id="batchInsertPlatform">
|
|
|
+ replace into deepthink.bytedance_product_main_advertiser
|
|
|
+ (platform_id, advertiser_id, type, platform_type, platform_name, mini_instance_id,
|
|
|
+ mi_appid, _status, social_credit_code, is_bytedance, is_wechat, is_dys, source)
|
|
|
+ values
|
|
|
+ <foreach collection="list" item="item" separator=",">
|
|
|
+ (#{item.platformId}, #{item.advertiserId}, #{item.type}, #{item.platformType}, #{item.platformName}, #{item.miniInstanceId},
|
|
|
+ #{item.miAppid}, #{item.status}, #{item.socialCreditCode}, #{item.isBytedance}, #{item.isWechat}, #{item.isDys}, #{item.source})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
</mapper>
|