|
|
@@ -5,7 +5,7 @@
|
|
|
<!-- 插入或更新(REPORTING_TIME 口径)唯一键: group_id + account_id + dynamic_creative_id + date -->
|
|
|
<insert id="upsert" parameterType="com.moka.gdtauto.entity.RepDailyCreativeReport">
|
|
|
INSERT INTO rep_daily_creative_report (
|
|
|
- conf_id, group_id, group_name, account_id, dynamic_creative_id, dynamic_creative_name, date,
|
|
|
+ conf_id, group_id, group_name, account_id, adgroup_id, adgroup_name, dynamic_creative_id, dynamic_creative_name, date,
|
|
|
view_count, view_user_count, avg_view_per_user,
|
|
|
valid_click_count, click_user_count, cpc, ctr,
|
|
|
valuable_click_count, valuable_click_cost, valuable_click_rate,
|
|
|
@@ -69,7 +69,7 @@
|
|
|
income_val_7, income_roi_7, income_val_14, income_roi_14,
|
|
|
income_val_24h, income_roi_1_24h
|
|
|
) VALUES (
|
|
|
- #{report.confId}, #{report.groupId}, #{report.groupName}, #{report.accountId}, #{report.dynamicCreativeId}, #{report.dynamicCreativeName}, #{report.date},
|
|
|
+ #{report.confId}, #{report.groupId}, #{report.groupName}, #{report.accountId}, #{report.adgroupId}, #{report.adgroupName}, #{report.dynamicCreativeId}, #{report.dynamicCreativeName}, #{report.date},
|
|
|
#{report.viewCount}, #{report.viewUserCount}, #{report.avgViewPerUser},
|
|
|
#{report.validClickCount}, #{report.clickUserCount}, #{report.cpc}, #{report.ctr},
|
|
|
#{report.valuableClickCount}, #{report.valuableClickCost}, #{report.valuableClickRate},
|
|
|
@@ -133,7 +133,7 @@
|
|
|
#{report.incomeVal7}, #{report.incomeRoi7}, #{report.incomeVal14}, #{report.incomeRoi14},
|
|
|
#{report.incomeVal24h}, #{report.incomeRoi124h}
|
|
|
) ON DUPLICATE KEY UPDATE
|
|
|
- group_name = VALUES(group_name),
|
|
|
+ group_name = VALUES(group_name), adgroup_id = VALUES(adgroup_id), adgroup_name = VALUES(adgroup_name),
|
|
|
view_count = VALUES(view_count), view_user_count = VALUES(view_user_count), avg_view_per_user = VALUES(avg_view_per_user),
|
|
|
valid_click_count = VALUES(valid_click_count), click_user_count = VALUES(click_user_count), cpc = VALUES(cpc), ctr = VALUES(ctr),
|
|
|
valuable_click_count = VALUES(valuable_click_count), valuable_click_cost = VALUES(valuable_click_cost), valuable_click_rate = VALUES(valuable_click_rate),
|
|
|
@@ -201,7 +201,7 @@
|
|
|
<!-- 批量插入或更新(REPORTING_TIME 口径)-->
|
|
|
<insert id="batchUpsert" parameterType="java.util.List">
|
|
|
INSERT INTO rep_daily_creative_report (
|
|
|
- conf_id, group_id, group_name, account_id, dynamic_creative_id, dynamic_creative_name, date,
|
|
|
+ conf_id, group_id, group_name, account_id, adgroup_id, adgroup_name, dynamic_creative_id, dynamic_creative_name, date,
|
|
|
view_count, view_user_count, avg_view_per_user,
|
|
|
valid_click_count, click_user_count, cpc, ctr,
|
|
|
valuable_click_count, valuable_click_cost, valuable_click_rate,
|
|
|
@@ -267,7 +267,7 @@
|
|
|
) VALUES
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
(
|
|
|
- #{item.confId}, #{item.groupId}, #{item.groupName}, #{item.accountId}, #{item.dynamicCreativeId}, #{item.dynamicCreativeName}, #{item.date},
|
|
|
+ #{item.confId}, #{item.groupId}, #{item.groupName}, #{item.accountId}, #{item.adgroupId}, #{item.adgroupName}, #{item.dynamicCreativeId}, #{item.dynamicCreativeName}, #{item.date},
|
|
|
#{item.viewCount}, #{item.viewUserCount}, #{item.avgViewPerUser},
|
|
|
#{item.validClickCount}, #{item.clickUserCount}, #{item.cpc}, #{item.ctr},
|
|
|
#{item.valuableClickCount}, #{item.valuableClickCost}, #{item.valuableClickRate},
|
|
|
@@ -333,7 +333,7 @@
|
|
|
)
|
|
|
</foreach>
|
|
|
ON DUPLICATE KEY UPDATE
|
|
|
- group_name = VALUES(group_name),
|
|
|
+ group_name = VALUES(group_name), adgroup_id = VALUES(adgroup_id), adgroup_name = VALUES(adgroup_name),
|
|
|
view_count = VALUES(view_count), view_user_count = VALUES(view_user_count), avg_view_per_user = VALUES(avg_view_per_user),
|
|
|
valid_click_count = VALUES(valid_click_count), click_user_count = VALUES(click_user_count), cpc = VALUES(cpc), ctr = VALUES(ctr),
|
|
|
valuable_click_count = VALUES(valuable_click_count), valuable_click_cost = VALUES(valuable_click_cost), valuable_click_rate = VALUES(valuable_click_rate),
|