|
|
@@ -4,27 +4,29 @@
|
|
|
|
|
|
|
|
|
<insert id="replaceAdqAccountList">
|
|
|
- INSERT into deepthink.adq_advertiser_list(
|
|
|
+ INSERT INTO media_advertiser_account(
|
|
|
+ media_type,
|
|
|
admin_advertiser_id,
|
|
|
advertiser_id,
|
|
|
advertiser_name,
|
|
|
- `corporation_name`,
|
|
|
- is_adx,
|
|
|
- is_mp
|
|
|
+ is_valid,
|
|
|
+ raw_response
|
|
|
)
|
|
|
values
|
|
|
<foreach collection="adds" item="add" separator=",">
|
|
|
(
|
|
|
+ 3,
|
|
|
#{add.adminAdvertiserId},
|
|
|
#{add.advertiserId},
|
|
|
#{add.advertiserName},
|
|
|
- #{add.corporationName},
|
|
|
- #{add.isAdx},
|
|
|
- #{add.isMp}
|
|
|
+ 1,
|
|
|
+ #{add.rawResponse}
|
|
|
)
|
|
|
</foreach>
|
|
|
on duplicate key update
|
|
|
- advertiser_name= VALUES(advertiser_name)
|
|
|
+ advertiser_name= VALUES(advertiser_name),
|
|
|
+ is_valid= VALUES(is_valid),
|
|
|
+ raw_response= VALUES(raw_response)
|
|
|
</insert>
|
|
|
<insert id="addAgent">
|
|
|
replace into deepthink.adq_agent_advertiser_list
|
|
|
@@ -59,8 +61,9 @@
|
|
|
</insert>
|
|
|
<delete id="deleteAdvertiserListByAdminId" parameterType="java.lang.Long">
|
|
|
DELETE
|
|
|
- FROM deepthink.adq_advertiser_list
|
|
|
- WHERE admin_advertiser_id = #{advertiserId}
|
|
|
+ FROM media_advertiser_account
|
|
|
+ WHERE media_type = 3
|
|
|
+ AND admin_advertiser_id = #{advertiserId}
|
|
|
</delete>
|
|
|
<select id="getAdvertiserList" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
select t1.admin_advertiser_id as 'adminAdvertiserId', t1.advertiser_id as 'advertiserId', t3.access_token as 'accessToken'
|