瀏覽代碼

feat:日报调整

pudongliang 4 月之前
父節點
當前提交
b12f137277
共有 54 個文件被更改,包括 263 次插入1106 次删除
  1. 1 1
      portal/dist/assets/accountGroup-DDCIkMjo.js
  2. 1 1
      portal/dist/assets/adAutoConf-CRCvAD5I.js
  3. 1 1
      portal/dist/assets/adPlanConf-DN-584PS.js
  4. 1 1
      portal/dist/assets/auth-IuMEyWYV.js
  5. 1 1
      portal/dist/assets/conversion-BODC77PG.js
  6. 0 0
      portal/dist/assets/detail-CpUG91Sg.js
  7. 1 1
      portal/dist/assets/drama-jl25vPkl.js
  8. 0 0
      portal/dist/assets/edit-e94N4yRC.js
  9. 1 1
      portal/dist/assets/index-BKDPOEyM.js
  10. 0 0
      portal/dist/assets/index-BQuC92rp.js
  11. 0 0
      portal/dist/assets/index-BTAt-IJS.js
  12. 0 0
      portal/dist/assets/index-BfN_gJb3.js
  13. 0 0
      portal/dist/assets/index-BikXfVUD.js
  14. 0 0
      portal/dist/assets/index-Bj29k_yn.js
  15. 0 0
      portal/dist/assets/index-C1JCKUzS.js
  16. 0 0
      portal/dist/assets/index-C4If8fgq.js
  17. 0 0
      portal/dist/assets/index-C4eMpgUw.js
  18. 0 0
      portal/dist/assets/index-C8mk57_0.js
  19. 0 0
      portal/dist/assets/index-CDQub9cQ.js
  20. 0 0
      portal/dist/assets/index-CLF_RIrq.js
  21. 0 0
      portal/dist/assets/index-CLaYrYO6.js
  22. 0 0
      portal/dist/assets/index-Cgmy5gPA.js
  23. 0 0
      portal/dist/assets/index-ChcqLx0p.js
  24. 0 0
      portal/dist/assets/index-CrPAI2Vg.js
  25. 0 0
      portal/dist/assets/index-D8PAajBN.js
  26. 0 0
      portal/dist/assets/index-DRumpO8_.js
  27. 0 0
      portal/dist/assets/index-MOi0Cfqu.js
  28. 1 1
      portal/dist/assets/loadPageConf-tW7gTqRx.js
  29. 1 1
      portal/dist/assets/ossFile-DvzFArb5.js
  30. 0 0
      portal/dist/assets/request-BM46Io-o.js
  31. 1 1
      portal/dist/assets/user-BiSodnLp.js
  32. 1 1
      portal/dist/index.html
  33. 1 12
      portal/src/views/ad-plan-conf/index.vue
  34. 10 8
      src/main/java/com/moka/gdtauto/controller/AssetDramaSyncConfController.java
  35. 1 0
      src/main/java/com/moka/gdtauto/entity/BaseDailyAdgroupReport.java
  36. 1 0
      src/main/java/com/moka/gdtauto/entity/BaseDailyCreativeReport.java
  37. 6 0
      src/main/java/com/moka/gdtauto/mapper/AdPlanCreativeMapper.java
  38. 11 3
      src/main/java/com/moka/gdtauto/mapper/AdPlanMapper.java
  39. 0 2
      src/main/java/com/moka/gdtauto/mapper/RepDailyAdgroupReportMapper.java
  40. 0 8
      src/main/java/com/moka/gdtauto/mapper/RepDailyCreativeReportMapper.java
  41. 0 1
      src/main/java/com/moka/gdtauto/mapper/ReqDailyAdgroupReportMapper.java
  42. 0 8
      src/main/java/com/moka/gdtauto/mapper/ReqDailyCreativeReportMapper.java
  43. 0 4
      src/main/java/com/moka/gdtauto/service/AdPlanAutoExecutor.java
  44. 0 4
      src/main/java/com/moka/gdtauto/service/AdPlanCreativeAutoExecutor.java
  45. 17 17
      src/main/java/com/moka/gdtauto/service/AdPlanCreativeDailyReportService.java
  46. 56 104
      src/main/java/com/moka/gdtauto/service/DailyAdgroupReportService.java
  47. 67 105
      src/main/java/com/moka/gdtauto/service/DailyCreativeReportService.java
  48. 35 1
      src/main/resources/mapper/AdPlanCreativeMapper.xml
  49. 29 0
      src/main/resources/mapper/AdPlanMapper.xml
  50. 3 197
      src/main/resources/mapper/RepDailyAdgroupReportMapper.xml
  51. 0 196
      src/main/resources/mapper/RepDailyCreativeReportMapper.xml
  52. 3 199
      src/main/resources/mapper/ReqDailyAdgroupReportMapper.xml
  53. 3 200
      src/main/resources/mapper/ReqDailyCreativeReportMapper.xml
  54. 9 26
      src/test/java/com/moka/gdtauto/service/AdPlanDailyReportSyncTest.java

+ 1 - 1
portal/dist/assets/accountGroup-jxI7tDvm.js → portal/dist/assets/accountGroup-DDCIkMjo.js

@@ -1 +1 @@
-import{r as u}from"./request-DA3HuAl4.js";function c(t){return u({url:"/api/account-group/create",method:"post",data:t})}function e(t){return u({url:"/api/account-group/update",method:"post",data:t})}function n(t){return u({url:`/api/account-group/${t}`,method:"delete"})}function a(t=1,o=10){return u({url:"/api/account-group/list",method:"get",params:{pageNum:t,pageSize:o}})}function p(){return u({url:"/api/account-group/all",method:"get"})}function i(t){return u({url:`/api/account-group/${t}/accounts`,method:"get"})}export{i as a,p as b,c,n as d,a as g,e as u};
+import{r as u}from"./request-BM46Io-o.js";function c(t){return u({url:"/api/account-group/create",method:"post",data:t})}function e(t){return u({url:"/api/account-group/update",method:"post",data:t})}function n(t){return u({url:`/api/account-group/${t}`,method:"delete"})}function a(t=1,o=10){return u({url:"/api/account-group/list",method:"get",params:{pageNum:t,pageSize:o}})}function p(){return u({url:"/api/account-group/all",method:"get"})}function i(t){return u({url:`/api/account-group/${t}/accounts`,method:"get"})}export{i as a,p as b,c,n as d,a as g,e as u};

+ 1 - 1
portal/dist/assets/adAutoConf-Cvp0SyVE.js → portal/dist/assets/adAutoConf-CRCvAD5I.js

@@ -1 +1 @@
-import{r as e}from"./request-DA3HuAl4.js";function u(t){return e({url:"/api/ad-auto-conf/list",method:"get",params:t})}function n(t){return e({url:`/api/ad-auto-conf/${t}`,method:"get"})}function a(t){return e({url:"/api/ad-auto-conf",method:"post",data:t})}function r(t){return e({url:"/api/ad-auto-conf/update",method:"post",data:t})}function d(t){return e({url:`/api/ad-auto-conf/${t}`,method:"delete"})}function i(t){return e({url:`/api/ad-auto-conf/execute?id=${t}`,method:"post"})}function f(t){return e({url:"/api/execute-log/list",method:"get",params:t})}function c(t){return e({url:"/api/execute-log/getChildLog",method:"get",params:t})}export{c as a,f as b,n as c,d,i as e,u as g,a as s,r as u};
+import{r as e}from"./request-BM46Io-o.js";function u(t){return e({url:"/api/ad-auto-conf/list",method:"get",params:t})}function n(t){return e({url:`/api/ad-auto-conf/${t}`,method:"get"})}function a(t){return e({url:"/api/ad-auto-conf",method:"post",data:t})}function r(t){return e({url:"/api/ad-auto-conf/update",method:"post",data:t})}function d(t){return e({url:`/api/ad-auto-conf/${t}`,method:"delete"})}function i(t){return e({url:`/api/ad-auto-conf/execute?id=${t}`,method:"post"})}function f(t){return e({url:"/api/execute-log/list",method:"get",params:t})}function c(t){return e({url:"/api/execute-log/getChildLog",method:"get",params:t})}export{c as a,f as b,n as c,d,i as e,u as g,a as s,r as u};

+ 1 - 1
portal/dist/assets/adPlanConf-DHdYxsOK.js → portal/dist/assets/adPlanConf-DN-584PS.js

@@ -1 +1 @@
-import{r as a}from"./request-DA3HuAl4.js";function d(n){return a({url:"/api/ad-plan-conf/reCreate",method:"post",data:n})}function o(n){return a({url:"/api/ad-plan-conf/generate-plan",method:"post",data:n})}function u(n){return a({url:`/api/ad-plan-conf/reGeneratePlan/${n}`,method:"get"})}function l(n){return a({url:`/api/ad-plan-conf/syncSystemStatus/${n}`,method:"get"})}function p(n){return a({url:"/api/ad-plan-conf/create",method:"post",data:n})}function s(n){return a({url:"/api/ad-plan-conf/update",method:"post",data:n})}function i(n=1,e=10,t={}){return a({url:"/api/ad-plan-conf/list",method:"get",params:{pageNum:n,pageSize:e,...t}})}function f(n){return a({url:`/api/ad-plan-conf/${n}`,method:"get"})}function c(n){return a({url:"/api/ad-plan/list",method:"get",params:n})}function g(n){return a({url:`/api/ad-plan-creative/plan/${n}`,method:"get"})}function m(n){return a({url:"/api/ad-plan-conf/gdtSuspendByConfId",params:{confId:n},method:"get"})}function h(n){return a({url:"/api/ad-plan-conf/gdtDeleteByConfId",params:{confId:n},method:"get"})}function C(n,e){return a({url:`/api/ad-plan-conf/gdtSuspendByPlanIds/${n}`,method:"post",data:e})}function P(n,e){return a({url:`/api/ad-plan-conf/gdtDeleteByPlanIds/${n}`,method:"post",data:e})}function y(n=[]){return a({url:"/api/ad-plan-conf/getOneCreativeImage",method:"post",data:n})}function I(){return a({url:"/api/ad-plan-conf/getOneBrandImage",method:"get"})}function B(n=[]){return a({url:"/api/ad-plan-conf/getOneCreativeVideo",method:"post",data:n})}export{y as a,I as b,B as c,o as d,p as e,f,i as g,c as h,h as i,C as j,P as k,l,u as m,g as n,d as r,m as s,s as u};
+import{r as a}from"./request-BM46Io-o.js";function d(n){return a({url:"/api/ad-plan-conf/reCreate",method:"post",data:n})}function o(n){return a({url:"/api/ad-plan-conf/generate-plan",method:"post",data:n})}function u(n){return a({url:`/api/ad-plan-conf/reGeneratePlan/${n}`,method:"get"})}function l(n){return a({url:`/api/ad-plan-conf/syncSystemStatus/${n}`,method:"get"})}function p(n){return a({url:"/api/ad-plan-conf/create",method:"post",data:n})}function s(n){return a({url:"/api/ad-plan-conf/update",method:"post",data:n})}function i(n=1,e=10,t={}){return a({url:"/api/ad-plan-conf/list",method:"get",params:{pageNum:n,pageSize:e,...t}})}function f(n){return a({url:`/api/ad-plan-conf/${n}`,method:"get"})}function c(n){return a({url:"/api/ad-plan/list",method:"get",params:n})}function g(n){return a({url:`/api/ad-plan-creative/plan/${n}`,method:"get"})}function m(n){return a({url:"/api/ad-plan-conf/gdtSuspendByConfId",params:{confId:n},method:"get"})}function h(n){return a({url:"/api/ad-plan-conf/gdtDeleteByConfId",params:{confId:n},method:"get"})}function C(n,e){return a({url:`/api/ad-plan-conf/gdtSuspendByPlanIds/${n}`,method:"post",data:e})}function P(n,e){return a({url:`/api/ad-plan-conf/gdtDeleteByPlanIds/${n}`,method:"post",data:e})}function y(n=[]){return a({url:"/api/ad-plan-conf/getOneCreativeImage",method:"post",data:n})}function I(){return a({url:"/api/ad-plan-conf/getOneBrandImage",method:"get"})}function B(n=[]){return a({url:"/api/ad-plan-conf/getOneCreativeVideo",method:"post",data:n})}export{y as a,I as b,B as c,o as d,p as e,f,i as g,c as h,h as i,C as j,P as k,l,u as m,g as n,d as r,m as s,s as u};

+ 1 - 1
portal/dist/assets/auth-W83l4p_r.js → portal/dist/assets/auth-IuMEyWYV.js

@@ -1 +1 @@
-import{r as t}from"./request-DA3HuAl4.js";function i(){return t({url:"/api/gdt/auth/authorize-url",method:"get"})}function n(r){return t({url:"/api/gdt/auth/refresh",method:"post",params:r})}function u(){return t({url:"/api/gdt/auth/list",method:"get"})}function a(){return u()}function o(){return t({url:"/api/gdt/auth/expiring",method:"get"})}export{o as a,a as b,i as g,u as l,n as r};
+import{r as t}from"./request-BM46Io-o.js";function i(){return t({url:"/api/gdt/auth/authorize-url",method:"get"})}function n(r){return t({url:"/api/gdt/auth/refresh",method:"post",params:r})}function u(){return t({url:"/api/gdt/auth/list",method:"get"})}function a(){return u()}function o(){return t({url:"/api/gdt/auth/expiring",method:"get"})}export{o as a,a as b,i as g,u as l,n as r};

+ 1 - 1
portal/dist/assets/conversion-VCVsCvT9.js → portal/dist/assets/conversion-BODC77PG.js

@@ -1 +1 @@
-import{r as t}from"./request-DA3HuAl4.js";function e(n,o){return t({url:"/api/gdt/conversion/sync",method:"post",params:{orgAccountId:n,accountId:o}})}function s(n=1,o=20){return t({url:"/api/gdt/conversion/list",method:"get",params:{page:n,pageSize:o}})}function i(n){return t({url:"/api/gdt/conversion/detail",method:"get",params:{conversionId:n}})}function a(){return t({url:"/api/gdt/conversion/all",method:"get"})}export{s as a,i as b,a as g,e as s};
+import{r as t}from"./request-BM46Io-o.js";function e(n,o){return t({url:"/api/gdt/conversion/sync",method:"post",params:{orgAccountId:n,accountId:o}})}function s(n=1,o=20){return t({url:"/api/gdt/conversion/list",method:"get",params:{page:n,pageSize:o}})}function i(n){return t({url:"/api/gdt/conversion/detail",method:"get",params:{conversionId:n}})}function a(){return t({url:"/api/gdt/conversion/all",method:"get"})}export{s as a,i as b,a as g,e as s};

文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/detail-CpUG91Sg.js


+ 1 - 1
portal/dist/assets/drama-CTkrefWy.js → portal/dist/assets/drama-jl25vPkl.js

@@ -1 +1 @@
-import{r as t}from"./request-DA3HuAl4.js";function n(a){return t({url:"/api/gdt/asset/drama/sync",method:"post",params:{accountId:a}})}function m(a=1,s=20,r=""){return t({url:"/api/gdt/asset/drama/list",method:"get",params:{dramaName:r,page:a,pageSize:s}})}function d(a){return t({url:"/api/gdt/asset/drama/myDramaAssets",method:"get",params:{dramaName:a}})}function o(){return t({url:"/api/gdt/asset/drama/sync/conf/myConf",method:"get"})}function u(a){return t({url:"/api/gdt/asset/drama/sync/conf/add",method:"post",data:a})}function i(a){return t({url:"/api/gdt/asset/drama/sync/conf/delete",method:"post",params:{id:a}})}export{o as a,u as b,i as d,m as g,d as m,n as s};
+import{r as t}from"./request-BM46Io-o.js";function n(a){return t({url:"/api/gdt/asset/drama/sync",method:"post",params:{accountId:a}})}function m(a=1,s=20,r=""){return t({url:"/api/gdt/asset/drama/list",method:"get",params:{dramaName:r,page:a,pageSize:s}})}function d(a){return t({url:"/api/gdt/asset/drama/myDramaAssets",method:"get",params:{dramaName:a}})}function o(){return t({url:"/api/gdt/asset/drama/sync/conf/myConf",method:"get"})}function u(a){return t({url:"/api/gdt/asset/drama/sync/conf/add",method:"post",data:a})}function i(a){return t({url:"/api/gdt/asset/drama/sync/conf/delete",method:"post",params:{id:a}})}export{o as a,u as b,i as d,m as g,d as m,n as s};

文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/edit-e94N4yRC.js


文件差異過大導致無法顯示
+ 1 - 1
portal/dist/assets/index-BKDPOEyM.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-BQuC92rp.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-BTAt-IJS.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-BfN_gJb3.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-BikXfVUD.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-Bj29k_yn.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-C1JCKUzS.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-C4If8fgq.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-C4eMpgUw.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-C8mk57_0.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-CDQub9cQ.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-CLF_RIrq.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-CLaYrYO6.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-Cgmy5gPA.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-ChcqLx0p.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-CrPAI2Vg.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-D8PAajBN.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-DRumpO8_.js


文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/index-MOi0Cfqu.js


+ 1 - 1
portal/dist/assets/loadPageConf-R1ZMHj6i.js → portal/dist/assets/loadPageConf-tW7gTqRx.js

@@ -1 +1 @@
-import{r as o}from"./request-DA3HuAl4.js";function t(a){return o({url:"/api/load-page-conf/list",method:"get",params:a})}function n(a){return o({url:`/api/load-page-conf/${a}`,method:"get"})}function r(a){return o({url:"/api/load-page-conf",method:"post",data:a})}function u(a){return o({url:"/api/load-page-conf",method:"put",data:a})}function d(){return o({url:"/api/load-page-conf/all",method:"get"})}export{t as a,n as b,r as c,d as g,u};
+import{r as o}from"./request-BM46Io-o.js";function t(a){return o({url:"/api/load-page-conf/list",method:"get",params:a})}function n(a){return o({url:`/api/load-page-conf/${a}`,method:"get"})}function r(a){return o({url:"/api/load-page-conf",method:"post",data:a})}function u(a){return o({url:"/api/load-page-conf",method:"put",data:a})}function d(){return o({url:"/api/load-page-conf/all",method:"get"})}export{t as a,n as b,r as c,d as g,u};

+ 1 - 1
portal/dist/assets/ossFile-6Mt8afDi.js → portal/dist/assets/ossFile-DvzFArb5.js

@@ -1 +1 @@
-import{r as t}from"./request-DA3HuAl4.js";function i(e){return t({timeout:12e5,url:"/api/oss-file/upload",method:"post",data:e,headers:{"Content-Type":"multipart/form-data"}})}function o(e){return t({url:"/api/oss-file/list",method:"get",params:e})}function r(e){return t({url:`/api/oss-file/${e}`,method:"delete"})}function l(e){return t({url:"/api/oss-file/batch",method:"delete",params:{fileIds:e}})}export{l as b,r as d,o as g,i as u};
+import{r as t}from"./request-BM46Io-o.js";function i(e){return t({timeout:12e5,url:"/api/oss-file/upload",method:"post",data:e,headers:{"Content-Type":"multipart/form-data"}})}function o(e){return t({url:"/api/oss-file/list",method:"get",params:e})}function r(e){return t({url:`/api/oss-file/${e}`,method:"delete"})}function l(e){return t({url:"/api/oss-file/batch",method:"delete",params:{fileIds:e}})}export{l as b,r as d,o as g,i as u};

文件差異過大導致無法顯示
+ 0 - 0
portal/dist/assets/request-BM46Io-o.js


+ 1 - 1
portal/dist/assets/user-BFviY0AU.js → portal/dist/assets/user-BiSodnLp.js

@@ -1 +1 @@
-import{r as e}from"./request-DA3HuAl4.js";function t(){return e({url:"/api/user/list",method:"get"})}function u(r){return e({url:"/api/user/info",method:"get",params:r})}function n(r){return e({url:"/api/user/user-token-url",method:"get",params:r})}function o(r){return e({url:"/api/user/login",method:"post",params:r})}function a(r){return e({url:"/api/user/change-password",method:"post",params:r})}function i(r){return e({url:"/api/user/save",method:"post",params:r})}export{u as a,t as b,a as c,n as g,o as l,i as s};
+import{r as e}from"./request-BM46Io-o.js";function t(){return e({url:"/api/user/list",method:"get"})}function u(r){return e({url:"/api/user/info",method:"get",params:r})}function n(r){return e({url:"/api/user/user-token-url",method:"get",params:r})}function o(r){return e({url:"/api/user/login",method:"post",params:r})}function a(r){return e({url:"/api/user/change-password",method:"post",params:r})}function i(r){return e({url:"/api/user/save",method:"post",params:r})}export{u as a,t as b,a as c,n as g,o as l,i as s};

+ 1 - 1
portal/dist/index.html

@@ -5,7 +5,7 @@
     <link rel="icon" type="image/svg+xml" href="/vite.svg" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>腾讯广告自动化管理后台</title>
-    <script type="module" crossorigin src="/assets/index-BTeYLlkv.js"></script>
+    <script type="module" crossorigin src="/assets/index-BKDPOEyM.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-5iqyiYFJ.css">
   </head>
   <body>

+ 1 - 12
portal/src/views/ad-plan-conf/index.vue

@@ -199,7 +199,6 @@
 
         <el-form-item label="广告类型" prop="adType">
           <el-radio-group v-model="formData.adType">
-            <el-radio label="企微" :value="1" />
             <el-radio label="ROI" :value="2" />
           </el-radio-group>
         </el-form-item>
@@ -592,17 +591,7 @@
         <el-table-column prop="wxCorpid" label="企微主体ID" width="150" show-overflow-tooltip />
       </el-table>
       <template #footer>
-        <!--生成计划按钮tip提示先进行预览操作-->
-        <!-- :1-待执行,2-执行中,3-失败,4-已结束 -->
-        <el-tooltip
-        v-if="formData.status === 1"
-        class="box-item"
-        effect="dark"
-        :content="plans.length === 0 ? '请先进行预览操作' : ''"
-        placement="top-start"
-      >
-        <el-button :loading="generatePlanBtnLoading" :disabled="plans.length === 0" @click="handleGeneratePlan" >生成计划</el-button>
-      </el-tooltip>
+      <el-button :loading="generatePlanBtnLoading" @click="handleGeneratePlan" >生成计划</el-button>
         <el-button @click="dialogVisible = false">取消</el-button>
         <el-button type="primary" @click="handleSubmit" :loading="submitting">
           保存配置

+ 10 - 8
src/main/java/com/moka/gdtauto/controller/AssetDramaSyncConfController.java

@@ -1,23 +1,25 @@
 package com.moka.gdtauto.controller;
 
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import java.util.List;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.moka.gdtauto.annotation.AuthUser;
 import com.moka.gdtauto.common.Result;
 import com.moka.gdtauto.entity.AssetDramaSyncConf;
 import com.moka.gdtauto.entity.SysUser;
 import com.moka.gdtauto.service.AssetDramaSyncConfService;
+
 import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 
-import java.util.List;
-
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
 
 /**
  * 短剧资产同步配置控制器

+ 1 - 0
src/main/java/com/moka/gdtauto/entity/BaseDailyAdgroupReport.java

@@ -76,6 +76,7 @@ public abstract class BaseDailyAdgroupReport {
     private BigDecimal conversionsRate;
     /** 目标转化成本(分) */
     private Long conversionsCost;
+    private Long scanFollowUserCost;
     /** 深度目标转化量 */
     private Long deepConversionsCount;
     /** 深度目标转化率 */

+ 1 - 0
src/main/java/com/moka/gdtauto/entity/BaseDailyCreativeReport.java

@@ -79,6 +79,7 @@ public abstract class BaseDailyCreativeReport {
     private BigDecimal conversionsRate;
     /** 目标转化成本(分) */
     private Long conversionsCost;
+    private Long scanFollowUserCost;
     /** 深度目标转化量 */
     private Long deepConversionsCount;
     /** 深度目标转化率 */

+ 6 - 0
src/main/java/com/moka/gdtauto/mapper/AdPlanCreativeMapper.java

@@ -34,4 +34,10 @@ public interface AdPlanCreativeMapper extends BaseMapper<AdPlanCreative> {
     void batchUpdateRepDailyReport(@Param("creatives") List<AdPlanCreative> plans);
 
     void md5ApprovalCount();
+
+    List<Long> listAccountId(@Param("confId") Long confId, @Param("start") Long start, @Param("limit") Long limit);
+
+    void updateReqDailyReportConfId(String startDate, String endDate);
+
+    void updateRepDailyReportConfId(String startDate, String endDate);
 }

+ 11 - 3
src/main/java/com/moka/gdtauto/mapper/AdPlanMapper.java

@@ -1,11 +1,12 @@
 package com.moka.gdtauto.mapper;
 
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.moka.gdtauto.entity.AdPlan;
+import java.util.List;
+
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
-import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.moka.gdtauto.entity.AdPlan;
 
 /**
  * 广告计划Mapper接口
@@ -36,4 +37,11 @@ public interface AdPlanMapper extends BaseMapper<AdPlan> {
      * @param plans 包含 adgroupId 和日报字段的广告计划列表
      */
     void batchUpdateRepDailyReport(@Param("plans") List<AdPlan> plans);
+
+
+    List<Long> listAccountId(@Param("confId") Long confId, @Param("start") Long start, @Param("limit") Long limit);
+
+    void updateReqDailyReportConfId(String startDate, String endDate);
+
+    void updateRepDailyReportConfId(String startDate, String endDate);
 }

+ 0 - 2
src/main/java/com/moka/gdtauto/mapper/RepDailyAdgroupReportMapper.java

@@ -16,7 +16,5 @@ import com.moka.gdtauto.entity.RepDailyAdgroupReport;
  * @since 2026-03-19
  */
 public interface RepDailyAdgroupReportMapper extends BaseMapper<RepDailyAdgroupReport> {
-    void upsert(@Param("report") RepDailyAdgroupReport report);
-
     void batchUpsert(@Param("list") List<RepDailyAdgroupReport> list);
 }

+ 0 - 8
src/main/java/com/moka/gdtauto/mapper/RepDailyCreativeReportMapper.java

@@ -18,14 +18,6 @@ import com.moka.gdtauto.entity.RepDailyCreativeReport;
 public interface RepDailyCreativeReportMapper extends BaseMapper<RepDailyCreativeReport> {
 
     /**
-     * 插入或更新(ON DUPLICATE KEY UPDATE)
-     * 以 account_id + dynamic_creative_id + date 为唯一键进行 upsert
-     *
-     * @param report 报表数据
-     */
-    void upsert(@Param("report") RepDailyCreativeReport report);
-
-    /**
      * 批量插入或更新(ON DUPLICATE KEY UPDATE)
      *
      * @param list 报表数据列表

+ 0 - 1
src/main/java/com/moka/gdtauto/mapper/ReqDailyAdgroupReportMapper.java

@@ -16,7 +16,6 @@ import com.moka.gdtauto.entity.ReqDailyAdgroupReport;
  * @since 2026-03-19
  */
 public interface ReqDailyAdgroupReportMapper extends BaseMapper<ReqDailyAdgroupReport> {
-    void upsert(@Param("report") ReqDailyAdgroupReport report);
 
     void batchUpsert(@Param("list") List<ReqDailyAdgroupReport> list);
 }

+ 0 - 8
src/main/java/com/moka/gdtauto/mapper/ReqDailyCreativeReportMapper.java

@@ -18,14 +18,6 @@ import com.moka.gdtauto.entity.ReqDailyCreativeReport;
 public interface ReqDailyCreativeReportMapper extends BaseMapper<ReqDailyCreativeReport> {
 
     /**
-     * 插入或更新(ON DUPLICATE KEY UPDATE)
-     * 以 account_id + dynamic_creative_id + date 为唯一键进行 upsert
-     *
-     * @param report 报表数据
-     */
-    void upsert(@Param("report") ReqDailyCreativeReport report);
-
-    /**
      * 批量插入或更新(ON DUPLICATE KEY UPDATE)
      *
      * @param list 报表数据列表

+ 0 - 4
src/main/java/com/moka/gdtauto/service/AdPlanAutoExecutor.java

@@ -37,7 +37,6 @@ public class AdPlanAutoExecutor {
 
     private final AdAutoExecuteLogService adAutoExecuteLogService;
     private final AdPlanConfService adPlanConfService;
-    private final AdPlanDailyReportService adPlanDailyReportService;
     private final AdPlanService adPlanService;
 
     /**
@@ -150,9 +149,6 @@ public class AdPlanAutoExecutor {
         List<Long> dailyBudgetLevel = JSON.parseArray(autoConf.getDailyBudgetLevel(), Long.class);
         // 同步日报
         try {
-            log.info("[AdAutoExecutor] 同步日报,confId={}", confId);
-            adPlanDailyReportService.syncReqDailyReport(confId, now, now);
-
             // 分页查询当前 conf 下的 AdPlan,进行规则检测
             long adCount = 0;
             List<AdPlan> plansToSuspend = new ArrayList<>();

+ 0 - 4
src/main/java/com/moka/gdtauto/service/AdPlanCreativeAutoExecutor.java

@@ -36,7 +36,6 @@ public class AdPlanCreativeAutoExecutor {
 
     private final AdAutoExecuteLogService adAutoExecuteLogService;
     private final AdPlanConfService adPlanConfService;
-    private final AdPlanCreativeDailyReportService adPlanCreativeDailyReportService;
     private final AdPlanCreativeService adPlanCreativeService;
 
     /**
@@ -146,9 +145,6 @@ public class AdPlanCreativeAutoExecutor {
         adAutoExecuteLogService.save(executeLog);
         // 同步日报
         try {
-            log.info("[AdPlanCreativeAutoExecutor] 同步日报,confId={}", confId);
-            adPlanCreativeDailyReportService.syncReqDailyReport(confId, now, now);
-
             // 分页查询当前 conf 下的 AdPlan,进行规则检测
             long adCount = 0;
             List<AdPlanCreative> creativesToSuspend = new ArrayList<>();

+ 17 - 17
src/main/java/com/moka/gdtauto/service/AdPlanCreativeDailyReportService.java

@@ -1,39 +1,39 @@
 package com.moka.gdtauto.service;
 
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.moka.gdtauto.client.TencentAdsApiClientFactory;
 import com.moka.gdtauto.common.Constant;
-import com.moka.gdtauto.entity.AdPlan;
 import com.moka.gdtauto.entity.AdPlanConf;
 import com.moka.gdtauto.entity.AdPlanCreative;
 import com.moka.gdtauto.mapper.AdPlanConfMapper;
 import com.moka.gdtauto.mapper.AdPlanCreativeMapper;
-import com.moka.gdtauto.mapper.AdPlanMapper;
-import com.tencent.ads.model.v3.DailyReportsGetResponseData;
 import com.tencent.ads.exception.TencentAdsResponseException;
 import com.tencent.ads.model.v3.DailyReportsFilteringStruct;
+import com.tencent.ads.model.v3.DailyReportsGetResponseData;
 import com.tencent.ads.model.v3.FilterOperator;
 import com.tencent.ads.model.v3.ReportDateRange;
 import com.tencent.ads.model.v3.ReportStruct;
 import com.tencent.ads.model.v3.TimeLine;
 import com.tencent.ads.v3.TencentAds;
+
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Service;
-
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
 
 /**
  * 广告计划日报表同步服务

+ 56 - 104
src/main/java/com/moka/gdtauto/service/DailyAdgroupReportService.java

@@ -6,13 +6,11 @@ import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import java.util.Map;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.stream.Collectors;
 
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
@@ -21,17 +19,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.moka.gdtauto.client.TencentAdsApiClientFactory;
 import com.moka.gdtauto.common.Constant;
-import com.moka.gdtauto.entity.AdPlan;
-import com.moka.gdtauto.entity.AdPlanConf;
 import com.moka.gdtauto.entity.BaseDailyAdgroupReport;
 import com.moka.gdtauto.entity.RepDailyAdgroupReport;
 import com.moka.gdtauto.entity.ReqDailyAdgroupReport;
+import com.moka.gdtauto.mapper.AdPlanMapper;
 import com.moka.gdtauto.mapper.RepDailyAdgroupReportMapper;
 import com.moka.gdtauto.mapper.ReqDailyAdgroupReportMapper;
 import com.tencent.ads.exception.TencentAdsResponseException;
-import com.tencent.ads.model.v3.DailyReportsFilteringStruct;
 import com.tencent.ads.model.v3.DailyReportsGetResponseData;
-import com.tencent.ads.model.v3.FilterOperator;
 import com.tencent.ads.model.v3.ReportDateRange;
 import com.tencent.ads.model.v3.ReportStruct;
 import com.tencent.ads.model.v3.TimeLine;
@@ -57,6 +52,7 @@ public class DailyAdgroupReportService {
     private final RepDailyAdgroupReportMapper repMapper;
     private final AdPlanConfService adPlanConfService;
     private final AdPlanService adPlanService;
+    private final AdPlanMapper adPlanMapper;
 
     /** 同步时请求的指标字段 */
     private static final List<String> SYNC_FIELDS = Arrays.asList(
@@ -69,7 +65,7 @@ public class DailyAdgroupReportService {
             // 花费
             "cost", "thousand_display_price",
             // 转化
-            "conversions_count", "conversions_rate", "conversions_cost",
+            "conversions_count", "conversions_rate", "conversions_cost", "scan_follow_user_cost",
             "deep_conversions_count", "deep_conversions_rate", "deep_conversions_cost",
             "conversions_by_display_count", "conversions_by_click_count",
             "preview_conversions_count", "preview_deep_conversions_count",
@@ -97,99 +93,64 @@ public class DailyAdgroupReportService {
     /**
      * 按广告计划配置同步广告组日报
      */
-    public int syncReport(AdPlanConf conf, String startDate, String endDate, String timeLine) throws Exception {
-        log.info("开始同步广告组日报 confId={} timeLine={} [{}, {}]", conf.getId(), timeLine, startDate, endDate);
+    public int syncReport(Long accountId, String startDate, String endDate, String timeLine) throws Exception {
+        log.info("开始同步广告组日报 accountId={} timeLine={} [{}, {}]", accountId, timeLine, startDate, endDate);
         TencentAds tencentAds = clientFactory.getTencentAds(null, Constant.MAIN_ORG_ACCOUNT_ID);
-        tencentAds.setDebug(true);
 
         ReportDateRange dateRange = new ReportDateRange();
         dateRange.setStartDate(startDate);
         dateRange.setEndDate(endDate);
 
         List<String> groupBy = Arrays.asList("adgroup_id", "date");
-        int pageNum = 1;
-        int pageSize = 100;
-        int totalSaved = 0;
-
-        while (true) {
-            Page<AdPlan> page = adPlanService.page(
-                    new Page<>(pageNum, pageSize),
-                    new LambdaQueryWrapper<AdPlan>()
-                            .eq(AdPlan::getAdPlanConfId, conf.getId())
-                            .eq(AdPlan::getStatus, 4)
-                            .eq(AdPlan::getSystemDelete, "false"));
-
-            List<AdPlan> planList = page.getRecords();
-            if (planList.isEmpty()) {
-                break;
-            }
-
-            Map<Long, List<Long>> accountAdgroupIdsMap = planList.stream()
-                    .filter(plan -> plan.getAccountId() != null && plan.getAdgroupId() != null)
-                    .collect(Collectors.groupingBy(
-                            AdPlan::getAccountId,
-                            Collectors.mapping(
-                                    AdPlan::getAdgroupId,
-                                    Collectors.collectingAndThen(Collectors.toList(),
-                                            ids -> ids.stream().distinct().toList()))));
-
-            for (Map.Entry<Long, List<Long>> entry : accountAdgroupIdsMap.entrySet()) {
-                totalSaved += syncAccountReports(
+        int totalSaved = syncAccountReports(
                         tencentAds,
-                        conf.getId(),
-                        conf.getAccountGroupId(),
-                        entry.getKey(),
-                        entry.getValue(),
+                        accountId,
                         dateRange,
                         groupBy,
                         timeLine);
-            }
-
-            if (!page.hasNext()) {
-                break;
-            }
-            pageNum++;
-        }
-
-        log.info("广告组日报同步完成 confId={} saved={}", conf.getId(), totalSaved);
+        log.info("广告组日报同步完成 accountId={} saved={}", accountId, totalSaved);
         return totalSaved;
     }
 
     /**
      * 批量同步广告组日报
      */
-    public int syncAllAccounts(Long confId, String startDate, String endDate, String timeLine) {
-        List<AdPlanConf> confList = adPlanConfService.list(
-                new LambdaQueryWrapper<AdPlanConf>()
-                        .eq(confId != null, AdPlanConf::getId, confId)
-                        .ge(confId == null, AdPlanConf::getId, 57L)
-                        .in(AdPlanConf::getStatus, List.of(4, 5))
-                        .eq(AdPlanConf::getDeleted, 0)
-                        .orderByDesc(AdPlanConf::getId));
-
-        log.info("查询到 {} 个广告计划配置", confList.size());
-        if (confList.isEmpty()) {
-            return 0;
-        }
+    public void syncAllAccounts(Long confId, String startDate, String endDate, String timeLine) {
 
         AtomicInteger total = new AtomicInteger();
         Semaphore semaphore = new Semaphore(10);
 
         try (ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor()) {
-            for (AdPlanConf conf : confList) {
-                executor.submit(() -> {
-                    try {
-                        semaphore.acquire();
-                        total.addAndGet(syncReport(conf, startDate, endDate, timeLine));
-                    } catch (InterruptedException e) {
-                        log.error("获取信号量被中断", e);
-                        Thread.currentThread().interrupt();
-                    } catch (Exception e) {
-                        log.error("同步广告组日报 {} 失败", conf.getId(), e);
-                    } finally {
-                        semaphore.release();
-                    }
-                });
+            // 分页获取账号ID并处理
+            long start = 0L;
+            long pageSize = 100L;
+            while (true) {
+                List<Long> page = adPlanMapper.listAccountId(confId, start, pageSize);
+                if (page.isEmpty()) {
+                    break;
+                }
+
+                // 提交当前页的账号处理任务
+                for (Long accountId : page) {
+                    executor.submit(() -> {
+                        try {
+                            semaphore.acquire();
+                            total.addAndGet(syncReport(accountId, startDate, endDate, timeLine));
+                        } catch (InterruptedException e) {
+                            log.error("获取信号量被中断", e);
+                            Thread.currentThread().interrupt();
+                        } catch (Exception e) {
+                            log.error("同步广告组日报 {} 失败", accountId, e);
+                        } finally {
+                            semaphore.release();
+                        }
+                    });
+                }
+
+                if (page.size() < pageSize) {
+                    break;
+                }
+                start += pageSize;
             }
 
             executor.shutdown();
@@ -203,30 +164,22 @@ public class DailyAdgroupReportService {
         }
 
         log.info("所有广告组日报同步完成 total={}", total.get());
-        return total.get();
+
+        if (TimeLine.REQUEST_TIME.getValue().equals(timeLine)) { 
+            adPlanMapper.updateReqDailyReportConfId(startDate, endDate);
+         } else if (TimeLine.REPORTING_TIME.getValue().equals(timeLine)) {
+            adPlanMapper.updateRepDailyReportConfId(startDate, endDate);
+         }
+
     }
 
     private int syncAccountReports(TencentAds tencentAds,
-                                    Long confId,
-                                   Long groupId,
                                    Long accountId,
-                                   List<Long> adgroupIds,
                                    ReportDateRange dateRange,
                                    List<String> groupBy,
                                    String timeLine) throws Exception {
-        if (adgroupIds == null || adgroupIds.isEmpty()) {
-            return 0;
-        }
-
-        List<DailyReportsFilteringStruct> filtering = new ArrayList<>();
-        DailyReportsFilteringStruct struct = new DailyReportsFilteringStruct();
-        struct.setField("adgroup_id");
-        struct.setOperator(FilterOperator.IN);
-        struct.setValues(adgroupIds.stream().map(String::valueOf).toList());
-        filtering.add(struct);
-
         long page = 1L;
-        long pageSize = 1000L;
+        long pageSize = 2000L;
         int totalSaved = 0;
 
         while (true) {
@@ -238,7 +191,7 @@ public class DailyAdgroupReportService {
                     groupBy,
                     SYNC_FIELDS,
                     accountId,
-                    filtering,
+                    null,
                     null,
                     timeLine,
                     page,
@@ -274,7 +227,7 @@ public class DailyAdgroupReportService {
                     if (rs.getAdgroupId() == null || rs.getDate() == null) {
                         continue;
                     }
-                    entities.add(toReqEntity(confId, groupId, rs));
+                    entities.add(toReqEntity(rs));
                 }
                 if (!entities.isEmpty()) {
                     reqMapper.batchUpsert(entities);
@@ -286,7 +239,7 @@ public class DailyAdgroupReportService {
                     if (rs.getAdgroupId() == null || rs.getDate() == null) {
                         continue;
                     }
-                    entities.add(toRepEntity(confId, groupId, rs));
+                    entities.add(toRepEntity(rs));
                 }
                 if (!entities.isEmpty()) {
                     repMapper.batchUpsert(entities);
@@ -407,22 +360,20 @@ public class DailyAdgroupReportService {
 
     // ─── 映射方法 ─────────────────────────────────────────────────────────────
 
-    private ReqDailyAdgroupReport toReqEntity(Long confId, Long groupId, ReportStruct rs) {
+    private ReqDailyAdgroupReport toReqEntity(ReportStruct rs) {
         ReqDailyAdgroupReport e = new ReqDailyAdgroupReport();
-        fillFields(e, confId, groupId, rs);
+        fillFields(e, rs);
         return e;
     }
 
-    private RepDailyAdgroupReport toRepEntity(Long confId, Long groupId, ReportStruct rs) {
+    private RepDailyAdgroupReport toRepEntity(ReportStruct rs) {
         RepDailyAdgroupReport e = new RepDailyAdgroupReport();
-        fillFields(e, confId, groupId, rs);
+        fillFields(e, rs);
         return e;
     }
 
-    private void fillFields(BaseDailyAdgroupReport e, Long confId, Long groupId, ReportStruct rs) {
-        e.setConfId(confId);
+    private void fillFields(BaseDailyAdgroupReport e,  ReportStruct rs) {
         e.setAccountId(rs.getAccountId());
-        e.setGroupId(groupId);
         e.setAdgroupId(rs.getAdgroupId());
         e.setAdgroupName(rs.getAdgroupName());
         e.setDate(LocalDate.parse(rs.getDate()));
@@ -443,6 +394,7 @@ public class DailyAdgroupReportService {
         e.setThousandDisplayPrice(rs.getThousandDisplayPrice());
         // 转化
         e.setConversionsCount(rs.getConversionsCount());
+        e.setScanFollowUserCost(rs.getScanFollowUserCost());
         e.setConversionsRate(d2b(rs.getConversionsRate()));
         e.setConversionsCost(rs.getConversionsCost());
         e.setDeepConversionsCount(rs.getDeepConversionsCount());

+ 67 - 105
src/main/java/com/moka/gdtauto/service/DailyCreativeReportService.java

@@ -3,6 +3,7 @@ package com.moka.gdtauto.service;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -18,20 +19,16 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.moka.gdtauto.client.TencentAdsApiClientFactory;
 import com.moka.gdtauto.common.Constant;
-import com.moka.gdtauto.entity.AccountGroupAccountRelationship;
-import com.moka.gdtauto.entity.AdPlanConf;
-import com.moka.gdtauto.entity.AdPlanCreative;
 import com.moka.gdtauto.entity.BaseDailyCreativeReport;
 import com.moka.gdtauto.entity.RepDailyCreativeReport;
 import com.moka.gdtauto.entity.ReqDailyCreativeReport;
 import com.moka.gdtauto.mapper.AccountGroupAccountRelationshipMapper;
 import com.moka.gdtauto.mapper.AccountGroupMapper;
+import com.moka.gdtauto.mapper.AdPlanCreativeMapper;
 import com.moka.gdtauto.mapper.RepDailyCreativeReportMapper;
 import com.moka.gdtauto.mapper.ReqDailyCreativeReportMapper;
 import com.tencent.ads.exception.TencentAdsResponseException;
-import com.tencent.ads.model.v3.DailyReportsFilteringStruct;
 import com.tencent.ads.model.v3.DailyReportsGetResponseData;
-import com.tencent.ads.model.v3.FilterOperator;
 import com.tencent.ads.model.v3.ReportDateRange;
 import com.tencent.ads.model.v3.ReportStruct;
 import com.tencent.ads.model.v3.TimeLine;
@@ -60,6 +57,9 @@ public class DailyCreativeReportService {
     private final RepDailyCreativeReportMapper repMapper;
     private final AdPlanConfService adPlanConfService;
     private final AdPlanCreativeService adPlanCreativeService;
+    private final AdPlanCreativeMapper adPlanCreativeMapper;
+
+    private static final DateTimeFormatter FMT = DateTimeFormatter.ofPattern("yyyy-MM-dd");
 
     /** 同步时请求的指标字段 */
     private static final List<String> SYNC_FIELDS = Arrays.asList(
@@ -72,7 +72,7 @@ public class DailyCreativeReportService {
             // 花费
             "cost", "thousand_display_price",
             // 转化
-            "conversions_count", "conversions_rate", "conversions_cost",
+            "conversions_count", "conversions_rate", "conversions_cost", "scan_follow_user_cost",
             "deep_conversions_count", "deep_conversions_rate", "deep_conversions_cost",
             "conversions_by_display_count", "conversions_by_click_count",
             "preview_conversions_count", "preview_deep_conversions_count",
@@ -112,56 +112,21 @@ public class DailyCreativeReportService {
      * @param timeLine     时间口径 REQUEST_TIME / REPORTING_TIME
      * @return 成功写入行数
      */
-    public void syncReport(AdPlanConf conf,
+    public int syncReport(Long accountId, 
                           String startDate, String endDate, String timeLine) throws Exception {
-        log.info("开始同步日报表 timeLine={} [{}, {}]", timeLine, startDate, endDate);
+        log.info("开始同步日报表 account_id={} timeLine={} [{}, {}]", accountId, timeLine, startDate, endDate);
 
         TencentAds tencentAds = clientFactory.getTencentAds(null, Constant.MAIN_ORG_ACCOUNT_ID);
-        tencentAds.setDebug(true);
         ReportDateRange dateRange = new ReportDateRange();
         dateRange.setStartDate(startDate);
         dateRange.setEndDate(endDate);
         List<String> groupBy = Arrays.asList("dynamic_creative_id", "date");
-
-        Long accountGroupId = conf.getAccountGroupId();
-        List<AccountGroupAccountRelationship> relationships = relationshipMapper.selectList(
-            new LambdaQueryWrapper<AccountGroupAccountRelationship>()
-                .eq(AccountGroupAccountRelationship::getGroupId, accountGroupId)
-        );
-
-        for (AccountGroupAccountRelationship relationship : relationships) {
-            Long accountId = relationship.getAccountId();
-            
+     
             // 分页查询 AdPlanCreative,条件:status=4, systemDelete='false'
-        int pageNum = 1;
-        int pageSize = 100;
+        long page = 1L;
+        long pageSize = 2000L;
+        int totalSaved = 0;
         while (true) {
-            Page<AdPlanCreative> page = adPlanCreativeService.page(
-                new Page<>(pageNum, pageSize),
-                new LambdaQueryWrapper<AdPlanCreative>()
-                    .eq(AdPlanCreative::getAccountId, accountId)
-                    .eq(AdPlanCreative::getAdPlanConfId, conf.getId())
-                    .eq(AdPlanCreative::getStatus, 4)
-                    .eq(AdPlanCreative::getSystemDelete, "false")
-            );
-
-            List<AdPlanCreative> creativeList = page.getRecords();
-            if (creativeList.isEmpty()) {
-                break;
-            }
-
-            // 提取 creativeId 列表
-            List<Long> creativeIds = creativeList.stream()
-                .map(AdPlanCreative::getCreativeId)
-                .toList();
-
-            List<DailyReportsFilteringStruct> filtering = new ArrayList<>();
-            DailyReportsFilteringStruct struct = new DailyReportsFilteringStruct();
-            struct.setField("dynamic_creative_id");
-            struct.setOperator(FilterOperator.IN);
-            struct.setValues(creativeIds.stream().map(String::valueOf).toList());
-            filtering.add(struct);
-
             DailyReportsGetResponseData response = null;
             try {
                 response = tencentAds.dailyReports().dailyReportsGet(
@@ -170,11 +135,11 @@ public class DailyCreativeReportService {
                     groupBy,
                     SYNC_FIELDS,
                     accountId,
-                    filtering,
+                    null,
                     null,
                     timeLine,
-                    1L,
-                    100L,
+                    page,
+                    pageSize,
                     null
                 );
             } catch (TencentAdsResponseException e) {
@@ -196,8 +161,7 @@ public class DailyCreativeReportService {
             }
 
             if (response == null || response.getList() == null || response.getList().isEmpty()) {
-                pageNum++;
-                continue;
+                break;
             }
 
             List<ReportStruct> list = response.getList();
@@ -207,10 +171,11 @@ public class DailyCreativeReportService {
                     if (rs.getDynamicCreativeId() == null || rs.getDate() == null) {
                         continue;
                     }
-                    entities.add(toReqEntity(conf.getId(), conf.getAccountGroupId(), rs));
+                    entities.add(toReqEntity(rs));
                 }
                 if (!entities.isEmpty()) {
                     reqMapper.batchUpsert(entities);
+                    totalSaved += entities.size();
                 }
             } else {
                 List<RepDailyCreativeReport> entities = new ArrayList<>();
@@ -218,26 +183,27 @@ public class DailyCreativeReportService {
                     if (rs.getDynamicCreativeId() == null || rs.getDate() == null) {
                         continue;
                     }
-                    entities.add(toRepEntity(conf.getId(), conf.getAccountGroupId(), rs));
+                    entities.add(toRepEntity(rs));
                 }
                 if (!entities.isEmpty()) {
                     repMapper.batchUpsert(entities);
+                    totalSaved += entities.size();
                 }
             }
 
-            // 判断是否还有下一页
-            if (!page.hasNext()) {
+            long totalNumber = response.getPageInfo() != null
+                    ? response.getPageInfo().getTotalNumber() : 0L;
+            if (page * pageSize >= totalNumber) {
                 break;
             }
-            pageNum++;
+            page++;
         }
+        return totalSaved;
      }
 
-        
-    }
-
     /**
      * 同步所有账户(定时任务调用)——通过 AccountGroupAccountRelationship 关联获取 groupId / groupName
+     * 参考 DailyAdgroupReportService 进行分页改造,使用虚拟线程池 + Semaphore 控制并发
      *
      * @param startDate 开始日期
      * @param endDate   结束日期
@@ -245,59 +211,56 @@ public class DailyCreativeReportService {
      * @return 成功保存总行数
      */
     public void syncAllAccounts(Long confId, String startDate, String endDate, String timeLine) {
-        // 获取所有广告计划配置
-        List<AdPlanConf> confList = adPlanConfService.list(
-            new LambdaQueryWrapper<AdPlanConf>()
-                .eq(confId != null, AdPlanConf::getId, confId)
-                .ge(confId == null, AdPlanConf::getId, 57L)
-                .in(AdPlanConf::getStatus, List.of(4,5))
-                .eq(AdPlanConf::getDeleted, 0)
-                .orderByDesc(AdPlanConf::getId));
-        log.info("查询到 {} 个广告计划配置", confList.size());
-
-        if (confList.isEmpty()) {
-            return;
-        }
-
-        // for (AdPlanConf conf : confList) {
-        //         try {
-        //                 syncReport(conf, startDate, endDate, timeLine);
-        //             } catch (Exception e) {
-        //                 log.error("同步创意日报 {} 失败", conf.getId(), e);
-        //             }
-        //     }
-
         // 使用 Semaphore 控制并发数为 10
         Semaphore semaphore = new Semaphore(10);
         // 使用虚拟线程池进行并发处理
         try (ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor()) {
-            for (AdPlanConf conf : confList) {
-                executor.submit(() -> {
-                    try {
-                        semaphore.acquire();
-                        syncReport(conf, startDate, endDate, timeLine);
-                    } catch (InterruptedException e) {
-                        log.error("获取信号量被中断", e);
-                        Thread.currentThread().interrupt();
-                    } catch (Exception e) {
-                        log.error("同步创意日报 {} 失败", conf.getId(), e);
-                    }  finally {
-                        semaphore.release();
-                    }
-                });
+            // 分页获取广告计划配置
+            long start = 0L;
+            long pageSize = 100L;
+            while (true) {
+                List<Long> accountIdList = adPlanCreativeMapper.listAccountId(confId, start, pageSize);
+                log.info("分页查询到 {} 个广告计划配置, start={}, pageSize={}", accountIdList.size(), start, pageSize);
+                // 提交当前页的配置处理任务
+                for (Long accountId : accountIdList) {
+                    executor.submit(() -> {
+                        try {
+                            semaphore.acquire();
+                            syncReport(accountId, startDate, endDate, timeLine);
+                        } catch (InterruptedException e) {
+                            log.error("获取信号量被中断", e);
+                            Thread.currentThread().interrupt();
+                        } catch (Exception e) {
+                            log.error("同步创意日报 {} 失败", accountId, e);
+                        } finally {
+                            semaphore.release();
+                        }
+                    });
+                }
+
+                if (accountIdList.size() < pageSize) {
+                    break;
+                }
+                start += pageSize;
             }
+
             // 关闭线程池并等待所有任务完成
             executor.shutdown();
             boolean terminated = executor.awaitTermination(30, TimeUnit.MINUTES);
             if (!terminated) {
-                log.warn("同步创意日报 任务未在指定时间内完成");
+                log.warn("同步创意日报任务未在指定时间内完成");
             }
         } catch (InterruptedException e) {
             log.error("并发处理被中断", e);
             Thread.currentThread().interrupt();
         }
 
-        log.info("所有广告计划定向更新完成");
+        log.info("所有广告计划创意日报同步完成");
+         if (TimeLine.REQUEST_TIME.getValue().equals(timeLine)) { 
+            adPlanCreativeMapper.updateReqDailyReportConfId(startDate, endDate);
+         } else if (TimeLine.REPORTING_TIME.getValue().equals(timeLine)) {
+            adPlanCreativeMapper.updateRepDailyReportConfId(startDate, endDate);
+         }
 
     }
 
@@ -409,24 +372,22 @@ public class DailyCreativeReportService {
 
     // ─── 映射方法 ─────────────────────────────────────────────────────────────
 
-    private ReqDailyCreativeReport toReqEntity(Long confId, Long groupId,  ReportStruct rs) {
+    private ReqDailyCreativeReport toReqEntity(ReportStruct rs) {
         ReqDailyCreativeReport e = new ReqDailyCreativeReport();
-        fillFields(e,confId, groupId, rs);
+        fillFields(e,rs);
         return e;
     }
 
-    private RepDailyCreativeReport toRepEntity(Long confId, Long groupId, ReportStruct rs) {
+    private RepDailyCreativeReport toRepEntity(ReportStruct rs) {
         RepDailyCreativeReport e = new RepDailyCreativeReport();
-        fillFields(e,confId, groupId, rs);
+        fillFields(e,rs);
         return e;
     }
 
-    private void fillFields(BaseDailyCreativeReport e, Long confId, Long groupId, ReportStruct rs) {
-        e.setConfId(confId);
+    private void fillFields(BaseDailyCreativeReport e, ReportStruct rs) {
         e.setAccountId(rs.getAccountId());
         e.setAdgroupId(rs.getAdgroupId());
         e.setAdgroupName(rs.getAdgroupName());
-        e.setGroupId(groupId);
         e.setDynamicCreativeId(rs.getDynamicCreativeId());
         e.setDynamicCreativeName(rs.getDynamicCreativeName());
         e.setDate(LocalDate.parse(rs.getDate()));
@@ -447,6 +408,7 @@ public class DailyCreativeReportService {
         e.setThousandDisplayPrice(rs.getThousandDisplayPrice());
         // 转化
         e.setConversionsCount(rs.getConversionsCount());
+        e.setScanFollowUserCost(rs.getScanFollowUserCost());
         e.setConversionsRate(d2b(rs.getConversionsRate()));
         e.setConversionsCost(rs.getConversionsCost());
         e.setDeepConversionsCount(rs.getDeepConversionsCount());

+ 35 - 1
src/main/resources/mapper/AdPlanCreativeMapper.xml

@@ -56,4 +56,38 @@
         set f.normal_cnt = t.nomarl_cnt, f.denied_cnt = t.denied_cnt
         where f.file_md5 = t.creative_file_md5
     </update>
-</mapper>
+
+    <!-- listAccountId --> 
+
+    <select id="listAccountId">
+        select distinct account_id from ad_plan_creative
+        <where>
+            <if test="confId != null">
+               ad_plan_conf_id = #{confId}
+            </if>  
+        </where>
+         limit #{start}, #{limit}
+    </select>
+
+    <!-- updateReqDailyReport --> 
+
+    <update id="updateReqDailyReportConfId">
+        update req_daily_creative_report r
+        inner join (select p.ad_plan_conf_id, p.adgroup_id, c.account_group_id from ad_plan p
+            left join ad_plan_conf c on p.ad_plan_conf_id = c.id ) t on r.adgroup_id = t.adgroup_id
+        set r.conf_id = t.ad_plan_conf_id, r.group_id = t.account_group_id
+        where r.date  between #{startDate} and #{endDate};
+    </update> 
+
+    <!-- updateRepDailyReportConfId --> 
+
+    <update id="updateRepDailyReportConfId">
+        update rep_daily_creative_report r
+            inner join (select p.ad_plan_conf_id, p.adgroup_id, c.account_group_id from ad_plan p
+                left join ad_plan_conf c on p.ad_plan_conf_id = c.id ) t on r.adgroup_id = t.adgroup_id
+            set r.conf_id = t.ad_plan_conf_id, r.group_id = t.account_group_id
+            where r.date  between #{startDate} and #{endDate};
+    </update>
+
+
+     </mapper>

+ 29 - 0
src/main/resources/mapper/AdPlanMapper.xml

@@ -43,4 +43,33 @@
         </foreach>
     </update>
 
+    <!-- listAccountId --> 
+
+    <select id="listAccountId">
+        select distinct account_id from ad_plan 
+        <where>
+            <if test="confId != null">
+               ad_plan_conf_id = #{confId}
+            </if>  
+        </where>
+         limit #{start}, #{limit}
+    </select>
+
+    <update id="updateReqDailyReportConfId">
+        update req_daily_adgroup_report r
+        inner join (select p.ad_plan_conf_id, p.adgroup_id, c.account_group_id from ad_plan p
+            left join ad_plan_conf c on p.ad_plan_conf_id = c.id ) t on r.adgroup_id = t.adgroup_id
+        set r.conf_id = t.ad_plan_conf_id, r.group_id = t.account_group_id
+        where r.date  between #{startDate} and #{endDate};
+    </update> 
+
+    <!-- updateRepDailyReportConfId --> 
+
+    <update id="updateRepDailyReportConfId">
+        update rep_daily_adgroup_report r
+            inner join (select p.ad_plan_conf_id, p.adgroup_id, c.account_group_id from ad_plan p
+                left join ad_plan_conf c on p.ad_plan_conf_id = c.id ) t on r.adgroup_id = t.adgroup_id
+            set r.conf_id = t.ad_plan_conf_id, r.group_id = t.account_group_id
+            where r.date  between #{startDate} and #{endDate};
+    </update>
 </mapper>

+ 3 - 197
src/main/resources/mapper/RepDailyAdgroupReportMapper.xml

@@ -1,199 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.moka.gdtauto.mapper.RepDailyAdgroupReportMapper">
-    <insert id="upsert" parameterType="com.moka.gdtauto.entity.RepDailyAdgroupReport">
-        INSERT INTO rep_daily_adgroup_report (conf_id,
-            group_id, group_name, account_id, adgroup_id, adgroup_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,
-            cost, acquisition_cost, thousand_display_price,
-            conversions_count, conversions_rate, conversions_cost,
-            deep_conversions_count, deep_conversions_rate, deep_conversions_cost,
-            conversions_by_display_count, conversions_by_display_rate, conversions_by_display_cost,
-            conversions_by_click_count, conversions_by_click_rate, conversions_by_click_cost,
-            preview_conversions_count, preview_deep_conversions_count,
-            video_outer_play_count, video_outer_play_user_count, avg_user_play_count,
-            video_outer_play_time_count, video_outer_play_time_avg_rate,
-            video_outer_play_rate, video_outer_play_cost,
-            video_outer_play10_count, video_outer_play25_count, video_outer_play50_count,
-            video_outer_play75_count, video_outer_play90_count, video_outer_play95_count,
-            video_outer_play100_count, video_outer_play3s_count, video_outer_play3s_rate,
-            video_outer_play5s_count, video_outer_play7s_count,
-            read_count, read_cost, comment_count, comment_cost,
-            praise_count, praise_cost, forward_count, forward_cost, no_interest_count,
-            live_stream_crt_click_cnt, click_image_count, click_head_count,
-            click_detail_count, click_poi_count, zone_header_click_count,
-            basic_info_client_count, account_info_click_count,
-            clk_account_living_status_pv, clk_accountinfo_weapp_pv,
-            clk_accountinfo_finder_pv, clk_accountinfo_biz_pv,
-            clk_account_info_producttab_pv, clk_account_info_productdetail_pv,
-            activity_info_click_count,
-            overall_leads_purchase_count, effective_leads_count, effective_cost,
-            effect_leads_purchase_count, effect_leads_purchase_cost,
-            platform_page_view_count, platform_page_view_rate,
-            lan_button_click_count, lan_jump_button_clickers, lan_button_click_cost,
-            lan_jump_button_ctr, lan_jump_button_click_cost,
-            key_page_view_count, key_page_view_by_display_count, key_page_view_by_click_count,
-            key_page_uv, key_page_view_cost, key_page_view_rate,
-            landing_commodity_detail_exp_pv,
-            app_commodity_page_view_by_display_count, app_commodity_page_view_by_click_count,
-            view_commodity_page_uv, web_commodity_page_view_rate, web_commodity_page_view_cost,
-            own_page_navigation_count, own_page_navi_cost,
-            platform_page_navigation_count, platform_page_navigation_cost,
-            platform_shop_navigation_count, platform_shop_navigation_cost,
-            active_page_views, active_page_viewers,
-            active_page_interaction_amount, active_page_interaction_users,
-            guide_to_follow_page_views, guide_to_follow_page_viewers,
-            guide_to_follow_page_interaction_amount, guide_to_follow_page_interaction_users,
-            platform_key_page_view_user_count,
-            page_consult_count, consult_uv_count, page_consult_rate, page_consult_cost,
-            consult_leave_info_users, consult_leave_info_cost,
-            potential_consult_count, effective_consult_count, tool_consult_count,
-            page_reservation_count, page_reservation_by_display_count, page_reservation_by_click_count,
-            reservation_uv, reservation_amount, page_reservation_cost, page_reservation_cost_with_people,
-            page_reservation_rate, page_reservation_roi,
-            biz_reservation_uv, biz_reservation_follow_rate,
-            external_form_reservation_count, potential_reserve_count,
-            reservation_check_uv, reservation_check_uv_cost, reservation_check_uv_rate,
-            effective_reserve_count, valid_leads_uv, try_out_intention_uv, ineffective_leads_uv,
-            coupon_get_pv, coupon_get_cost, coupon_get_rate,
-            platform_coupon_click_count, purchase_amount_with_coupon,
-            coupon_purchase_rate, purchase_amount_with_coupon_cost, coupon_usage_number,
-            page_phone_call_direct_count, page_phone_call_direct_rate, page_phone_call_direct_cost,
-            potential_phone_count, potential_customer_phone_uv,
-            effective_phone_count, valid_phone_uv,
-            income_val_1, income_roi_1, income_val_3, income_roi_3,
-            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.adgroupId}, #{report.adgroupName}, #{report.date},
-            #{report.viewCount}, #{report.viewUserCount}, #{report.avgViewPerUser},
-            #{report.validClickCount}, #{report.clickUserCount}, #{report.cpc}, #{report.ctr},
-            #{report.valuableClickCount}, #{report.valuableClickCost}, #{report.valuableClickRate},
-            #{report.cost}, #{report.acquisitionCost}, #{report.thousandDisplayPrice},
-            #{report.conversionsCount}, #{report.conversionsRate}, #{report.conversionsCost},
-            #{report.deepConversionsCount}, #{report.deepConversionsRate}, #{report.deepConversionsCost},
-            #{report.conversionsByDisplayCount}, #{report.conversionsByDisplayRate}, #{report.conversionsByDisplayCost},
-            #{report.conversionsByClickCount}, #{report.conversionsByClickRate}, #{report.conversionsByClickCost},
-            #{report.previewConversionsCount}, #{report.previewDeepConversionsCount},
-            #{report.videoOuterPlayCount}, #{report.videoOuterPlayUserCount}, #{report.avgUserPlayCount},
-            #{report.videoOuterPlayTimeCount}, #{report.videoOuterPlayTimeAvgRate},
-            #{report.videoOuterPlayRate}, #{report.videoOuterPlayCost},
-            #{report.videoOuterPlay10Count}, #{report.videoOuterPlay25Count}, #{report.videoOuterPlay50Count},
-            #{report.videoOuterPlay75Count}, #{report.videoOuterPlay90Count}, #{report.videoOuterPlay95Count},
-            #{report.videoOuterPlay100Count}, #{report.videoOuterPlay3sCount}, #{report.videoOuterPlay3sRate},
-            #{report.videoOuterPlay5sCount}, #{report.videoOuterPlay7sCount},
-            #{report.readCount}, #{report.readCost}, #{report.commentCount}, #{report.commentCost},
-            #{report.praiseCount}, #{report.praiseCost}, #{report.forwardCount}, #{report.forwardCost}, #{report.noInterestCount},
-            #{report.liveStreamCrtClickCnt}, #{report.clickImageCount}, #{report.clickHeadCount},
-            #{report.clickDetailCount}, #{report.clickPoiCount}, #{report.zoneHeaderClickCount},
-            #{report.basicInfoClientCount}, #{report.accountInfoClickCount},
-            #{report.clkAccountLivingStatusPv}, #{report.clkAccountinfoWeappPv},
-            #{report.clkAccountinfoFinderPv}, #{report.clkAccountinfoBizPv},
-            #{report.clkAccountInfoProducttabPv}, #{report.clkAccountInfoProductdetailPv},
-            #{report.activityInfoClickCount},
-            #{report.overallLeadsPurchaseCount}, #{report.effectiveLeadsCount}, #{report.effectiveCost},
-            #{report.effectLeadsPurchaseCount}, #{report.effectLeadsPurchaseCost},
-            #{report.platformPageViewCount}, #{report.platformPageViewRate},
-            #{report.lanButtonClickCount}, #{report.lanJumpButtonClickers}, #{report.lanButtonClickCost},
-            #{report.lanJumpButtonCtr}, #{report.lanJumpButtonClickCost},
-            #{report.keyPageViewCount}, #{report.keyPageViewByDisplayCount}, #{report.keyPageViewByClickCount},
-            #{report.keyPageUv}, #{report.keyPageViewCost}, #{report.keyPageViewRate},
-            #{report.landingCommodityDetailExpPv},
-            #{report.appCommodityPageViewByDisplayCount}, #{report.appCommodityPageViewByClickCount},
-            #{report.viewCommodityPageUv}, #{report.webCommodityPageViewRate}, #{report.webCommodityPageViewCost},
-            #{report.ownPageNavigationCount}, #{report.ownPageNaviCost},
-            #{report.platformPageNavigationCount}, #{report.platformPageNavigationCost},
-            #{report.platformShopNavigationCount}, #{report.platformShopNavigationCost},
-            #{report.activePageViews}, #{report.activePageViewers},
-            #{report.activePageInteractionAmount}, #{report.activePageInteractionUsers},
-            #{report.guideToFollowPageViews}, #{report.guideToFollowPageViewers},
-            #{report.guideToFollowPageInteractionAmount}, #{report.guideToFollowPageInteractionUsers},
-            #{report.platformKeyPageViewUserCount},
-            #{report.pageConsultCount}, #{report.consultUvCount}, #{report.pageConsultRate}, #{report.pageConsultCost},
-            #{report.consultLeaveInfoUsers}, #{report.consultLeaveInfoCost},
-            #{report.potentialConsultCount}, #{report.effectiveConsultCount}, #{report.toolConsultCount},
-            #{report.pageReservationCount}, #{report.pageReservationByDisplayCount}, #{report.pageReservationByClickCount},
-            #{report.reservationUv}, #{report.reservationAmount}, #{report.pageReservationCost}, #{report.pageReservationCostWithPeople},
-            #{report.pageReservationRate}, #{report.pageReservationRoi},
-            #{report.bizReservationUv}, #{report.bizReservationFollowRate},
-            #{report.externalFormReservationCount}, #{report.potentialReserveCount},
-            #{report.reservationCheckUv}, #{report.reservationCheckUvCost}, #{report.reservationCheckUvRate},
-            #{report.effectiveReserveCount}, #{report.validLeadsUv}, #{report.tryOutIntentionUv}, #{report.ineffectiveLeadsUv},
-            #{report.couponGetPv}, #{report.couponGetCost}, #{report.couponGetRate},
-            #{report.platformCouponClickCount}, #{report.purchaseAmountWithCoupon},
-            #{report.couponPurchaseRate}, #{report.purchaseAmountWithCouponCost}, #{report.couponUsageNumber},
-            #{report.pagePhoneCallDirectCount}, #{report.pagePhoneCallDirectRate}, #{report.pagePhoneCallDirectCost},
-            #{report.potentialPhoneCount}, #{report.potentialCustomerPhoneUv},
-            #{report.effectivePhoneCount}, #{report.validPhoneUv},
-            #{report.incomeVal1}, #{report.incomeRoi1}, #{report.incomeVal3}, #{report.incomeRoi3},
-            #{report.incomeVal7}, #{report.incomeRoi7}, #{report.incomeVal14}, #{report.incomeRoi14},
-            #{report.incomeVal24h}, #{report.incomeRoi124h}
-        ) ON DUPLICATE KEY UPDATE
-            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),
-            cost = VALUES(cost), acquisition_cost = VALUES(acquisition_cost), thousand_display_price = VALUES(thousand_display_price),
-            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost),
-            deep_conversions_count = VALUES(deep_conversions_count), deep_conversions_rate = VALUES(deep_conversions_rate), deep_conversions_cost = VALUES(deep_conversions_cost),
-            conversions_by_display_count = VALUES(conversions_by_display_count), conversions_by_display_rate = VALUES(conversions_by_display_rate), conversions_by_display_cost = VALUES(conversions_by_display_cost),
-            conversions_by_click_count = VALUES(conversions_by_click_count), conversions_by_click_rate = VALUES(conversions_by_click_rate), conversions_by_click_cost = VALUES(conversions_by_click_cost),
-            preview_conversions_count = VALUES(preview_conversions_count), preview_deep_conversions_count = VALUES(preview_deep_conversions_count),
-            video_outer_play_count = VALUES(video_outer_play_count), video_outer_play_user_count = VALUES(video_outer_play_user_count), avg_user_play_count = VALUES(avg_user_play_count),
-            video_outer_play_time_count = VALUES(video_outer_play_time_count), video_outer_play_time_avg_rate = VALUES(video_outer_play_time_avg_rate),
-            video_outer_play_rate = VALUES(video_outer_play_rate), video_outer_play_cost = VALUES(video_outer_play_cost),
-            video_outer_play10_count = VALUES(video_outer_play10_count), video_outer_play25_count = VALUES(video_outer_play25_count), video_outer_play50_count = VALUES(video_outer_play50_count),
-            video_outer_play75_count = VALUES(video_outer_play75_count), video_outer_play90_count = VALUES(video_outer_play90_count), video_outer_play95_count = VALUES(video_outer_play95_count),
-            video_outer_play100_count = VALUES(video_outer_play100_count), video_outer_play3s_count = VALUES(video_outer_play3s_count), video_outer_play3s_rate = VALUES(video_outer_play3s_rate),
-            video_outer_play5s_count = VALUES(video_outer_play5s_count), video_outer_play7s_count = VALUES(video_outer_play7s_count),
-            read_count = VALUES(read_count), read_cost = VALUES(read_cost), comment_count = VALUES(comment_count), comment_cost = VALUES(comment_cost),
-            praise_count = VALUES(praise_count), praise_cost = VALUES(praise_cost), forward_count = VALUES(forward_count), forward_cost = VALUES(forward_cost), no_interest_count = VALUES(no_interest_count),
-            live_stream_crt_click_cnt = VALUES(live_stream_crt_click_cnt), click_image_count = VALUES(click_image_count), click_head_count = VALUES(click_head_count),
-            click_detail_count = VALUES(click_detail_count), click_poi_count = VALUES(click_poi_count), zone_header_click_count = VALUES(zone_header_click_count),
-            basic_info_client_count = VALUES(basic_info_client_count), account_info_click_count = VALUES(account_info_click_count),
-            clk_account_living_status_pv = VALUES(clk_account_living_status_pv), clk_accountinfo_weapp_pv = VALUES(clk_accountinfo_weapp_pv),
-            clk_accountinfo_finder_pv = VALUES(clk_accountinfo_finder_pv), clk_accountinfo_biz_pv = VALUES(clk_accountinfo_biz_pv),
-            clk_account_info_producttab_pv = VALUES(clk_account_info_producttab_pv), clk_account_info_productdetail_pv = VALUES(clk_account_info_productdetail_pv),
-            activity_info_click_count = VALUES(activity_info_click_count),
-            overall_leads_purchase_count = VALUES(overall_leads_purchase_count), effective_leads_count = VALUES(effective_leads_count), effective_cost = VALUES(effective_cost),
-            effect_leads_purchase_count = VALUES(effect_leads_purchase_count), effect_leads_purchase_cost = VALUES(effect_leads_purchase_cost),
-            platform_page_view_count = VALUES(platform_page_view_count), platform_page_view_rate = VALUES(platform_page_view_rate),
-            lan_button_click_count = VALUES(lan_button_click_count), lan_jump_button_clickers = VALUES(lan_jump_button_clickers), lan_button_click_cost = VALUES(lan_button_click_cost),
-            lan_jump_button_ctr = VALUES(lan_jump_button_ctr), lan_jump_button_click_cost = VALUES(lan_jump_button_click_cost),
-            key_page_view_count = VALUES(key_page_view_count), key_page_view_by_display_count = VALUES(key_page_view_by_display_count), key_page_view_by_click_count = VALUES(key_page_view_by_click_count),
-            key_page_uv = VALUES(key_page_uv), key_page_view_cost = VALUES(key_page_view_cost), key_page_view_rate = VALUES(key_page_view_rate),
-            landing_commodity_detail_exp_pv = VALUES(landing_commodity_detail_exp_pv),
-            app_commodity_page_view_by_display_count = VALUES(app_commodity_page_view_by_display_count), app_commodity_page_view_by_click_count = VALUES(app_commodity_page_view_by_click_count),
-            view_commodity_page_uv = VALUES(view_commodity_page_uv), web_commodity_page_view_rate = VALUES(web_commodity_page_view_rate), web_commodity_page_view_cost = VALUES(web_commodity_page_view_cost),
-            own_page_navigation_count = VALUES(own_page_navigation_count), own_page_navi_cost = VALUES(own_page_navi_cost),
-            platform_page_navigation_count = VALUES(platform_page_navigation_count), platform_page_navigation_cost = VALUES(platform_page_navigation_cost),
-            platform_shop_navigation_count = VALUES(platform_shop_navigation_count), platform_shop_navigation_cost = VALUES(platform_shop_navigation_cost),
-            active_page_views = VALUES(active_page_views), active_page_viewers = VALUES(active_page_viewers),
-            active_page_interaction_amount = VALUES(active_page_interaction_amount), active_page_interaction_users = VALUES(active_page_interaction_users),
-            guide_to_follow_page_views = VALUES(guide_to_follow_page_views), guide_to_follow_page_viewers = VALUES(guide_to_follow_page_viewers),
-            guide_to_follow_page_interaction_amount = VALUES(guide_to_follow_page_interaction_amount), guide_to_follow_page_interaction_users = VALUES(guide_to_follow_page_interaction_users),
-            platform_key_page_view_user_count = VALUES(platform_key_page_view_user_count),
-            page_consult_count = VALUES(page_consult_count), consult_uv_count = VALUES(consult_uv_count), page_consult_rate = VALUES(page_consult_rate), page_consult_cost = VALUES(page_consult_cost),
-            consult_leave_info_users = VALUES(consult_leave_info_users), consult_leave_info_cost = VALUES(consult_leave_info_cost),
-            potential_consult_count = VALUES(potential_consult_count), effective_consult_count = VALUES(effective_consult_count), tool_consult_count = VALUES(tool_consult_count),
-            page_reservation_count = VALUES(page_reservation_count), page_reservation_by_display_count = VALUES(page_reservation_by_display_count), page_reservation_by_click_count = VALUES(page_reservation_by_click_count),
-            reservation_uv = VALUES(reservation_uv), reservation_amount = VALUES(reservation_amount), page_reservation_cost = VALUES(page_reservation_cost), page_reservation_cost_with_people = VALUES(page_reservation_cost_with_people),
-            page_reservation_rate = VALUES(page_reservation_rate), page_reservation_roi = VALUES(page_reservation_roi),
-            biz_reservation_uv = VALUES(biz_reservation_uv), biz_reservation_follow_rate = VALUES(biz_reservation_follow_rate),
-            external_form_reservation_count = VALUES(external_form_reservation_count), potential_reserve_count = VALUES(potential_reserve_count),
-            reservation_check_uv = VALUES(reservation_check_uv), reservation_check_uv_cost = VALUES(reservation_check_uv_cost), reservation_check_uv_rate = VALUES(reservation_check_uv_rate),
-            effective_reserve_count = VALUES(effective_reserve_count), valid_leads_uv = VALUES(valid_leads_uv), try_out_intention_uv = VALUES(try_out_intention_uv), ineffective_leads_uv = VALUES(ineffective_leads_uv),
-            coupon_get_pv = VALUES(coupon_get_pv), coupon_get_cost = VALUES(coupon_get_cost), coupon_get_rate = VALUES(coupon_get_rate),
-            platform_coupon_click_count = VALUES(platform_coupon_click_count), purchase_amount_with_coupon = VALUES(purchase_amount_with_coupon),
-            coupon_purchase_rate = VALUES(coupon_purchase_rate), purchase_amount_with_coupon_cost = VALUES(purchase_amount_with_coupon_cost), coupon_usage_number = VALUES(coupon_usage_number),
-            page_phone_call_direct_count = VALUES(page_phone_call_direct_count), page_phone_call_direct_rate = VALUES(page_phone_call_direct_rate), page_phone_call_direct_cost = VALUES(page_phone_call_direct_cost),
-            potential_phone_count = VALUES(potential_phone_count), potential_customer_phone_uv = VALUES(potential_customer_phone_uv),
-            effective_phone_count = VALUES(effective_phone_count), valid_phone_uv = VALUES(valid_phone_uv),
-            income_val_1 = VALUES(income_val_1), income_roi_1 = VALUES(income_roi_1), income_val_3 = VALUES(income_val_3), income_roi_3 = VALUES(income_roi_3),
-            income_val_7 = VALUES(income_val_7), income_roi_7 = VALUES(income_roi_7), income_val_14 = VALUES(income_val_14), income_roi_14 = VALUES(income_roi_14),
-            income_val_24h = VALUES(income_val_24h), income_roi_1_24h = VALUES(income_roi_1_24h)
-    </insert>
 
     <insert id="batchUpsert" parameterType="java.util.List">
         INSERT INTO rep_daily_adgroup_report (
@@ -202,7 +9,7 @@
             valid_click_count, click_user_count, cpc, ctr,
             valuable_click_count, valuable_click_cost, valuable_click_rate,
             cost, acquisition_cost, thousand_display_price,
-            conversions_count, conversions_rate, conversions_cost,
+            conversions_count, conversions_rate, conversions_cost, scan_follow_user_cost,
             deep_conversions_count, deep_conversions_rate, deep_conversions_cost,
             conversions_by_display_count, conversions_by_display_rate, conversions_by_display_cost,
             conversions_by_click_count, conversions_by_click_rate, conversions_by_click_cost,
@@ -268,7 +75,7 @@
                 #{report.validClickCount}, #{report.clickUserCount}, #{report.cpc}, #{report.ctr},
                 #{report.valuableClickCount}, #{report.valuableClickCost}, #{report.valuableClickRate},
                 #{report.cost}, #{report.acquisitionCost}, #{report.thousandDisplayPrice},
-                #{report.conversionsCount}, #{report.conversionsRate}, #{report.conversionsCost},
+                #{report.conversionsCount}, #{report.conversionsRate}, #{report.conversionsCost}, #{report.scanFollowUserCost},
                 #{report.deepConversionsCount}, #{report.deepConversionsRate}, #{report.deepConversionsCost},
                 #{report.conversionsByDisplayCount}, #{report.conversionsByDisplayRate}, #{report.conversionsByDisplayCost},
                 #{report.conversionsByClickCount}, #{report.conversionsByClickRate}, #{report.conversionsByClickCost},
@@ -329,12 +136,11 @@
             )
         </foreach>
         ON DUPLICATE KEY UPDATE
-            group_name = VALUES(group_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),
             cost = VALUES(cost), acquisition_cost = VALUES(acquisition_cost), thousand_display_price = VALUES(thousand_display_price),
-            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost),
+            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost), scan_follow_user_cost = VALUES(scan_follow_user_cost),
             deep_conversions_count = VALUES(deep_conversions_count), deep_conversions_rate = VALUES(deep_conversions_rate), deep_conversions_cost = VALUES(deep_conversions_cost),
             conversions_by_display_count = VALUES(conversions_by_display_count), conversions_by_display_rate = VALUES(conversions_by_display_rate), conversions_by_display_cost = VALUES(conversions_by_display_cost),
             conversions_by_click_count = VALUES(conversions_by_click_count), conversions_by_click_rate = VALUES(conversions_by_click_rate), conversions_by_click_cost = VALUES(conversions_by_click_cost),

+ 0 - 196
src/main/resources/mapper/RepDailyCreativeReportMapper.xml

@@ -2,202 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.moka.gdtauto.mapper.RepDailyCreativeReportMapper">
 
-    <!-- 插入或更新(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, 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,
-            cost, acquisition_cost, thousand_display_price,
-            conversions_count, conversions_rate, conversions_cost,
-            deep_conversions_count, deep_conversions_rate, deep_conversions_cost,
-            conversions_by_display_count, conversions_by_display_rate, conversions_by_display_cost,
-            conversions_by_click_count, conversions_by_click_rate, conversions_by_click_cost,
-            preview_conversions_count, preview_deep_conversions_count,
-            video_outer_play_count, video_outer_play_user_count, avg_user_play_count,
-            video_outer_play_time_count, video_outer_play_time_avg_rate,
-            video_outer_play_rate, video_outer_play_cost,
-            video_outer_play10_count, video_outer_play25_count, video_outer_play50_count,
-            video_outer_play75_count, video_outer_play90_count, video_outer_play95_count,
-            video_outer_play100_count, video_outer_play3s_count, video_outer_play3s_rate,
-            video_outer_play5s_count, video_outer_play7s_count,
-            read_count, read_cost, comment_count, comment_cost,
-            praise_count, praise_cost, forward_count, forward_cost, no_interest_count,
-            live_stream_crt_click_cnt, click_image_count, click_head_count,
-            click_detail_count, click_poi_count, zone_header_click_count,
-            basic_info_client_count, account_info_click_count,
-            clk_account_living_status_pv, clk_accountinfo_weapp_pv,
-            clk_accountinfo_finder_pv, clk_accountinfo_biz_pv,
-            clk_account_info_producttab_pv, clk_account_info_productdetail_pv,
-            activity_info_click_count,
-            overall_leads_purchase_count, effective_leads_count, effective_cost,
-            effect_leads_purchase_count, effect_leads_purchase_cost,
-            platform_page_view_count, platform_page_view_rate,
-            lan_button_click_count, lan_jump_button_clickers, lan_button_click_cost,
-            lan_jump_button_ctr, lan_jump_button_click_cost,
-            key_page_view_count, key_page_view_by_display_count, key_page_view_by_click_count,
-            key_page_uv, key_page_view_cost, key_page_view_rate,
-            landing_commodity_detail_exp_pv,
-            app_commodity_page_view_by_display_count, app_commodity_page_view_by_click_count,
-            view_commodity_page_uv, web_commodity_page_view_rate, web_commodity_page_view_cost,
-            own_page_navigation_count, own_page_navi_cost,
-            platform_page_navigation_count, platform_page_navigation_cost,
-            platform_shop_navigation_count, platform_shop_navigation_cost,
-            active_page_views, active_page_viewers,
-            active_page_interaction_amount, active_page_interaction_users,
-            guide_to_follow_page_views, guide_to_follow_page_viewers,
-            guide_to_follow_page_interaction_amount, guide_to_follow_page_interaction_users,
-            platform_key_page_view_user_count,
-            page_consult_count, consult_uv_count, page_consult_rate, page_consult_cost,
-            consult_leave_info_users, consult_leave_info_cost,
-            potential_consult_count, effective_consult_count, tool_consult_count,
-            page_reservation_count, page_reservation_by_display_count, page_reservation_by_click_count,
-            reservation_uv, reservation_amount, page_reservation_cost, page_reservation_cost_with_people,
-            page_reservation_rate, page_reservation_roi,
-            biz_reservation_uv, biz_reservation_follow_rate,
-            external_form_reservation_count, potential_reserve_count,
-            reservation_check_uv, reservation_check_uv_cost, reservation_check_uv_rate,
-            effective_reserve_count, valid_leads_uv, try_out_intention_uv, ineffective_leads_uv,
-            coupon_get_pv, coupon_get_cost, coupon_get_rate,
-            platform_coupon_click_count, purchase_amount_with_coupon,
-            coupon_purchase_rate, purchase_amount_with_coupon_cost, coupon_usage_number,
-            page_phone_call_direct_count, page_phone_call_direct_rate, page_phone_call_direct_cost,
-            potential_phone_count, potential_customer_phone_uv,
-            effective_phone_count, valid_phone_uv,
-            income_val_1, income_roi_1, income_val_3, income_roi_3,
-            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.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},
-            #{report.cost}, #{report.acquisitionCost}, #{report.thousandDisplayPrice},
-            #{report.conversionsCount}, #{report.conversionsRate}, #{report.conversionsCost},
-            #{report.deepConversionsCount}, #{report.deepConversionsRate}, #{report.deepConversionsCost},
-            #{report.conversionsByDisplayCount}, #{report.conversionsByDisplayRate}, #{report.conversionsByDisplayCost},
-            #{report.conversionsByClickCount}, #{report.conversionsByClickRate}, #{report.conversionsByClickCost},
-            #{report.previewConversionsCount}, #{report.previewDeepConversionsCount},
-            #{report.videoOuterPlayCount}, #{report.videoOuterPlayUserCount}, #{report.avgUserPlayCount},
-            #{report.videoOuterPlayTimeCount}, #{report.videoOuterPlayTimeAvgRate},
-            #{report.videoOuterPlayRate}, #{report.videoOuterPlayCost},
-            #{report.videoOuterPlay10Count}, #{report.videoOuterPlay25Count}, #{report.videoOuterPlay50Count},
-            #{report.videoOuterPlay75Count}, #{report.videoOuterPlay90Count}, #{report.videoOuterPlay95Count},
-            #{report.videoOuterPlay100Count}, #{report.videoOuterPlay3sCount}, #{report.videoOuterPlay3sRate},
-            #{report.videoOuterPlay5sCount}, #{report.videoOuterPlay7sCount},
-            #{report.readCount}, #{report.readCost}, #{report.commentCount}, #{report.commentCost},
-            #{report.praiseCount}, #{report.praiseCost}, #{report.forwardCount}, #{report.forwardCost}, #{report.noInterestCount},
-            #{report.liveStreamCrtClickCnt}, #{report.clickImageCount}, #{report.clickHeadCount},
-            #{report.clickDetailCount}, #{report.clickPoiCount}, #{report.zoneHeaderClickCount},
-            #{report.basicInfoClientCount}, #{report.accountInfoClickCount},
-            #{report.clkAccountLivingStatusPv}, #{report.clkAccountinfoWeappPv},
-            #{report.clkAccountinfoFinderPv}, #{report.clkAccountinfoBizPv},
-            #{report.clkAccountInfoProducttabPv}, #{report.clkAccountInfoProductdetailPv},
-            #{report.activityInfoClickCount},
-            #{report.overallLeadsPurchaseCount}, #{report.effectiveLeadsCount}, #{report.effectiveCost},
-            #{report.effectLeadsPurchaseCount}, #{report.effectLeadsPurchaseCost},
-            #{report.platformPageViewCount}, #{report.platformPageViewRate},
-            #{report.lanButtonClickCount}, #{report.lanJumpButtonClickers}, #{report.lanButtonClickCost},
-            #{report.lanJumpButtonCtr}, #{report.lanJumpButtonClickCost},
-            #{report.keyPageViewCount}, #{report.keyPageViewByDisplayCount}, #{report.keyPageViewByClickCount},
-            #{report.keyPageUv}, #{report.keyPageViewCost}, #{report.keyPageViewRate},
-            #{report.landingCommodityDetailExpPv},
-            #{report.appCommodityPageViewByDisplayCount}, #{report.appCommodityPageViewByClickCount},
-            #{report.viewCommodityPageUv}, #{report.webCommodityPageViewRate}, #{report.webCommodityPageViewCost},
-            #{report.ownPageNavigationCount}, #{report.ownPageNaviCost},
-            #{report.platformPageNavigationCount}, #{report.platformPageNavigationCost},
-            #{report.platformShopNavigationCount}, #{report.platformShopNavigationCost},
-            #{report.activePageViews}, #{report.activePageViewers},
-            #{report.activePageInteractionAmount}, #{report.activePageInteractionUsers},
-            #{report.guideToFollowPageViews}, #{report.guideToFollowPageViewers},
-            #{report.guideToFollowPageInteractionAmount}, #{report.guideToFollowPageInteractionUsers},
-            #{report.platformKeyPageViewUserCount},
-            #{report.pageConsultCount}, #{report.consultUvCount}, #{report.pageConsultRate}, #{report.pageConsultCost},
-            #{report.consultLeaveInfoUsers}, #{report.consultLeaveInfoCost},
-            #{report.potentialConsultCount}, #{report.effectiveConsultCount}, #{report.toolConsultCount},
-            #{report.pageReservationCount}, #{report.pageReservationByDisplayCount}, #{report.pageReservationByClickCount},
-            #{report.reservationUv}, #{report.reservationAmount}, #{report.pageReservationCost}, #{report.pageReservationCostWithPeople},
-            #{report.pageReservationRate}, #{report.pageReservationRoi},
-            #{report.bizReservationUv}, #{report.bizReservationFollowRate},
-            #{report.externalFormReservationCount}, #{report.potentialReserveCount},
-            #{report.reservationCheckUv}, #{report.reservationCheckUvCost}, #{report.reservationCheckUvRate},
-            #{report.effectiveReserveCount}, #{report.validLeadsUv}, #{report.tryOutIntentionUv}, #{report.ineffectiveLeadsUv},
-            #{report.couponGetPv}, #{report.couponGetCost}, #{report.couponGetRate},
-            #{report.platformCouponClickCount}, #{report.purchaseAmountWithCoupon},
-            #{report.couponPurchaseRate}, #{report.purchaseAmountWithCouponCost}, #{report.couponUsageNumber},
-            #{report.pagePhoneCallDirectCount}, #{report.pagePhoneCallDirectRate}, #{report.pagePhoneCallDirectCost},
-            #{report.potentialPhoneCount}, #{report.potentialCustomerPhoneUv},
-            #{report.effectivePhoneCount}, #{report.validPhoneUv},
-            #{report.incomeVal1}, #{report.incomeRoi1}, #{report.incomeVal3}, #{report.incomeRoi3},
-            #{report.incomeVal7}, #{report.incomeRoi7}, #{report.incomeVal14}, #{report.incomeRoi14},
-            #{report.incomeVal24h}, #{report.incomeRoi124h}
-        ) ON DUPLICATE KEY UPDATE
-            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),
-            cost = VALUES(cost), acquisition_cost = VALUES(acquisition_cost), thousand_display_price = VALUES(thousand_display_price),
-            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost),
-            deep_conversions_count = VALUES(deep_conversions_count), deep_conversions_rate = VALUES(deep_conversions_rate), deep_conversions_cost = VALUES(deep_conversions_cost),
-            conversions_by_display_count = VALUES(conversions_by_display_count), conversions_by_display_rate = VALUES(conversions_by_display_rate), conversions_by_display_cost = VALUES(conversions_by_display_cost),
-            conversions_by_click_count = VALUES(conversions_by_click_count), conversions_by_click_rate = VALUES(conversions_by_click_rate), conversions_by_click_cost = VALUES(conversions_by_click_cost),
-            preview_conversions_count = VALUES(preview_conversions_count), preview_deep_conversions_count = VALUES(preview_deep_conversions_count),
-            video_outer_play_count = VALUES(video_outer_play_count), video_outer_play_user_count = VALUES(video_outer_play_user_count), avg_user_play_count = VALUES(avg_user_play_count),
-            video_outer_play_time_count = VALUES(video_outer_play_time_count), video_outer_play_time_avg_rate = VALUES(video_outer_play_time_avg_rate),
-            video_outer_play_rate = VALUES(video_outer_play_rate), video_outer_play_cost = VALUES(video_outer_play_cost),
-            video_outer_play10_count = VALUES(video_outer_play10_count), video_outer_play25_count = VALUES(video_outer_play25_count), video_outer_play50_count = VALUES(video_outer_play50_count),
-            video_outer_play75_count = VALUES(video_outer_play75_count), video_outer_play90_count = VALUES(video_outer_play90_count), video_outer_play95_count = VALUES(video_outer_play95_count),
-            video_outer_play100_count = VALUES(video_outer_play100_count), video_outer_play3s_count = VALUES(video_outer_play3s_count), video_outer_play3s_rate = VALUES(video_outer_play3s_rate),
-            video_outer_play5s_count = VALUES(video_outer_play5s_count), video_outer_play7s_count = VALUES(video_outer_play7s_count),
-            read_count = VALUES(read_count), read_cost = VALUES(read_cost), comment_count = VALUES(comment_count), comment_cost = VALUES(comment_cost),
-            praise_count = VALUES(praise_count), praise_cost = VALUES(praise_cost), forward_count = VALUES(forward_count), forward_cost = VALUES(forward_cost), no_interest_count = VALUES(no_interest_count),
-            live_stream_crt_click_cnt = VALUES(live_stream_crt_click_cnt), click_image_count = VALUES(click_image_count), click_head_count = VALUES(click_head_count),
-            click_detail_count = VALUES(click_detail_count), click_poi_count = VALUES(click_poi_count), zone_header_click_count = VALUES(zone_header_click_count),
-            basic_info_client_count = VALUES(basic_info_client_count), account_info_click_count = VALUES(account_info_click_count),
-            clk_account_living_status_pv = VALUES(clk_account_living_status_pv), clk_accountinfo_weapp_pv = VALUES(clk_accountinfo_weapp_pv),
-            clk_accountinfo_finder_pv = VALUES(clk_accountinfo_finder_pv), clk_accountinfo_biz_pv = VALUES(clk_accountinfo_biz_pv),
-            clk_account_info_producttab_pv = VALUES(clk_account_info_producttab_pv), clk_account_info_productdetail_pv = VALUES(clk_account_info_productdetail_pv),
-            activity_info_click_count = VALUES(activity_info_click_count),
-            overall_leads_purchase_count = VALUES(overall_leads_purchase_count), effective_leads_count = VALUES(effective_leads_count), effective_cost = VALUES(effective_cost),
-            effect_leads_purchase_count = VALUES(effect_leads_purchase_count), effect_leads_purchase_cost = VALUES(effect_leads_purchase_cost),
-            platform_page_view_count = VALUES(platform_page_view_count), platform_page_view_rate = VALUES(platform_page_view_rate),
-            lan_button_click_count = VALUES(lan_button_click_count), lan_jump_button_clickers = VALUES(lan_jump_button_clickers), lan_button_click_cost = VALUES(lan_button_click_cost),
-            lan_jump_button_ctr = VALUES(lan_jump_button_ctr), lan_jump_button_click_cost = VALUES(lan_jump_button_click_cost),
-            key_page_view_count = VALUES(key_page_view_count), key_page_view_by_display_count = VALUES(key_page_view_by_display_count), key_page_view_by_click_count = VALUES(key_page_view_by_click_count),
-            key_page_uv = VALUES(key_page_uv), key_page_view_cost = VALUES(key_page_view_cost), key_page_view_rate = VALUES(key_page_view_rate),
-            landing_commodity_detail_exp_pv = VALUES(landing_commodity_detail_exp_pv),
-            app_commodity_page_view_by_display_count = VALUES(app_commodity_page_view_by_display_count), app_commodity_page_view_by_click_count = VALUES(app_commodity_page_view_by_click_count),
-            view_commodity_page_uv = VALUES(view_commodity_page_uv), web_commodity_page_view_rate = VALUES(web_commodity_page_view_rate), web_commodity_page_view_cost = VALUES(web_commodity_page_view_cost),
-            own_page_navigation_count = VALUES(own_page_navigation_count), own_page_navi_cost = VALUES(own_page_navi_cost),
-            platform_page_navigation_count = VALUES(platform_page_navigation_count), platform_page_navigation_cost = VALUES(platform_page_navigation_cost),
-            platform_shop_navigation_count = VALUES(platform_shop_navigation_count), platform_shop_navigation_cost = VALUES(platform_shop_navigation_cost),
-            active_page_views = VALUES(active_page_views), active_page_viewers = VALUES(active_page_viewers),
-            active_page_interaction_amount = VALUES(active_page_interaction_amount), active_page_interaction_users = VALUES(active_page_interaction_users),
-            guide_to_follow_page_views = VALUES(guide_to_follow_page_views), guide_to_follow_page_viewers = VALUES(guide_to_follow_page_viewers),
-            guide_to_follow_page_interaction_amount = VALUES(guide_to_follow_page_interaction_amount), guide_to_follow_page_interaction_users = VALUES(guide_to_follow_page_interaction_users),
-            platform_key_page_view_user_count = VALUES(platform_key_page_view_user_count),
-            page_consult_count = VALUES(page_consult_count), consult_uv_count = VALUES(consult_uv_count), page_consult_rate = VALUES(page_consult_rate), page_consult_cost = VALUES(page_consult_cost),
-            consult_leave_info_users = VALUES(consult_leave_info_users), consult_leave_info_cost = VALUES(consult_leave_info_cost),
-            potential_consult_count = VALUES(potential_consult_count), effective_consult_count = VALUES(effective_consult_count), tool_consult_count = VALUES(tool_consult_count),
-            page_reservation_count = VALUES(page_reservation_count), page_reservation_by_display_count = VALUES(page_reservation_by_display_count), page_reservation_by_click_count = VALUES(page_reservation_by_click_count),
-            reservation_uv = VALUES(reservation_uv), reservation_amount = VALUES(reservation_amount), page_reservation_cost = VALUES(page_reservation_cost), page_reservation_cost_with_people = VALUES(page_reservation_cost_with_people),
-            page_reservation_rate = VALUES(page_reservation_rate), page_reservation_roi = VALUES(page_reservation_roi),
-            biz_reservation_uv = VALUES(biz_reservation_uv), biz_reservation_follow_rate = VALUES(biz_reservation_follow_rate),
-            external_form_reservation_count = VALUES(external_form_reservation_count), potential_reserve_count = VALUES(potential_reserve_count),
-            reservation_check_uv = VALUES(reservation_check_uv), reservation_check_uv_cost = VALUES(reservation_check_uv_cost), reservation_check_uv_rate = VALUES(reservation_check_uv_rate),
-            effective_reserve_count = VALUES(effective_reserve_count), valid_leads_uv = VALUES(valid_leads_uv), try_out_intention_uv = VALUES(try_out_intention_uv), ineffective_leads_uv = VALUES(ineffective_leads_uv),
-            coupon_get_pv = VALUES(coupon_get_pv), coupon_get_cost = VALUES(coupon_get_cost), coupon_get_rate = VALUES(coupon_get_rate),
-            platform_coupon_click_count = VALUES(platform_coupon_click_count), purchase_amount_with_coupon = VALUES(purchase_amount_with_coupon),
-            coupon_purchase_rate = VALUES(coupon_purchase_rate), purchase_amount_with_coupon_cost = VALUES(purchase_amount_with_coupon_cost), coupon_usage_number = VALUES(coupon_usage_number),
-            page_phone_call_direct_count = VALUES(page_phone_call_direct_count), page_phone_call_direct_rate = VALUES(page_phone_call_direct_rate), page_phone_call_direct_cost = VALUES(page_phone_call_direct_cost),
-            potential_phone_count = VALUES(potential_phone_count), potential_customer_phone_uv = VALUES(potential_customer_phone_uv),
-            effective_phone_count = VALUES(effective_phone_count), valid_phone_uv = VALUES(valid_phone_uv),
-            income_val_1 = VALUES(income_val_1), income_roi_1 = VALUES(income_roi_1), income_val_3 = VALUES(income_val_3), income_roi_3 = VALUES(income_roi_3),
-            income_val_7 = VALUES(income_val_7), income_roi_7 = VALUES(income_roi_7), income_val_14 = VALUES(income_val_14), income_roi_14 = VALUES(income_roi_14),
-            income_val_24h = VALUES(income_val_24h), income_roi_1_24h = VALUES(income_roi_1_24h)
-    </insert>
-
     <!-- 批量插入或更新(REPORTING_TIME 口径)-->
     <insert id="batchUpsert" parameterType="java.util.List">
         INSERT INTO rep_daily_creative_report (

+ 3 - 199
src/main/resources/mapper/ReqDailyAdgroupReportMapper.xml

@@ -1,201 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.moka.gdtauto.mapper.ReqDailyAdgroupReportMapper">
-    <insert id="upsert" parameterType="com.moka.gdtauto.entity.ReqDailyAdgroupReport">
-        INSERT INTO req_daily_adgroup_report (
-            conf_id, group_id, group_name, account_id, adgroup_id, adgroup_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,
-            cost, acquisition_cost, thousand_display_price,
-            conversions_count, conversions_rate, conversions_cost,
-            deep_conversions_count, deep_conversions_rate, deep_conversions_cost,
-            conversions_by_display_count, conversions_by_display_rate, conversions_by_display_cost,
-            conversions_by_click_count, conversions_by_click_rate, conversions_by_click_cost,
-            preview_conversions_count, preview_deep_conversions_count,
-            video_outer_play_count, video_outer_play_user_count, avg_user_play_count,
-            video_outer_play_time_count, video_outer_play_time_avg_rate,
-            video_outer_play_rate, video_outer_play_cost,
-            video_outer_play10_count, video_outer_play25_count, video_outer_play50_count,
-            video_outer_play75_count, video_outer_play90_count, video_outer_play95_count,
-            video_outer_play100_count, video_outer_play3s_count, video_outer_play3s_rate,
-            video_outer_play5s_count, video_outer_play7s_count,
-            read_count, read_cost, comment_count, comment_cost,
-            praise_count, praise_cost, forward_count, forward_cost, no_interest_count,
-            live_stream_crt_click_cnt, click_image_count, click_head_count,
-            click_detail_count, click_poi_count, zone_header_click_count,
-            basic_info_client_count, account_info_click_count,
-            clk_account_living_status_pv, clk_accountinfo_weapp_pv,
-            clk_accountinfo_finder_pv, clk_accountinfo_biz_pv,
-            clk_account_info_producttab_pv, clk_account_info_productdetail_pv,
-            activity_info_click_count,
-            overall_leads_purchase_count, effective_leads_count, effective_cost,
-            effect_leads_purchase_count, effect_leads_purchase_cost,
-            platform_page_view_count, platform_page_view_rate,
-            lan_button_click_count, lan_jump_button_clickers, lan_button_click_cost,
-            lan_jump_button_ctr, lan_jump_button_click_cost,
-            key_page_view_count, key_page_view_by_display_count, key_page_view_by_click_count,
-            key_page_uv, key_page_view_cost, key_page_view_rate,
-            landing_commodity_detail_exp_pv,
-            app_commodity_page_view_by_display_count, app_commodity_page_view_by_click_count,
-            view_commodity_page_uv, web_commodity_page_view_rate, web_commodity_page_view_cost,
-            own_page_navigation_count, own_page_navi_cost,
-            platform_page_navigation_count, platform_page_navigation_cost,
-            platform_shop_navigation_count, platform_shop_navigation_cost,
-            active_page_views, active_page_viewers,
-            active_page_interaction_amount, active_page_interaction_users,
-            guide_to_follow_page_views, guide_to_follow_page_viewers,
-            guide_to_follow_page_interaction_amount, guide_to_follow_page_interaction_users,
-            platform_key_page_view_user_count,
-            page_consult_count, consult_uv_count, page_consult_rate, page_consult_cost,
-            consult_leave_info_users, consult_leave_info_cost,
-            potential_consult_count, effective_consult_count, tool_consult_count,
-            page_reservation_count, page_reservation_by_display_count, page_reservation_by_click_count,
-            reservation_uv, reservation_amount, page_reservation_cost, page_reservation_cost_with_people,
-            page_reservation_rate, page_reservation_roi,
-            biz_reservation_uv, biz_reservation_follow_rate,
-            external_form_reservation_count, potential_reserve_count,
-            reservation_check_uv, reservation_check_uv_cost, reservation_check_uv_rate,
-            effective_reserve_count, valid_leads_uv, try_out_intention_uv, ineffective_leads_uv,
-            coupon_get_pv, coupon_get_cost, coupon_get_rate,
-            platform_coupon_click_count, purchase_amount_with_coupon,
-            coupon_purchase_rate, purchase_amount_with_coupon_cost, coupon_usage_number,
-            page_phone_call_direct_count, page_phone_call_direct_rate, page_phone_call_direct_cost,
-            potential_phone_count, potential_customer_phone_uv,
-            effective_phone_count, valid_phone_uv,
-            income_val_1, income_roi_1, income_val_3, income_roi_3,
-            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.adgroupId}, #{report.adgroupName}, #{report.date},
-            #{report.viewCount}, #{report.viewUserCount}, #{report.avgViewPerUser},
-            #{report.validClickCount}, #{report.clickUserCount}, #{report.cpc}, #{report.ctr},
-            #{report.valuableClickCount}, #{report.valuableClickCost}, #{report.valuableClickRate},
-            #{report.cost}, #{report.acquisitionCost}, #{report.thousandDisplayPrice},
-            #{report.conversionsCount}, #{report.conversionsRate}, #{report.conversionsCost},
-            #{report.deepConversionsCount}, #{report.deepConversionsRate}, #{report.deepConversionsCost},
-            #{report.conversionsByDisplayCount}, #{report.conversionsByDisplayRate}, #{report.conversionsByDisplayCost},
-            #{report.conversionsByClickCount}, #{report.conversionsByClickRate}, #{report.conversionsByClickCost},
-            #{report.previewConversionsCount}, #{report.previewDeepConversionsCount},
-            #{report.videoOuterPlayCount}, #{report.videoOuterPlayUserCount}, #{report.avgUserPlayCount},
-            #{report.videoOuterPlayTimeCount}, #{report.videoOuterPlayTimeAvgRate},
-            #{report.videoOuterPlayRate}, #{report.videoOuterPlayCost},
-            #{report.videoOuterPlay10Count}, #{report.videoOuterPlay25Count}, #{report.videoOuterPlay50Count},
-            #{report.videoOuterPlay75Count}, #{report.videoOuterPlay90Count}, #{report.videoOuterPlay95Count},
-            #{report.videoOuterPlay100Count}, #{report.videoOuterPlay3sCount}, #{report.videoOuterPlay3sRate},
-            #{report.videoOuterPlay5sCount}, #{report.videoOuterPlay7sCount},
-            #{report.readCount}, #{report.readCost}, #{report.commentCount}, #{report.commentCost},
-            #{report.praiseCount}, #{report.praiseCost}, #{report.forwardCount}, #{report.forwardCost}, #{report.noInterestCount},
-            #{report.liveStreamCrtClickCnt}, #{report.clickImageCount}, #{report.clickHeadCount},
-            #{report.clickDetailCount}, #{report.clickPoiCount}, #{report.zoneHeaderClickCount},
-            #{report.basicInfoClientCount}, #{report.accountInfoClickCount},
-            #{report.clkAccountLivingStatusPv}, #{report.clkAccountinfoWeappPv},
-            #{report.clkAccountinfoFinderPv}, #{report.clkAccountinfoBizPv},
-            #{report.clkAccountInfoProducttabPv}, #{report.clkAccountInfoProductdetailPv},
-            #{report.activityInfoClickCount},
-            #{report.overallLeadsPurchaseCount}, #{report.effectiveLeadsCount}, #{report.effectiveCost},
-            #{report.effectLeadsPurchaseCount}, #{report.effectLeadsPurchaseCost},
-            #{report.platformPageViewCount}, #{report.platformPageViewRate},
-            #{report.lanButtonClickCount}, #{report.lanJumpButtonClickers}, #{report.lanButtonClickCost},
-            #{report.lanJumpButtonCtr}, #{report.lanJumpButtonClickCost},
-            #{report.keyPageViewCount}, #{report.keyPageViewByDisplayCount}, #{report.keyPageViewByClickCount},
-            #{report.keyPageUv}, #{report.keyPageViewCost}, #{report.keyPageViewRate},
-            #{report.landingCommodityDetailExpPv},
-            #{report.appCommodityPageViewByDisplayCount}, #{report.appCommodityPageViewByClickCount},
-            #{report.viewCommodityPageUv}, #{report.webCommodityPageViewRate}, #{report.webCommodityPageViewCost},
-            #{report.ownPageNavigationCount}, #{report.ownPageNaviCost},
-            #{report.platformPageNavigationCount}, #{report.platformPageNavigationCost},
-            #{report.platformShopNavigationCount}, #{report.platformShopNavigationCost},
-            #{report.activePageViews}, #{report.activePageViewers},
-            #{report.activePageInteractionAmount}, #{report.activePageInteractionUsers},
-            #{report.guideToFollowPageViews}, #{report.guideToFollowPageViewers},
-            #{report.guideToFollowPageInteractionAmount}, #{report.guideToFollowPageInteractionUsers},
-            #{report.platformKeyPageViewUserCount},
-            #{report.pageConsultCount}, #{report.consultUvCount}, #{report.pageConsultRate}, #{report.pageConsultCost},
-            #{report.consultLeaveInfoUsers}, #{report.consultLeaveInfoCost},
-            #{report.potentialConsultCount}, #{report.effectiveConsultCount}, #{report.toolConsultCount},
-            #{report.pageReservationCount}, #{report.pageReservationByDisplayCount}, #{report.pageReservationByClickCount},
-            #{report.reservationUv}, #{report.reservationAmount}, #{report.pageReservationCost}, #{report.pageReservationCostWithPeople},
-            #{report.pageReservationRate}, #{report.pageReservationRoi},
-            #{report.bizReservationUv}, #{report.bizReservationFollowRate},
-            #{report.externalFormReservationCount}, #{report.potentialReserveCount},
-            #{report.reservationCheckUv}, #{report.reservationCheckUvCost}, #{report.reservationCheckUvRate},
-            #{report.effectiveReserveCount}, #{report.validLeadsUv}, #{report.tryOutIntentionUv}, #{report.ineffectiveLeadsUv},
-            #{report.couponGetPv}, #{report.couponGetCost}, #{report.couponGetRate},
-            #{report.platformCouponClickCount}, #{report.purchaseAmountWithCoupon},
-            #{report.couponPurchaseRate}, #{report.purchaseAmountWithCouponCost}, #{report.couponUsageNumber},
-            #{report.pagePhoneCallDirectCount}, #{report.pagePhoneCallDirectRate}, #{report.pagePhoneCallDirectCost},
-            #{report.potentialPhoneCount}, #{report.potentialCustomerPhoneUv},
-            #{report.effectivePhoneCount}, #{report.validPhoneUv},
-            #{report.incomeVal1}, #{report.incomeRoi1}, #{report.incomeVal3}, #{report.incomeRoi3},
-            #{report.incomeVal7}, #{report.incomeRoi7}, #{report.incomeVal14}, #{report.incomeRoi14},
-            #{report.incomeVal24h}, #{report.incomeRoi124h}
-        ) ON DUPLICATE KEY UPDATE
-            group_name = VALUES(group_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),
-            cost = VALUES(cost), acquisition_cost = VALUES(acquisition_cost), thousand_display_price = VALUES(thousand_display_price),
-            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost),
-            deep_conversions_count = VALUES(deep_conversions_count), deep_conversions_rate = VALUES(deep_conversions_rate), deep_conversions_cost = VALUES(deep_conversions_cost),
-            conversions_by_display_count = VALUES(conversions_by_display_count), conversions_by_display_rate = VALUES(conversions_by_display_rate), conversions_by_display_cost = VALUES(conversions_by_display_cost),
-            conversions_by_click_count = VALUES(conversions_by_click_count), conversions_by_click_rate = VALUES(conversions_by_click_rate), conversions_by_click_cost = VALUES(conversions_by_click_cost),
-            preview_conversions_count = VALUES(preview_conversions_count), preview_deep_conversions_count = VALUES(preview_deep_conversions_count),
-            video_outer_play_count = VALUES(video_outer_play_count), video_outer_play_user_count = VALUES(video_outer_play_user_count), avg_user_play_count = VALUES(avg_user_play_count),
-            video_outer_play_time_count = VALUES(video_outer_play_time_count), video_outer_play_time_avg_rate = VALUES(video_outer_play_time_avg_rate),
-            video_outer_play_rate = VALUES(video_outer_play_rate), video_outer_play_cost = VALUES(video_outer_play_cost),
-            video_outer_play10_count = VALUES(video_outer_play10_count), video_outer_play25_count = VALUES(video_outer_play25_count), video_outer_play50_count = VALUES(video_outer_play50_count),
-            video_outer_play75_count = VALUES(video_outer_play75_count), video_outer_play90_count = VALUES(video_outer_play90_count), video_outer_play95_count = VALUES(video_outer_play95_count),
-            video_outer_play100_count = VALUES(video_outer_play100_count), video_outer_play3s_count = VALUES(video_outer_play3s_count), video_outer_play3s_rate = VALUES(video_outer_play3s_rate),
-            video_outer_play5s_count = VALUES(video_outer_play5s_count), video_outer_play7s_count = VALUES(video_outer_play7s_count),
-            read_count = VALUES(read_count), read_cost = VALUES(read_cost), comment_count = VALUES(comment_count), comment_cost = VALUES(comment_cost),
-            praise_count = VALUES(praise_count), praise_cost = VALUES(praise_cost), forward_count = VALUES(forward_count), forward_cost = VALUES(forward_cost), no_interest_count = VALUES(no_interest_count),
-            live_stream_crt_click_cnt = VALUES(live_stream_crt_click_cnt), click_image_count = VALUES(click_image_count), click_head_count = VALUES(click_head_count),
-            click_detail_count = VALUES(click_detail_count), click_poi_count = VALUES(click_poi_count), zone_header_click_count = VALUES(zone_header_click_count),
-            basic_info_client_count = VALUES(basic_info_client_count), account_info_click_count = VALUES(account_info_click_count),
-            clk_account_living_status_pv = VALUES(clk_account_living_status_pv), clk_accountinfo_weapp_pv = VALUES(clk_accountinfo_weapp_pv),
-            clk_accountinfo_finder_pv = VALUES(clk_accountinfo_finder_pv), clk_accountinfo_biz_pv = VALUES(clk_accountinfo_biz_pv),
-            clk_account_info_producttab_pv = VALUES(clk_account_info_producttab_pv), clk_account_info_productdetail_pv = VALUES(clk_account_info_productdetail_pv),
-            activity_info_click_count = VALUES(activity_info_click_count),
-            overall_leads_purchase_count = VALUES(overall_leads_purchase_count), effective_leads_count = VALUES(effective_leads_count), effective_cost = VALUES(effective_cost),
-            effect_leads_purchase_count = VALUES(effect_leads_purchase_count), effect_leads_purchase_cost = VALUES(effect_leads_purchase_cost),
-            platform_page_view_count = VALUES(platform_page_view_count), platform_page_view_rate = VALUES(platform_page_view_rate),
-            lan_button_click_count = VALUES(lan_button_click_count), lan_jump_button_clickers = VALUES(lan_jump_button_clickers), lan_button_click_cost = VALUES(lan_button_click_cost),
-            lan_jump_button_ctr = VALUES(lan_jump_button_ctr), lan_jump_button_click_cost = VALUES(lan_jump_button_click_cost),
-            key_page_view_count = VALUES(key_page_view_count), key_page_view_by_display_count = VALUES(key_page_view_by_display_count), key_page_view_by_click_count = VALUES(key_page_view_by_click_count),
-            key_page_uv = VALUES(key_page_uv), key_page_view_cost = VALUES(key_page_view_cost), key_page_view_rate = VALUES(key_page_view_rate),
-            landing_commodity_detail_exp_pv = VALUES(landing_commodity_detail_exp_pv),
-            app_commodity_page_view_by_display_count = VALUES(app_commodity_page_view_by_display_count), app_commodity_page_view_by_click_count = VALUES(app_commodity_page_view_by_click_count),
-            view_commodity_page_uv = VALUES(view_commodity_page_uv), web_commodity_page_view_rate = VALUES(web_commodity_page_view_rate), web_commodity_page_view_cost = VALUES(web_commodity_page_view_cost),
-            own_page_navigation_count = VALUES(own_page_navigation_count), own_page_navi_cost = VALUES(own_page_navi_cost),
-            platform_page_navigation_count = VALUES(platform_page_navigation_count), platform_page_navigation_cost = VALUES(platform_page_navigation_cost),
-            platform_shop_navigation_count = VALUES(platform_shop_navigation_count), platform_shop_navigation_cost = VALUES(platform_shop_navigation_cost),
-            active_page_views = VALUES(active_page_views), active_page_viewers = VALUES(active_page_viewers),
-            active_page_interaction_amount = VALUES(active_page_interaction_amount), active_page_interaction_users = VALUES(active_page_interaction_users),
-            guide_to_follow_page_views = VALUES(guide_to_follow_page_views), guide_to_follow_page_viewers = VALUES(guide_to_follow_page_viewers),
-            guide_to_follow_page_interaction_amount = VALUES(guide_to_follow_page_interaction_amount), guide_to_follow_page_interaction_users = VALUES(guide_to_follow_page_interaction_users),
-            platform_key_page_view_user_count = VALUES(platform_key_page_view_user_count),
-            page_consult_count = VALUES(page_consult_count), consult_uv_count = VALUES(consult_uv_count), page_consult_rate = VALUES(page_consult_rate), page_consult_cost = VALUES(page_consult_cost),
-            consult_leave_info_users = VALUES(consult_leave_info_users), consult_leave_info_cost = VALUES(consult_leave_info_cost),
-            potential_consult_count = VALUES(potential_consult_count), effective_consult_count = VALUES(effective_consult_count), tool_consult_count = VALUES(tool_consult_count),
-            page_reservation_count = VALUES(page_reservation_count), page_reservation_by_display_count = VALUES(page_reservation_by_display_count), page_reservation_by_click_count = VALUES(page_reservation_by_click_count),
-            reservation_uv = VALUES(reservation_uv), reservation_amount = VALUES(reservation_amount), page_reservation_cost = VALUES(page_reservation_cost), page_reservation_cost_with_people = VALUES(page_reservation_cost_with_people),
-            page_reservation_rate = VALUES(page_reservation_rate), page_reservation_roi = VALUES(page_reservation_roi),
-            biz_reservation_uv = VALUES(biz_reservation_uv), biz_reservation_follow_rate = VALUES(biz_reservation_follow_rate),
-            external_form_reservation_count = VALUES(external_form_reservation_count), potential_reserve_count = VALUES(potential_reserve_count),
-            reservation_check_uv = VALUES(reservation_check_uv), reservation_check_uv_cost = VALUES(reservation_check_uv_cost), reservation_check_uv_rate = VALUES(reservation_check_uv_rate),
-            effective_reserve_count = VALUES(effective_reserve_count), valid_leads_uv = VALUES(valid_leads_uv), try_out_intention_uv = VALUES(try_out_intention_uv), ineffective_leads_uv = VALUES(ineffective_leads_uv),
-            coupon_get_pv = VALUES(coupon_get_pv), coupon_get_cost = VALUES(coupon_get_cost), coupon_get_rate = VALUES(coupon_get_rate),
-            platform_coupon_click_count = VALUES(platform_coupon_click_count), purchase_amount_with_coupon = VALUES(purchase_amount_with_coupon),
-            coupon_purchase_rate = VALUES(coupon_purchase_rate), purchase_amount_with_coupon_cost = VALUES(purchase_amount_with_coupon_cost), coupon_usage_number = VALUES(coupon_usage_number),
-            page_phone_call_direct_count = VALUES(page_phone_call_direct_count), page_phone_call_direct_rate = VALUES(page_phone_call_direct_rate), page_phone_call_direct_cost = VALUES(page_phone_call_direct_cost),
-            potential_phone_count = VALUES(potential_phone_count), potential_customer_phone_uv = VALUES(potential_customer_phone_uv),
-            effective_phone_count = VALUES(effective_phone_count), valid_phone_uv = VALUES(valid_phone_uv),
-            income_val_1 = VALUES(income_val_1), income_roi_1 = VALUES(income_roi_1), income_val_3 = VALUES(income_val_3), income_roi_3 = VALUES(income_roi_3),
-            income_val_7 = VALUES(income_val_7), income_roi_7 = VALUES(income_roi_7), income_val_14 = VALUES(income_val_14), income_roi_14 = VALUES(income_roi_14),
-            income_val_24h = VALUES(income_val_24h), income_roi_1_24h = VALUES(income_roi_1_24h)
-    </insert>
-
     <insert id="batchUpsert" parameterType="java.util.List">
         INSERT INTO req_daily_adgroup_report (
             conf_id, group_id, group_name, account_id, adgroup_id, adgroup_name, date,
@@ -203,7 +8,7 @@
             valid_click_count, click_user_count, cpc, ctr,
             valuable_click_count, valuable_click_cost, valuable_click_rate,
             cost, acquisition_cost, thousand_display_price,
-            conversions_count, conversions_rate, conversions_cost,
+            conversions_count, conversions_rate, conversions_cost, scan_follow_user_cost,
             deep_conversions_count, deep_conversions_rate, deep_conversions_cost,
             conversions_by_display_count, conversions_by_display_rate, conversions_by_display_cost,
             conversions_by_click_count, conversions_by_click_rate, conversions_by_click_cost,
@@ -269,7 +74,7 @@
                 #{report.validClickCount}, #{report.clickUserCount}, #{report.cpc}, #{report.ctr},
                 #{report.valuableClickCount}, #{report.valuableClickCost}, #{report.valuableClickRate},
                 #{report.cost}, #{report.acquisitionCost}, #{report.thousandDisplayPrice},
-                #{report.conversionsCount}, #{report.conversionsRate}, #{report.conversionsCost},
+                #{report.conversionsCount}, #{report.conversionsRate}, #{report.conversionsCost}, #{report.scanFollowUserCost},
                 #{report.deepConversionsCount}, #{report.deepConversionsRate}, #{report.deepConversionsCost},
                 #{report.conversionsByDisplayCount}, #{report.conversionsByDisplayRate}, #{report.conversionsByDisplayCost},
                 #{report.conversionsByClickCount}, #{report.conversionsByClickRate}, #{report.conversionsByClickCost},
@@ -330,12 +135,11 @@
             )
         </foreach>
         ON DUPLICATE KEY UPDATE
-            group_name = VALUES(group_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),
             cost = VALUES(cost), acquisition_cost = VALUES(acquisition_cost), thousand_display_price = VALUES(thousand_display_price),
-            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost),
+            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost), scan_follow_user_cost = VALUES(scan_follow_user_cost),
             deep_conversions_count = VALUES(deep_conversions_count), deep_conversions_rate = VALUES(deep_conversions_rate), deep_conversions_cost = VALUES(deep_conversions_cost),
             conversions_by_display_count = VALUES(conversions_by_display_count), conversions_by_display_rate = VALUES(conversions_by_display_rate), conversions_by_display_cost = VALUES(conversions_by_display_cost),
             conversions_by_click_count = VALUES(conversions_by_click_count), conversions_by_click_rate = VALUES(conversions_by_click_rate), conversions_by_click_cost = VALUES(conversions_by_click_cost),

+ 3 - 200
src/main/resources/mapper/ReqDailyCreativeReportMapper.xml

@@ -2,202 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.moka.gdtauto.mapper.ReqDailyCreativeReportMapper">
 
-    <!-- 插入或更新(REQUEST_TIME 口径)唯一键: group_id + account_id + dynamic_creative_id + date -->
-    <insert id="upsert" parameterType="com.moka.gdtauto.entity.ReqDailyCreativeReport">
-        INSERT INTO req_daily_creative_report (
-            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,
-            cost, acquisition_cost, thousand_display_price,
-            conversions_count, conversions_rate, conversions_cost,
-            deep_conversions_count, deep_conversions_rate, deep_conversions_cost,
-            conversions_by_display_count, conversions_by_display_rate, conversions_by_display_cost,
-            conversions_by_click_count, conversions_by_click_rate, conversions_by_click_cost,
-            preview_conversions_count, preview_deep_conversions_count,
-            video_outer_play_count, video_outer_play_user_count, avg_user_play_count,
-            video_outer_play_time_count, video_outer_play_time_avg_rate,
-            video_outer_play_rate, video_outer_play_cost,
-            video_outer_play10_count, video_outer_play25_count, video_outer_play50_count,
-            video_outer_play75_count, video_outer_play90_count, video_outer_play95_count,
-            video_outer_play100_count, video_outer_play3s_count, video_outer_play3s_rate,
-            video_outer_play5s_count, video_outer_play7s_count,
-            read_count, read_cost, comment_count, comment_cost,
-            praise_count, praise_cost, forward_count, forward_cost, no_interest_count,
-            live_stream_crt_click_cnt, click_image_count, click_head_count,
-            click_detail_count, click_poi_count, zone_header_click_count,
-            basic_info_client_count, account_info_click_count,
-            clk_account_living_status_pv, clk_accountinfo_weapp_pv,
-            clk_accountinfo_finder_pv, clk_accountinfo_biz_pv,
-            clk_account_info_producttab_pv, clk_account_info_productdetail_pv,
-            activity_info_click_count,
-            overall_leads_purchase_count, effective_leads_count, effective_cost,
-            effect_leads_purchase_count, effect_leads_purchase_cost,
-            platform_page_view_count, platform_page_view_rate,
-            lan_button_click_count, lan_jump_button_clickers, lan_button_click_cost,
-            lan_jump_button_ctr, lan_jump_button_click_cost,
-            key_page_view_count, key_page_view_by_display_count, key_page_view_by_click_count,
-            key_page_uv, key_page_view_cost, key_page_view_rate,
-            landing_commodity_detail_exp_pv,
-            app_commodity_page_view_by_display_count, app_commodity_page_view_by_click_count,
-            view_commodity_page_uv, web_commodity_page_view_rate, web_commodity_page_view_cost,
-            own_page_navigation_count, own_page_navi_cost,
-            platform_page_navigation_count, platform_page_navigation_cost,
-            platform_shop_navigation_count, platform_shop_navigation_cost,
-            active_page_views, active_page_viewers,
-            active_page_interaction_amount, active_page_interaction_users,
-            guide_to_follow_page_views, guide_to_follow_page_viewers,
-            guide_to_follow_page_interaction_amount, guide_to_follow_page_interaction_users,
-            platform_key_page_view_user_count,
-            page_consult_count, consult_uv_count, page_consult_rate, page_consult_cost,
-            consult_leave_info_users, consult_leave_info_cost,
-            potential_consult_count, effective_consult_count, tool_consult_count,
-            page_reservation_count, page_reservation_by_display_count, page_reservation_by_click_count,
-            reservation_uv, reservation_amount, page_reservation_cost, page_reservation_cost_with_people,
-            page_reservation_rate, page_reservation_roi,
-            biz_reservation_uv, biz_reservation_follow_rate,
-            external_form_reservation_count, potential_reserve_count,
-            reservation_check_uv, reservation_check_uv_cost, reservation_check_uv_rate,
-            effective_reserve_count, valid_leads_uv, try_out_intention_uv, ineffective_leads_uv,
-            coupon_get_pv, coupon_get_cost, coupon_get_rate,
-            platform_coupon_click_count, purchase_amount_with_coupon,
-            coupon_purchase_rate, purchase_amount_with_coupon_cost, coupon_usage_number,
-            page_phone_call_direct_count, page_phone_call_direct_rate, page_phone_call_direct_cost,
-            potential_phone_count, potential_customer_phone_uv,
-            effective_phone_count, valid_phone_uv,
-            income_val_1, income_roi_1, income_val_3, income_roi_3,
-            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.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},
-            #{report.cost}, #{report.acquisitionCost}, #{report.thousandDisplayPrice},
-            #{report.conversionsCount}, #{report.conversionsRate}, #{report.conversionsCost},
-            #{report.deepConversionsCount}, #{report.deepConversionsRate}, #{report.deepConversionsCost},
-            #{report.conversionsByDisplayCount}, #{report.conversionsByDisplayRate}, #{report.conversionsByDisplayCost},
-            #{report.conversionsByClickCount}, #{report.conversionsByClickRate}, #{report.conversionsByClickCost},
-            #{report.previewConversionsCount}, #{report.previewDeepConversionsCount},
-            #{report.videoOuterPlayCount}, #{report.videoOuterPlayUserCount}, #{report.avgUserPlayCount},
-            #{report.videoOuterPlayTimeCount}, #{report.videoOuterPlayTimeAvgRate},
-            #{report.videoOuterPlayRate}, #{report.videoOuterPlayCost},
-            #{report.videoOuterPlay10Count}, #{report.videoOuterPlay25Count}, #{report.videoOuterPlay50Count},
-            #{report.videoOuterPlay75Count}, #{report.videoOuterPlay90Count}, #{report.videoOuterPlay95Count},
-            #{report.videoOuterPlay100Count}, #{report.videoOuterPlay3sCount}, #{report.videoOuterPlay3sRate},
-            #{report.videoOuterPlay5sCount}, #{report.videoOuterPlay7sCount},
-            #{report.readCount}, #{report.readCost}, #{report.commentCount}, #{report.commentCost},
-            #{report.praiseCount}, #{report.praiseCost}, #{report.forwardCount}, #{report.forwardCost}, #{report.noInterestCount},
-            #{report.liveStreamCrtClickCnt}, #{report.clickImageCount}, #{report.clickHeadCount},
-            #{report.clickDetailCount}, #{report.clickPoiCount}, #{report.zoneHeaderClickCount},
-            #{report.basicInfoClientCount}, #{report.accountInfoClickCount},
-            #{report.clkAccountLivingStatusPv}, #{report.clkAccountinfoWeappPv},
-            #{report.clkAccountinfoFinderPv}, #{report.clkAccountinfoBizPv},
-            #{report.clkAccountInfoProducttabPv}, #{report.clkAccountInfoProductdetailPv},
-            #{report.activityInfoClickCount},
-            #{report.overallLeadsPurchaseCount}, #{report.effectiveLeadsCount}, #{report.effectiveCost},
-            #{report.effectLeadsPurchaseCount}, #{report.effectLeadsPurchaseCost},
-            #{report.platformPageViewCount}, #{report.platformPageViewRate},
-            #{report.lanButtonClickCount}, #{report.lanJumpButtonClickers}, #{report.lanButtonClickCost},
-            #{report.lanJumpButtonCtr}, #{report.lanJumpButtonClickCost},
-            #{report.keyPageViewCount}, #{report.keyPageViewByDisplayCount}, #{report.keyPageViewByClickCount},
-            #{report.keyPageUv}, #{report.keyPageViewCost}, #{report.keyPageViewRate},
-            #{report.landingCommodityDetailExpPv},
-            #{report.appCommodityPageViewByDisplayCount}, #{report.appCommodityPageViewByClickCount},
-            #{report.viewCommodityPageUv}, #{report.webCommodityPageViewRate}, #{report.webCommodityPageViewCost},
-            #{report.ownPageNavigationCount}, #{report.ownPageNaviCost},
-            #{report.platformPageNavigationCount}, #{report.platformPageNavigationCost},
-            #{report.platformShopNavigationCount}, #{report.platformShopNavigationCost},
-            #{report.activePageViews}, #{report.activePageViewers},
-            #{report.activePageInteractionAmount}, #{report.activePageInteractionUsers},
-            #{report.guideToFollowPageViews}, #{report.guideToFollowPageViewers},
-            #{report.guideToFollowPageInteractionAmount}, #{report.guideToFollowPageInteractionUsers},
-            #{report.platformKeyPageViewUserCount},
-            #{report.pageConsultCount}, #{report.consultUvCount}, #{report.pageConsultRate}, #{report.pageConsultCost},
-            #{report.consultLeaveInfoUsers}, #{report.consultLeaveInfoCost},
-            #{report.potentialConsultCount}, #{report.effectiveConsultCount}, #{report.toolConsultCount},
-            #{report.pageReservationCount}, #{report.pageReservationByDisplayCount}, #{report.pageReservationByClickCount},
-            #{report.reservationUv}, #{report.reservationAmount}, #{report.pageReservationCost}, #{report.pageReservationCostWithPeople},
-            #{report.pageReservationRate}, #{report.pageReservationRoi},
-            #{report.bizReservationUv}, #{report.bizReservationFollowRate},
-            #{report.externalFormReservationCount}, #{report.potentialReserveCount},
-            #{report.reservationCheckUv}, #{report.reservationCheckUvCost}, #{report.reservationCheckUvRate},
-            #{report.effectiveReserveCount}, #{report.validLeadsUv}, #{report.tryOutIntentionUv}, #{report.ineffectiveLeadsUv},
-            #{report.couponGetPv}, #{report.couponGetCost}, #{report.couponGetRate},
-            #{report.platformCouponClickCount}, #{report.purchaseAmountWithCoupon},
-            #{report.couponPurchaseRate}, #{report.purchaseAmountWithCouponCost}, #{report.couponUsageNumber},
-            #{report.pagePhoneCallDirectCount}, #{report.pagePhoneCallDirectRate}, #{report.pagePhoneCallDirectCost},
-            #{report.potentialPhoneCount}, #{report.potentialCustomerPhoneUv},
-            #{report.effectivePhoneCount}, #{report.validPhoneUv},
-            #{report.incomeVal1}, #{report.incomeRoi1}, #{report.incomeVal3}, #{report.incomeRoi3},
-            #{report.incomeVal7}, #{report.incomeRoi7}, #{report.incomeVal14}, #{report.incomeRoi14},
-            #{report.incomeVal24h}, #{report.incomeRoi124h}
-        ) ON DUPLICATE KEY UPDATE
-            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),
-            cost = VALUES(cost), acquisition_cost = VALUES(acquisition_cost), thousand_display_price = VALUES(thousand_display_price),
-            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost),
-            deep_conversions_count = VALUES(deep_conversions_count), deep_conversions_rate = VALUES(deep_conversions_rate), deep_conversions_cost = VALUES(deep_conversions_cost),
-            conversions_by_display_count = VALUES(conversions_by_display_count), conversions_by_display_rate = VALUES(conversions_by_display_rate), conversions_by_display_cost = VALUES(conversions_by_display_cost),
-            conversions_by_click_count = VALUES(conversions_by_click_count), conversions_by_click_rate = VALUES(conversions_by_click_rate), conversions_by_click_cost = VALUES(conversions_by_click_cost),
-            preview_conversions_count = VALUES(preview_conversions_count), preview_deep_conversions_count = VALUES(preview_deep_conversions_count),
-            video_outer_play_count = VALUES(video_outer_play_count), video_outer_play_user_count = VALUES(video_outer_play_user_count), avg_user_play_count = VALUES(avg_user_play_count),
-            video_outer_play_time_count = VALUES(video_outer_play_time_count), video_outer_play_time_avg_rate = VALUES(video_outer_play_time_avg_rate),
-            video_outer_play_rate = VALUES(video_outer_play_rate), video_outer_play_cost = VALUES(video_outer_play_cost),
-            video_outer_play10_count = VALUES(video_outer_play10_count), video_outer_play25_count = VALUES(video_outer_play25_count), video_outer_play50_count = VALUES(video_outer_play50_count),
-            video_outer_play75_count = VALUES(video_outer_play75_count), video_outer_play90_count = VALUES(video_outer_play90_count), video_outer_play95_count = VALUES(video_outer_play95_count),
-            video_outer_play100_count = VALUES(video_outer_play100_count), video_outer_play3s_count = VALUES(video_outer_play3s_count), video_outer_play3s_rate = VALUES(video_outer_play3s_rate),
-            video_outer_play5s_count = VALUES(video_outer_play5s_count), video_outer_play7s_count = VALUES(video_outer_play7s_count),
-            read_count = VALUES(read_count), read_cost = VALUES(read_cost), comment_count = VALUES(comment_count), comment_cost = VALUES(comment_cost),
-            praise_count = VALUES(praise_count), praise_cost = VALUES(praise_cost), forward_count = VALUES(forward_count), forward_cost = VALUES(forward_cost), no_interest_count = VALUES(no_interest_count),
-            live_stream_crt_click_cnt = VALUES(live_stream_crt_click_cnt), click_image_count = VALUES(click_image_count), click_head_count = VALUES(click_head_count),
-            click_detail_count = VALUES(click_detail_count), click_poi_count = VALUES(click_poi_count), zone_header_click_count = VALUES(zone_header_click_count),
-            basic_info_client_count = VALUES(basic_info_client_count), account_info_click_count = VALUES(account_info_click_count),
-            clk_account_living_status_pv = VALUES(clk_account_living_status_pv), clk_accountinfo_weapp_pv = VALUES(clk_accountinfo_weapp_pv),
-            clk_accountinfo_finder_pv = VALUES(clk_accountinfo_finder_pv), clk_accountinfo_biz_pv = VALUES(clk_accountinfo_biz_pv),
-            clk_account_info_producttab_pv = VALUES(clk_account_info_producttab_pv), clk_account_info_productdetail_pv = VALUES(clk_account_info_productdetail_pv),
-            activity_info_click_count = VALUES(activity_info_click_count),
-            overall_leads_purchase_count = VALUES(overall_leads_purchase_count), effective_leads_count = VALUES(effective_leads_count), effective_cost = VALUES(effective_cost),
-            effect_leads_purchase_count = VALUES(effect_leads_purchase_count), effect_leads_purchase_cost = VALUES(effect_leads_purchase_cost),
-            platform_page_view_count = VALUES(platform_page_view_count), platform_page_view_rate = VALUES(platform_page_view_rate),
-            lan_button_click_count = VALUES(lan_button_click_count), lan_jump_button_clickers = VALUES(lan_jump_button_clickers), lan_button_click_cost = VALUES(lan_button_click_cost),
-            lan_jump_button_ctr = VALUES(lan_jump_button_ctr), lan_jump_button_click_cost = VALUES(lan_jump_button_click_cost),
-            key_page_view_count = VALUES(key_page_view_count), key_page_view_by_display_count = VALUES(key_page_view_by_display_count), key_page_view_by_click_count = VALUES(key_page_view_by_click_count),
-            key_page_uv = VALUES(key_page_uv), key_page_view_cost = VALUES(key_page_view_cost), key_page_view_rate = VALUES(key_page_view_rate),
-            landing_commodity_detail_exp_pv = VALUES(landing_commodity_detail_exp_pv),
-            app_commodity_page_view_by_display_count = VALUES(app_commodity_page_view_by_display_count), app_commodity_page_view_by_click_count = VALUES(app_commodity_page_view_by_click_count),
-            view_commodity_page_uv = VALUES(view_commodity_page_uv), web_commodity_page_view_rate = VALUES(web_commodity_page_view_rate), web_commodity_page_view_cost = VALUES(web_commodity_page_view_cost),
-            own_page_navigation_count = VALUES(own_page_navigation_count), own_page_navi_cost = VALUES(own_page_navi_cost),
-            platform_page_navigation_count = VALUES(platform_page_navigation_count), platform_page_navigation_cost = VALUES(platform_page_navigation_cost),
-            platform_shop_navigation_count = VALUES(platform_shop_navigation_count), platform_shop_navigation_cost = VALUES(platform_shop_navigation_cost),
-            active_page_views = VALUES(active_page_views), active_page_viewers = VALUES(active_page_viewers),
-            active_page_interaction_amount = VALUES(active_page_interaction_amount), active_page_interaction_users = VALUES(active_page_interaction_users),
-            guide_to_follow_page_views = VALUES(guide_to_follow_page_views), guide_to_follow_page_viewers = VALUES(guide_to_follow_page_viewers),
-            guide_to_follow_page_interaction_amount = VALUES(guide_to_follow_page_interaction_amount), guide_to_follow_page_interaction_users = VALUES(guide_to_follow_page_interaction_users),
-            platform_key_page_view_user_count = VALUES(platform_key_page_view_user_count),
-            page_consult_count = VALUES(page_consult_count), consult_uv_count = VALUES(consult_uv_count), page_consult_rate = VALUES(page_consult_rate), page_consult_cost = VALUES(page_consult_cost),
-            consult_leave_info_users = VALUES(consult_leave_info_users), consult_leave_info_cost = VALUES(consult_leave_info_cost),
-            potential_consult_count = VALUES(potential_consult_count), effective_consult_count = VALUES(effective_consult_count), tool_consult_count = VALUES(tool_consult_count),
-            page_reservation_count = VALUES(page_reservation_count), page_reservation_by_display_count = VALUES(page_reservation_by_display_count), page_reservation_by_click_count = VALUES(page_reservation_by_click_count),
-            reservation_uv = VALUES(reservation_uv), reservation_amount = VALUES(reservation_amount), page_reservation_cost = VALUES(page_reservation_cost), page_reservation_cost_with_people = VALUES(page_reservation_cost_with_people),
-            page_reservation_rate = VALUES(page_reservation_rate), page_reservation_roi = VALUES(page_reservation_roi),
-            biz_reservation_uv = VALUES(biz_reservation_uv), biz_reservation_follow_rate = VALUES(biz_reservation_follow_rate),
-            external_form_reservation_count = VALUES(external_form_reservation_count), potential_reserve_count = VALUES(potential_reserve_count),
-            reservation_check_uv = VALUES(reservation_check_uv), reservation_check_uv_cost = VALUES(reservation_check_uv_cost), reservation_check_uv_rate = VALUES(reservation_check_uv_rate),
-            effective_reserve_count = VALUES(effective_reserve_count), valid_leads_uv = VALUES(valid_leads_uv), try_out_intention_uv = VALUES(try_out_intention_uv), ineffective_leads_uv = VALUES(ineffective_leads_uv),
-            coupon_get_pv = VALUES(coupon_get_pv), coupon_get_cost = VALUES(coupon_get_cost), coupon_get_rate = VALUES(coupon_get_rate),
-            platform_coupon_click_count = VALUES(platform_coupon_click_count), purchase_amount_with_coupon = VALUES(purchase_amount_with_coupon),
-            coupon_purchase_rate = VALUES(coupon_purchase_rate), purchase_amount_with_coupon_cost = VALUES(purchase_amount_with_coupon_cost), coupon_usage_number = VALUES(coupon_usage_number),
-            page_phone_call_direct_count = VALUES(page_phone_call_direct_count), page_phone_call_direct_rate = VALUES(page_phone_call_direct_rate), page_phone_call_direct_cost = VALUES(page_phone_call_direct_cost),
-            potential_phone_count = VALUES(potential_phone_count), potential_customer_phone_uv = VALUES(potential_customer_phone_uv),
-            effective_phone_count = VALUES(effective_phone_count), valid_phone_uv = VALUES(valid_phone_uv),
-            income_val_1 = VALUES(income_val_1), income_roi_1 = VALUES(income_roi_1), income_val_3 = VALUES(income_val_3), income_roi_3 = VALUES(income_roi_3),
-            income_val_7 = VALUES(income_val_7), income_roi_7 = VALUES(income_roi_7), income_val_14 = VALUES(income_val_14), income_roi_14 = VALUES(income_roi_14),
-            income_val_24h = VALUES(income_val_24h), income_roi_1_24h = VALUES(income_roi_1_24h)
-    </insert>
-
     <!-- 批量插入或更新(REQUEST_TIME 口径)-->
     <insert id="batchUpsert" parameterType="java.util.List">
         INSERT INTO req_daily_creative_report (
@@ -206,7 +10,7 @@
             valid_click_count, click_user_count, cpc, ctr,
             valuable_click_count, valuable_click_cost, valuable_click_rate,
             cost, acquisition_cost, thousand_display_price,
-            conversions_count, conversions_rate, conversions_cost,
+            conversions_count, conversions_rate, conversions_cost, scan_follow_user_cost,
             deep_conversions_count, deep_conversions_rate, deep_conversions_cost,
             conversions_by_display_count, conversions_by_display_rate, conversions_by_display_cost,
             conversions_by_click_count, conversions_by_click_rate, conversions_by_click_cost,
@@ -272,7 +76,7 @@
                 #{item.validClickCount}, #{item.clickUserCount}, #{item.cpc}, #{item.ctr},
                 #{item.valuableClickCount}, #{item.valuableClickCost}, #{item.valuableClickRate},
                 #{item.cost}, #{item.acquisitionCost}, #{item.thousandDisplayPrice},
-                #{item.conversionsCount}, #{item.conversionsRate}, #{item.conversionsCost},
+                #{item.conversionsCount}, #{item.conversionsRate}, #{item.conversionsCost}, #{item.scanFollowUserCost},
                 #{item.deepConversionsCount}, #{item.deepConversionsRate}, #{item.deepConversionsCost},
                 #{item.conversionsByDisplayCount}, #{item.conversionsByDisplayRate}, #{item.conversionsByDisplayCost},
                 #{item.conversionsByClickCount}, #{item.conversionsByClickRate}, #{item.conversionsByClickCost},
@@ -333,12 +137,11 @@
             )
         </foreach>
         ON DUPLICATE KEY UPDATE
-            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),
             cost = VALUES(cost), acquisition_cost = VALUES(acquisition_cost), thousand_display_price = VALUES(thousand_display_price),
-            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost),
+            conversions_count = VALUES(conversions_count), conversions_rate = VALUES(conversions_rate), conversions_cost = VALUES(conversions_cost), scan_follow_user_cost = VALUES(scan_follow_user_cost),
             deep_conversions_count = VALUES(deep_conversions_count), deep_conversions_rate = VALUES(deep_conversions_rate), deep_conversions_cost = VALUES(deep_conversions_cost),
             conversions_by_display_count = VALUES(conversions_by_display_count), conversions_by_display_rate = VALUES(conversions_by_display_rate), conversions_by_display_cost = VALUES(conversions_by_display_cost),
             conversions_by_click_count = VALUES(conversions_by_click_count), conversions_by_click_rate = VALUES(conversions_by_click_rate), conversions_by_click_cost = VALUES(conversions_by_click_cost),

+ 9 - 26
src/test/java/com/moka/gdtauto/service/AdPlanDailyReportSyncTest.java

@@ -1,7 +1,6 @@
 package com.moka.gdtauto.service;
 
 import java.time.LocalDate;
-import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 
 import org.junit.jupiter.api.Test;
@@ -26,40 +25,25 @@ public class AdPlanDailyReportSyncTest {
     @Autowired
     private AdPlanDailyReportSyncTask adPlanDailyReportSyncTask;
     @Autowired
-    private AdPlanDailyReportService adPlanDailyReportService;
-    @Autowired
     private DailyCreativeReportService dailyCreativeReportService;
     @Autowired
     private DailyAdgroupReportService dailyAdgroupReportService;
 
     @Test
-    public void testSyncReqDailyReport() {
-        LocalDateTime now = LocalDateTime.now();
-        adPlanDailyReportService.syncReqDailyReport(29L, now, now);
-    }
-
-    @Test
-    public void testSyncRepDailyReport() {
-        LocalDateTime now = LocalDateTime.now();
-        adPlanDailyReportService.syncRepDailyReport(29L, now, now);
-    }
-
-
-    @Test
     public void testSyncDailyCreativeReport() {
         DateTimeFormatter FMT = DateTimeFormatter.ofPattern("yyyy-MM-dd");
         String today = LocalDate.now().format(FMT);
         dailyCreativeReportService.syncAllAccounts(62L, today, today, TimeLine.REQUEST_TIME.getValue());
     }
 
+    // mvn test -Dtest=AdPlanDailyReportSyncTest#testSyncTenDaysDailyCreativeReport -Dspring.profiles.active=test
     @Test
     public void testSyncTenDaysDailyCreativeReport() {
         DateTimeFormatter FMT = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-        for (int i = 0; i < 3; i++) {
-            String day = LocalDate.now().plusDays(-i).format(FMT);
-            dailyCreativeReportService.syncAllAccounts(null, day, day, TimeLine.REQUEST_TIME.getValue());
-            dailyCreativeReportService.syncAllAccounts(null, day, day, TimeLine.REPORTING_TIME.getValue());
-        }
+            String start = LocalDate.now().plusDays(-1).format(FMT);
+            String end = LocalDate.now().format(FMT);
+            dailyCreativeReportService.syncAllAccounts(null, start, end, TimeLine.REQUEST_TIME.getValue());
+            dailyCreativeReportService.syncAllAccounts(null, start, end, TimeLine.REPORTING_TIME.getValue());
     }
 
     @Test
@@ -73,10 +57,9 @@ public class AdPlanDailyReportSyncTest {
     @Test
     public void testSyncTenDaysDailyAdgroupReport() {
         DateTimeFormatter FMT = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-        for (int i = 0; i < 10; i++) {
-            String day = LocalDate.now().plusDays(-i).format(FMT);
-            dailyAdgroupReportService.syncAllAccounts(null, day, day, TimeLine.REQUEST_TIME.getValue());
-            dailyAdgroupReportService.syncAllAccounts(null, day, day, TimeLine.REPORTING_TIME.getValue());
-        }
+            String start = LocalDate.now().plusDays(-1).format(FMT);
+            String day = LocalDate.now().format(FMT);
+            dailyAdgroupReportService.syncAllAccounts(null, start, day, TimeLine.REQUEST_TIME.getValue());
+            dailyAdgroupReportService.syncAllAccounts(null, start, day, TimeLine.REPORTING_TIME.getValue());
     }
 }

部分文件因文件數量過多而無法顯示