Explorar o código

修改sql查询逻辑bug

songyh %!s(int64=3) %!d(string=hai) anos
pai
achega
3124a74c91

+ 48 - 51
jeecg-boot-report/src/main/java/cn/com/ctop/common/constant/AccountReportConstants.java

@@ -174,23 +174,23 @@ public class AccountReportConstants {
             "    \"comment\": \"行为数\"\n" +
             "  },\n" +
             "  \"clickRate\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(show) != 0    THEN CONCAT( CAST(ROUND((sum(photo_click) / sum(show)) * 100,2) AS CHAR) ,'%') else 0 END AS clickRate \",\n" +
+            "    \"filed\": \"CASE WHEN sum(show) != 0  THEN ROUND(sum(photo_click)/sum(show)*100,2)  else 0 END AS clickRate \",\n" +
             "    \"comment\": \"封面点击率\"\n" +
             "  },\n" +
             "  \"bClickRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(aclick) != 0 THEN CONCAT( CAST(ROUND((sum(bclick) / sum(aclick)) * 100,2) AS CHAR) ,'%') ELSE '0%' END AS bClickRate \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(aclick) != 0 THEN ROUND(sum(bclick)/sum(aclick) * 100,2) ELSE 0 END AS bClickRate \",\n" +
             "    \"comment\": \"行为率\"\n" +
             "  },\n" +
             "  \"cpm\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(show) IS NULL THEN 0 ELSE ROUND((sum(charge) / sum(show)) * 1000, 2 ) END AS cpm \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge)/sum(show) IS NULL THEN 0 ELSE ROUND(sum(charge)/sum(show)*1000, 3 ) END AS cpm \",\n" +
             "    \"comment\": \"平均千次封面曝光花费\"\n" +
             "  },\n" +
             "  \"cpc\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(photo_click) IS NULL THEN 0 ELSE ROUND((sum(charge) / sum(photo_click)), 2) END AS cpc \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge)/sum(photo_click) IS NULL THEN 0 ELSE ROUND((sum(charge) / sum(photo_click)), 3) END AS cpc \",\n" +
             "    \"comment\": \"平均封面点击单价\"\n" +
             "  },\n" +
             "  \"cpb\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(bclick) IS NULL THEN 0 ELSE ROUND((sum(charge) / sum(bclick)), 2) END AS cpb \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / sum(bclick) IS NULL THEN 0 ELSE ROUND((sum(charge) / sum(bclick)), 3) END AS cpb \",\n" +
             "    \"comment\": \"平均行为单价\"\n" +
             "  },\n" +
             "  \"downloadStart\": {\n" +
@@ -198,11 +198,11 @@ public class AccountReportConstants {
             "    \"comment\": \"安卓开始下载数\"\n" +
             "  },\n" +
             "  \"downloadStartCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / (download_started) IS NULL THEN 0 ELSE sum(charge) / sum(download_started) end AS downloadStartCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / (download_started) IS NULL THEN 0 ELSE round(sum(charge)/sum(download_started),3) end AS downloadStartCost \",\n" +
             "    \"comment\": \"安卓开始下载单价\"\n" +
             "  },\n" +
             "  \"downloadStartRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(bclick) != 0 THEN concat(CAST(round(sum(download_started) / sum(bclick)*100,2) AS CHAR) ,'%') else '0%' end AS downloadStartRate\",\n" +
+            "    \"filed\": \"CASE WHEN  sum(bclick) != 0 THEN round(sum(download_started)/sum(bclick)*100,2) else 0 end AS downloadStartRate\",\n" +
             "    \"comment\": \"安卓开始下载率\"\n" +
             "  },\n" +
             "  \"downloadFinish\": {\n" +
@@ -210,11 +210,11 @@ public class AccountReportConstants {
             "    \"comment\": \"安卓下载完成数\"\n" +
             "  },\n" +
             "  \"downloadFinishCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(download_completed) IS NULL THEN 0 ELSE  sum(charge) / sum(download_completed) end AS downloadFinishCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / sum(download_completed) IS NULL THEN 0 ELSE  round(sum(charge)/sum(download_completed),3) end AS downloadFinishCost \",\n" +
             "    \"comment\": \"安卓下载完成单价\"\n" +
             "  },\n" +
             "  \"downloadFinishRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(download_started) != 0 then  concat(CAST(round(sum(download_completed) / sum(download_started)*100,2) AS CHAR) ,'%') else '0%' end AS downloadFinishRate  \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(download_started) != 0 then  round(sum(download_completed)/sum(download_started)*100,2) else 0 end AS downloadFinishRate  \",\n" +
             "    \"comment\": \"安卓下载完成率\"\n" +
             "  },\n" +
             "  \"active\": {\n" +
@@ -222,7 +222,7 @@ public class AccountReportConstants {
             "    \"comment\": \"激活数\"\n" +
             "  },\n" +
             "  \"activeCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(activation) IS NULL THEN 0 ELSE sum(charge) / sum(activation) end AS activeCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / sum(activation) IS NULL THEN 0 ELSE round(sum(charge)/sum(activation),3) end AS activeCost \",\n" +
             "    \"comment\": \"激活单价\"\n" +
             "  },\n" +
             "  \"firstDayPay\": {\n" +
@@ -234,11 +234,11 @@ public class AccountReportConstants {
             "    \"comment\": \"首日付费金额\"\n" +
             "  },\n" +
             "  \"firstDayPayCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(event_pay_first_day) IS NULL THEN 0 ELSE sum(charge) / sum(event_pay_first_day) end AS firstDayPayCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / sum(event_pay_first_day) IS NULL THEN 0 ELSE round(sum(charge)/sum(event_pay_first_day),2) end AS firstDayPayCost \",\n" +
             "    \"comment\": \"首日付费成本\"\n" +
             "  },\n" +
             "  \"firstDayPayROI\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(event_pay_purchase_amount_first_day) / sum(charge) IS NULL THEN '0%' ELSE concat(CAST(round(sum(event_pay_purchase_amount_first_day) / sum(charge)*100,2) AS CHAR) ,'%') end AS firstDayPayROI \",\n" +
+            "    \"filed\": \"CASE WHEN sum(event_pay_purchase_amount_first_day) / sum(charge) IS NULL THEN 0 ELSE round(sum(event_pay_purchase_amount_first_day)/sum(charge)*100,2) end AS firstDayPayROI \",\n" +
             "    \"comment\": \"首日ROI\"\n" +
             "  },\n" +
             "  \"eventPay\": {\n" +
@@ -250,11 +250,11 @@ public class AccountReportConstants {
             "    \"comment\": \"付费金额\"\n" +
             "  },\n" +
             "  \"eventPayCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(event_pay) IS NULL THEN 0 ELSE sum(charge) / sum(event_pay) end AS eventPayCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge)/sum(event_pay) IS NULL THEN 0 ELSE round(sum(charge)/sum(event_pay),3) end AS eventPayCost \",\n" +
             "    \"comment\": \"付费次数成本\"\n" +
             "  },\n" +
             "  \"ROI\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(event_pay_purchase_amount) / sum(charge) IS NULL THEN '0%' ELSE concat(CAST(round(sum(event_pay_purchase_amount) / sum(charge)*100,2) AS CHAR) ,'%') end AS ROI \",\n" +
+            "    \"filed\": \"CASE WHEN sum(event_pay_purchase_amount)/sum(charge) IS NULL THEN 0 ELSE round(sum(event_pay_purchase_amount)/sum(charge)*100,2) end AS ROI \",\n" +
             "    \"comment\": \"ROI\"\n" +
             "  },\n" +
             "  \"register\": {\n" +
@@ -266,7 +266,7 @@ public class AccountReportConstants {
             "    \"comment\": \"注册成本\"\n" +
             "  },\n" +
             "  \"activeRegisterRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(activation) !=0  THEN concat(CAST(round(sum(event_register) / sum(activation)*100,2) AS CHAR) ,'%') else '0%' end as activeRegisterRate \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(activation) !=0  THEN round(sum(event_register)/sum(activation)*100,2) else 0 end as activeRegisterRate \",\n" +
             "    \"comment\": \"注册率\"\n" +
             "  },\n" +
             "  \"eventJinJianApp\": {\n" +
@@ -286,7 +286,7 @@ public class AccountReportConstants {
             "    \"comment\": \"授信成本\"\n" +
             "  },\n" +
             "  \"eventCreditGrantAppRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(event_jin_jian_app) !=0 THEN concat(CAST(round(sum(event_credit_grant_app) / sum(event_jin_jian_app)*100,2) AS CHAR) ,'%') ELSE '0' end as eventCreditGrantAppRate\",\n" +
+            "    \"filed\": \"CASE WHEN  sum(event_jin_jian_app) !=0 THEN round(sum(event_credit_grant_app)/sum(event_jin_jian_app)*100,2) ELSE 0 end as eventCreditGrantAppRate\",\n" +
             "    \"comment\": \"授信率\"\n" +
             "  },\n" +
             "  \"formCount\": {\n" +
@@ -294,11 +294,11 @@ public class AccountReportConstants {
             "    \"comment\": \"表单提交数\"\n" +
             "  },\n" +
             "  \"formCountRate\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(activation) != 0  THEN  concat(CAST(round(sum(form_count) / sum(activation)*100,2) AS CHAR) ,'%') else '0%' end as formCountRate \",\n" +
+            "    \"filed\": \"CASE WHEN sum(activation) != 0  THEN  round(sum(form_count)/sum(activation)*100,2) else 0 end as formCountRate \",\n" +
             "    \"comment\": \"表单提交率\"\n" +
             "  },\n" +
             "  \"formCountCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(form_count) IS NULL THEN 0 ELSE round(sum(charge)/sum(form_count),3) end as formCountCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge)/sum(form_count) IS NULL THEN 0 ELSE round(sum(charge)/sum(form_count),3) end as formCountCost \",\n" +
             "    \"comment\": \"表单提交成本\"\n" +
             "  },\n" +
             "  \"nextDayOpen\": {\n" +
@@ -306,11 +306,11 @@ public class AccountReportConstants {
             "    \"comment\": \"次留数\"\n" +
             "  },\n" +
             "  \"nextDayOpenCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(event_next_day_stay) IS NULL THEN 0 ELSE round(sum(charge)/sum(event_next_day_stay),3) end as nextDayOpenCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge)/sum(event_next_day_stay) IS NULL THEN 0 ELSE round(sum(charge)/sum(event_next_day_stay),3) end as nextDayOpenCost \",\n" +
             "    \"comment\": \"次留成本\"\n" +
             "  },\n" +
             "  \"nextDayOpenRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(activation) != 0 THEN  concat(CAST(round(sum(event_next_day_stay) / sum(activation)*100,2) AS CHAR) ,'%') ELSE '0%' end as nextDayOpenRate\",\n" +
+            "    \"filed\": \"CASE WHEN  sum(activation) != 0 THEN  round(sum(event_next_day_stay)/sum(activation)*100,2) ELSE 0 end as nextDayOpenRate\",\n" +
             "    \"comment\": \"次留率\"\n" +
             "  },\n" +
             "  \"eventJinJianLandingPage\": {\n" +
@@ -318,7 +318,7 @@ public class AccountReportConstants {
             "    \"comment\": \"落地页完件数\"\n" +
             "  },\n" +
             "  \"eventJinJianLandingPageCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(event_jin_jian_landing_page) IS NULL THEN 0 ELSE round(sum(charge)/sum(event_jin_jian_landing_page),3) end as eventJinJianLandingPageCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge)/sum(event_jin_jian_landing_page) IS NULL THEN 0 ELSE round(sum(charge)/sum(event_jin_jian_landing_page),3) end as eventJinJianLandingPageCost \",\n" +
             "    \"comment\": \"落地页完件成本\"\n" +
             "  },\n" +
             "  \"eventCreditGrantLandingPage\": {\n" +
@@ -330,7 +330,7 @@ public class AccountReportConstants {
             "    \"comment\": \"落地页授信成本\"\n" +
             "  },\n" +
             "  \"eventCreditGrantLandingPageRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(event_jin_jian_landing_page)  != 0 THEN  concat( CAST(round(sum(event_credit_grant_landing_page) / sum(event_jin_jian_landing_page)*100,2) AS CHAR),'%') ELSE '0%' end as eventCreditGrantLandingPageRate \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(event_jin_jian_landing_page)  != 0 THEN  round(sum(event_credit_grant_landing_page)/sum(event_jin_jian_landing_page)*100,2) ELSE 0 end as eventCreditGrantLandingPageRate \",\n" +
             "    \"comment\": \"落地页授信率\"\n" +
             "  },\n" +
             "  \"submit\": {\n" +
@@ -338,19 +338,19 @@ public class AccountReportConstants {
             "    \"comment\": \"按钮点击数\"\n" +
             "  },\n" +
             "  \"submitCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(submit) IS NULL THEN 0 ELSE round(sum(charge)/sum(submit),3) end as submitCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge)/sum(submit) IS NULL THEN 0 ELSE round(sum(charge)/sum(submit),3) end as submitCost \",\n" +
             "    \"comment\": \"按钮点击成本\"\n" +
             "  },\n" +
             "  \"submitRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(bclick) != 0 THEN concat(CAST(round(sum(submit) / sum(bclick)*100,2) AS CHAR) ,'%') else '0%' end as submitRate \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(bclick) != 0 THEN round(sum(submit)/sum(bclick)*100,2) else 0 end as submitRate \",\n" +
             "    \"comment\": \"按钮点击率\"\n" +
             "  },\n" +
             "  \"play3sRate\": {\n" +
-            "    \"filed\": \"(CASE WHEN  sum(aclick) != 0 THEN round( sum(play_3s_ratio * aclick) / sum(aclick) * 100,2) ELSE 0 END )AS play3sRate \",\n" +
+            "    \"filed\": \"(CASE WHEN  sum(aclick) != 0 THEN round(sum(play_3s_ratio*aclick)/sum(aclick) * 100,2) ELSE 0 END )AS play3sRate \",\n" +
             "    \"comment\": \"3s播放率\"\n" +
             "  },\n" +
             "  \"activeRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(download_completed) != 0 THEN concat(CAST(round(sum(activation) / sum(download_completed)*100,2) AS CHAR) ,'%') else '0%' end as activeRate \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(download_completed) != 0 THEN round(sum(activation)/sum(download_completed)*100,2) else 0 end as activeRate \",\n" +
             "    \"comment\": \"下载完成激活率\"\n" +
             "  }\n" +
             "}";
@@ -384,23 +384,23 @@ public class AccountReportConstants {
             "    \"comment\": \"行为数\"\n" +
             "  },\n" +
             "  \"clickRate\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(show) != 0    THEN CONCAT( CAST(ROUND((sum(photo_click) / sum(show)) * 100,2) AS CHAR) ,'%') else '0%' END AS clickRate \",\n" +
+            "    \"filed\": \"CASE WHEN sum(show) != 0    THEN ROUND(sum(photo_click) / sum(show) * 100,2) else 0 END AS clickRate \",\n" +
             "    \"comment\": \"封面点击率\"\n" +
             "  },\n" +
             "  \"bClickRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(aclick) != 0 THEN CONCAT( CAST(ROUND((sum(bclick) / sum(aclick)) * 100,2) AS CHAR) ,'%') ELSE '0%' END AS bClickRate \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(aclick) != 0 THEN ROUND(sum(bclick) / sum(aclick)*100,2) ELSE 0 END AS bClickRate \",\n" +
             "    \"comment\": \"行为率\"\n" +
             "  },\n" +
             "  \"cpm\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(show) IS NULL THEN 0 ELSE ROUND((sum(charge) / sum(show)) * 1000, 2 ) END AS cpm \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge)/sum(show) IS NULL THEN 0 ELSE ROUND(sum(charge)/sum(show)*1000,3) END AS cpm \",\n" +
             "    \"comment\": \"平均千次封面曝光花费\"\n" +
             "  },\n" +
             "  \"cpc\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(photo_click) IS NULL THEN 0 ELSE ROUND((sum(charge) / sum(photo_click)), 2) END AS cpc \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / sum(photo_click) IS NULL THEN 0 ELSE ROUND(sum(charge)/sum(photo_click), 3) END AS cpc \",\n" +
             "    \"comment\": \"平均封面点击单价\"\n" +
             "  },\n" +
             "  \"cpb\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(bclick) IS NULL THEN 0 ELSE ROUND((sum(charge) / sum(bclick)), 2) END AS cpb \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / sum(bclick) IS NULL THEN 0 ELSE ROUND(sum(charge)/sum(bclick), 3) END AS cpb \",\n" +
             "    \"comment\": \"平均行为单价\"\n" +
             "  },\n" +
             "  \"downloadStart\": {\n" +
@@ -408,11 +408,11 @@ public class AccountReportConstants {
             "    \"comment\": \"安卓开始下载数\"\n" +
             "  },\n" +
             "  \"downloadStartCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / (download_started) IS NULL THEN 0 ELSE sum(charge) / sum(download_started) end AS downloadStartCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / (download_started) IS NULL THEN 0 ELSE round(sum(charge)/sum(download_started),2) end AS downloadStartCost \",\n" +
             "    \"comment\": \"安卓开始下载单价\"\n" +
             "  },\n" +
             "  \"downloadStartRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(bclick) != 0 THEN concat(CAST(round(sum(download_started) / sum(bclick)*100,2) AS CHAR) ,'%') else '0%' end AS downloadStartRate\",\n" +
+            "    \"filed\": \"CASE WHEN  sum(bclick) != 0 THEN round(sum(download_started) / sum(bclick)*100,2) else 0 end AS downloadStartRate\",\n" +
             "    \"comment\": \"安卓开始下载率\"\n" +
             "  },\n" +
             "  \"downloadFinish\": {\n" +
@@ -420,11 +420,11 @@ public class AccountReportConstants {
             "    \"comment\": \"安卓下载完成数\"\n" +
             "  },\n" +
             "  \"downloadFinishCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(download_completed) IS NULL THEN 0 ELSE  sum(charge) / sum(download_completed) end AS downloadFinishCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / sum(download_completed) IS NULL THEN 0 ELSE  round(sum(charge)/sum(download_completed),2) end AS downloadFinishCost \",\n" +
             "    \"comment\": \"安卓下载完成单价\"\n" +
             "  },\n" +
             "  \"downloadFinishRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(download_started) != 0 then  concat(CAST(round(sum(download_completed) / sum(download_started)*100,2) AS CHAR) ,'%') else '0%' end AS downloadFinishRate  \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(download_started) != 0 then round(sum(download_completed)/sum(download_started)*100,2) else 0 end AS downloadFinishRate  \",\n" +
             "    \"comment\": \"安卓下载完成率\"\n" +
             "  },\n" +
             "  \"active\": {\n" +
@@ -432,7 +432,7 @@ public class AccountReportConstants {
             "    \"comment\": \"激活数\"\n" +
             "  },\n" +
             "  \"activeCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(activation) IS NULL THEN 0 ELSE sum(charge) / sum(activation) end AS activeCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / sum(activation) IS NULL THEN 0 ELSE round(sum(charge)/sum(activation),3) end AS activeCost \",\n" +
             "    \"comment\": \"激活单价\"\n" +
             "  },\n" +
             "  \"firstDayPay\": {\n" +
@@ -444,7 +444,7 @@ public class AccountReportConstants {
             "    \"comment\": \"首日付费金额\"\n" +
             "  },\n" +
             "  \"firstDayPayCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(event_pay_first_day) IS NULL THEN 0 ELSE sum(charge) / sum(event_pay_first_day) end AS firstDayPayCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge)/sum(event_pay_first_day) IS NULL THEN 0 ELSE round(sum(charge)/sum(event_pay_first_day),3) end AS firstDayPayCost \",\n" +
             "    \"comment\": \"首日付费成本\"\n" +
             "  },\n" +
             "  \"firstDayPayROI\": {\n" +
@@ -460,7 +460,7 @@ public class AccountReportConstants {
             "    \"comment\": \"付费金额\"\n" +
             "  },\n" +
             "  \"eventPayCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(event_pay) IS NULL THEN 0 ELSE sum(charge) / sum(event_pay) end AS eventPayCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge) / sum(event_pay) IS NULL THEN 0 ELSE round(sum(charge)/sum(event_pay),3) end AS eventPayCost \",\n" +
             "    \"comment\": \"付费次数成本\"\n" +
             "  },\n" +
             "  \"ROI\": {\n" +
@@ -476,7 +476,7 @@ public class AccountReportConstants {
             "    \"comment\": \"注册成本\"\n" +
             "  },\n" +
             "  \"activeRegisterRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(activation) !=0  THEN concat(CAST(round(sum(event_register) / sum(activation)*100,2) AS CHAR) ,'%') else '0%' end as activeRegisterRate \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(activation) !=0  THEN round(sum(event_register)/sum(activation)*100,2) else 0 end as activeRegisterRate \",\n" +
             "    \"comment\": \"注册率\"\n" +
             "  },\n" +
             "  \"eventJinJianApp\": {\n" +
@@ -496,7 +496,7 @@ public class AccountReportConstants {
             "    \"comment\": \"授信成本\"\n" +
             "  },\n" +
             "  \"eventCreditGrantAppRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(event_jin_jian_app) !=0 THEN concat(CAST(round(sum(event_credit_grant_app) / sum(event_jin_jian_app)*100,2) AS CHAR) ,'%') ELSE '0' end as eventCreditGrantAppRate\",\n" +
+            "    \"filed\": \"CASE WHEN  sum(event_jin_jian_app) !=0 THEN round(sum(event_credit_grant_app)/sum(event_jin_jian_app)*100,2) ELSE 0 end as eventCreditGrantAppRate\",\n" +
             "    \"comment\": \"授信率\"\n" +
             "  },\n" +
             "  \"formCount\": {\n" +
@@ -504,7 +504,7 @@ public class AccountReportConstants {
             "    \"comment\": \"表单提交数\"\n" +
             "  },\n" +
             "  \"formCountRate\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(activation) != 0  THEN  concat(CAST(round(sum(form_count) / sum(activation)*100,2) AS CHAR) ,'%') else '0%' end as formCountRate \",\n" +
+            "    \"filed\": \"CASE WHEN sum(activation) != 0  THEN round(sum(form_count)/sum(activation)*100,2) else 0 end as formCountRate \",\n" +
             "    \"comment\": \"表单提交率\"\n" +
             "  },\n" +
             "  \"formCountCost\": {\n" +
@@ -520,7 +520,7 @@ public class AccountReportConstants {
             "    \"comment\": \"次留成本\"\n" +
             "  },\n" +
             "  \"nextDayOpenRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(activation) != 0 THEN  concat(CAST(round(sum(event_next_day_stay) / sum(activation)*100,2) AS CHAR) ,'%') ELSE '0%' end as nextDayOpenRate\",\n" +
+            "    \"filed\": \"CASE WHEN  sum(activation) != 0 THEN round(sum(event_next_day_stay)/sum(activation)*100,2) ELSE 0 end as nextDayOpenRate\",\n" +
             "    \"comment\": \"次留率\"\n" +
             "  },\n" +
             "  \"eventJinJianLandingPage\": {\n" +
@@ -540,7 +540,7 @@ public class AccountReportConstants {
             "    \"comment\": \"落地页授信成本\"\n" +
             "  },\n" +
             "  \"eventCreditGrantLandingPageRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(event_jin_jian_landing_page)  != 0 THEN  concat( CAST(round(sum(event_credit_grant_landing_page) / sum(event_jin_jian_landing_page)*100,2) AS CHAR),'%') ELSE '0%' end as eventCreditGrantLandingPageRate \",\n" +
+            "    \"filed\": \"CASE WHEN sum(event_jin_jian_landing_page)!=0 THEN round(sum(event_credit_grant_landing_page)/sum(event_jin_jian_landing_page)*100,2) ELSE 0 end as eventCreditGrantLandingPageRate \",\n" +
             "    \"comment\": \"落地页授信率\"\n" +
             "  },\n" +
             "  \"submit\": {\n" +
@@ -548,15 +548,15 @@ public class AccountReportConstants {
             "    \"comment\": \"按钮点击数\"\n" +
             "  },\n" +
             "  \"submitCost\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(charge) / sum(submit) IS NULL THEN 0 ELSE round(sum(charge)/sum(submit),3) end as submitCost \",\n" +
+            "    \"filed\": \"CASE WHEN sum(charge)/sum(submit) IS NULL THEN 0 ELSE round(sum(charge)/sum(submit),3) end as submitCost \",\n" +
             "    \"comment\": \"按钮点击成本\"\n" +
             "  },\n" +
             "  \"submitRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(bclick) != 0 THEN concat(CAST(round(sum(submit) / sum(bclick)*100,2) AS CHAR) ,'%') else '0%' end as submitRate \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(bclick) != 0 THEN round(sum(submit)/sum(bclick)*100,2) else 0 end as submitRate \",\n" +
             "    \"comment\": \"按钮点击率\"\n" +
             "  },\n" +
             "  \"activeRate\": {\n" +
-            "    \"filed\": \"CASE WHEN  sum(download_completed) != 0 THEN concat(CAST(round(sum(activation) / sum(download_completed)*100,2) AS CHAR) ,'%') else '0%' end as activeRate \",\n" +
+            "    \"filed\": \"CASE WHEN  sum(download_completed) != 0 THEN round(sum(activation)/sum(download_completed)*100,2) else 0 end as activeRate \",\n" +
             "    \"comment\": \"下载完成激活率\"\n" +
             "  },\n" +
             "  \"play3sCount\": {\n" +
@@ -564,7 +564,7 @@ public class AccountReportConstants {
             "    \"comment\": \"3s播放数\"\n" +
             "  },\n" +
             "  \"play3sRate\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(aclick) != 0 THEN CONCAT(CAST(ROUND( sum(play_3s_count) / sum(aclick),2 )  * 100 AS CHAR),'%') ELSE '-' END AS play3sRate\",\n" +
+            "    \"filed\": \"CASE WHEN sum(aclick) != 0 THEN ROUND(sum(play_3s_count)/sum(aclick)* 100,2 ) ELSE 0 END AS play3sRate\",\n" +
             "    \"comment\": \"3s播放率\"\n" +
             "  }\n" +
             "}";
@@ -760,16 +760,13 @@ public class AccountReportConstants {
             "  }\n" +
             "}";
 
-    public static void main(String[] args) {
-        System.out.println(BYTEDANCE_VIDEO_REPORT_MAPPING_JSON);
-    }
     public static final String BYTEDANCE_VIDEO_REPORT_MAPPING_JSON = "{\n" +
             "  \"cost\": {\n" +
             "    \"filed\": \"IFNULL(sum(t1.cost),0) as cost \",\n" +
             "    \"comment\": \"消耗\"\n" +
             "  },\n" +
             "  \"cpm\": {\n" +
-            "    \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.material_show) IS NULL THEN 0 ELSE ROUND((sum(t1.cost) / sum(t1.material_show)) * 1000, 2 ) END AS cpm \",\n" +
+            "    \"filed\": \"CASE WHEN sum(t1.cost) / sum(t1.material_show) IS NULL THEN 0 ELSE ROUND(sum(t1.cost)/sum(t1.material_show)*1000,2) END AS cpm \",\n" +
             "    \"comment\": \"平均千次展现费用\"\n" +
             "  },\n" +
             "  \"clickMaterial\": {\n" +

+ 1 - 1
jeecg-boot-report/src/main/java/cn/com/ctop/common/mapper/xml/ProjectMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="cn.com.ctop.common.mapper.ProjectMapper">
 
     <select id="getListByParams" resultType="cn.com.ctop.common.entity.Project">
-        select * from hcst_system.ctop_project where 1=1
+        select * from `jeecg-boot`.ctop_project where 1=1
         and media_id in
         <foreach collection="mediaIds" item="item" separator=","
                  open="(" close=")">

+ 29 - 28
jeecg-boot-report/src/main/java/cn/com/ctop/common/mapper/xml/ProjectMemberMapper.xml

@@ -5,15 +5,15 @@
     <select id="selectProjectsByUserId" resultType="java.lang.Long">
         select
         DISTINCT(project_id)
-         from ctop_project_member
+         from `jeecg-boot`.ctop_project_member
         where user_id = #{userId}
     </select>
 
     <select id="selectProductsByUserId" resultType="java.lang.Long">
-        select  DISTINCT(product_id) from ctop_project where product_id is not NULL  and id in
+        select  DISTINCT(product_id) from `jeecg-boot`.ctop_project where product_id is not NULL  and id in
          (select
               DISTINCT(project_id)
-          from ctop_project_member where user_id = #{userId})
+          from `jeecg-boot`.ctop_project_member where user_id = #{userId})
     </select>
 
     <!-- 设计师展示所有自己的角色下制作的视频 -->
@@ -23,7 +23,7 @@
         t1.project_name as projectName,
         t1.advertiser_id as advertiserId,
         (
-        select name from ctop_advertiser where id = t1.advertiser_id
+        select name from `jeecg-boot`.ctop_advertiser where id = t1.advertiser_id
         )
         as advertiserName,
         t1.media_id as mediaId,
@@ -31,7 +31,7 @@
         t1.product_id as productId,
         t1.responsible_name as responsibleName
         from
-        ctop_project t1
+        `jeecg-boot`.ctop_project t1
         where
         media_id in
         <foreach collection="mediaIds" item="item" separator=","
@@ -51,7 +51,7 @@
         b.product_id as productId,
         b.media_id as mediaId
         from
-        ctop_project_member a
+        `jeecg-boot`.ctop_project_member a
         left join ctop_project b on a.project_id = b.id
         where
         b.company_id = #{companyId}
@@ -72,7 +72,7 @@
         b.media_id as mediaId,
         b.product_id as productId
         from
-        ctop_project_member a
+        `jeecg-boot`.ctop_project_member a
         left join ctop_project b on a.project_id = b.id
         where a.user_id = #{userId}
         and b.media_id in
@@ -91,7 +91,7 @@
         b.media_id as mediaId,
         b.product_id as productId
         from
-        ctop_project_member a
+        `jeecg-boot`.ctop_project_member a
         left join ctop_project b on a.project_id = b.id
         where b.product_id = #{productId}
         <if test="userId !=null and userId!=''">
@@ -116,7 +116,7 @@
         b.product_id as productId,
         b.media_id as mediaId
         from
-        hcst_system.ctop_user_allocation a
+        `jeecg-boot`.ctop_user_allocation a
         left join hcst_system.ctop_project b on a.project_id = b.id
         where a.user_id = #{userId}
         and b.media_id in
@@ -130,7 +130,7 @@
         select
         role_code
         from
-            hcst_system.sys_user_role a
+            `jeecg-boot`.sys_user_role a
         left join sys_role b on a.role_id = b.id
         where a.user_id = #{userId}
     </select>
@@ -139,7 +139,7 @@
             select
             company_id
         from
-            hcst_system.user_company
+            `jeecg-boot`.user_company
         where user_id = #{userId}
     </select>
 
@@ -152,19 +152,19 @@
         SELECT
         NAME
         FROM
-        ctop_advertiser
+        `jeecg-boot`.ctop_advertiser
         WHERE
         id = t1.advertiser_id
         ) AS 'advertiserName',
         t1.media_id as 'mediaId'
         FROM
-        ctop_project t1
+        `jeecg-boot`.ctop_project t1
         WHERE
         t1.id IN (
         SELECT
         project_id
         FROM
-        hcst_system.ctop_project_member
+        `jeecg-boot`.ctop_project_member
         where user_id = #{userId}
         GROUP BY
         project_id
@@ -187,7 +187,7 @@
         a.sale_id as saleId,
         b.realname as saleName
         from
-        hcst_system.ctop_project a
+        `jeecg-boot`.ctop_project a
         left join sys_user b on a.sale_id = b.id
         where a.sale_id = #{userId}
         and a.media_id in
@@ -199,7 +199,7 @@
 
     <select id="getProjectByMap" resultType="java.lang.Long">
         select project_id
-        from hcst_system.ctop_project_member
+        from `jeecg-boot`.ctop_project_member
         where user_id = #{userId}
         group by project_id
     </select>
@@ -207,7 +207,8 @@
         select
             project.*
         from
-            hcst_system.ctop_project_member member left join hcst_system.ctop_project project on project.id = member.project_id
+            `jeecg-boot`.ctop_project_member member
+            left join `jeecg-boot`.ctop_project project on project.id = member.project_id
         where
             member.user_id = #{userId}
     </select>
@@ -216,7 +217,7 @@
         SELECT
         project_id
         FROM
-        hcst_system.ctop_user_allocation
+        `jeecg-boot`.ctop_user_allocation
         WHERE
         account_id IN
         <foreach collection="accountIds" item="item" separator=","
@@ -230,7 +231,7 @@
         (SELECT
         project_id
         FROM
-        hcst_system.ctop_user_allocation
+        `jeecg-boot`.ctop_user_allocation
         WHERE
         account_id IN
         <foreach collection="accountIds" item="item" separator=","
@@ -247,10 +248,10 @@
         t3.product_name  as 'productName',
         t2.advertiser_id as 'advertiserId',
         t4.`name`        as 'advertiserName'
-        from hcst_system.ctop_project_member t1
-        left join hcst_system.ctop_project t2 on t1.project_id = t2.id
-        left join hcst_system.ctop_product t3 on t3.id = t2.product_id
-        left join hcst_system.ctop_advertiser t4 on t2.advertiser_id = t4.id
+        from `jeecg-boot`.ctop_project_member t1
+        left join `jeecg-boot`.ctop_project t2 on t1.project_id = t2.id
+        left join `jeecg-boot`.ctop_product t3 on t3.id = t2.product_id
+        left join `jeecg-boot`.ctop_advertiser t4 on t2.advertiser_id = t4.id
         where 1 = 1
         <if test="userId !=null and userId!=''">
             and t1.user_id = #{userId}
@@ -274,8 +275,8 @@
         SELECT
         t1.id
         FROM
-        hcst_system.ctop_project t1
-        LEFT JOIN hcst_system.ctop_project_member t2 ON t1.id = t2.project_id
+        `jeecg-boot`.ctop_project t1
+        LEFT JOIN `jeecg-boot`.ctop_project_member t2 ON t1.id = t2.project_id
         WHERE
         t2.user_id = #{userId}
         <if test="productId != null and productId != ''">
@@ -286,9 +287,9 @@
     </select>
     <select id="getlistByUserId" resultType="cn.com.ctop.common.entity.ProjectMember">
         select cp.id as id, cp.project_name as project_name, cp.media_id as media_id, ca.name as advertiser_name
-        from hcst_system.ctop_project_member cpm
-                 left join hcst_system.ctop_project cp on cpm.project_id = cp.id
-                 left join hcst_system.ctop_advertiser ca on ca.id = cp.advertiser_id
+        from `jeecg-boot`.ctop_project_member cpm
+                 left join `jeecg-boot`.ctop_project cp on cpm.project_id = cp.id
+                 left join `jeecg-boot`.ctop_advertiser ca on ca.id = cp.advertiser_id
         where 1=1
         <if test="userId!=null">
             and cpm.user_id = #{userId}

+ 1 - 1
jeecg-boot-report/src/main/java/cn/com/ctop/common/mapper/xml/SysDepartMapper.xml

@@ -6,7 +6,7 @@
         select
                *
         from
-        hcst_system.sys_depart
+        `jeecg-boot`.sys_depart
         where
               1=1
               <if test="orgType!=null">

+ 5 - 5
jeecg-boot-report/src/main/java/cn/com/ctop/common/mapper/xml/SysRoleMapper.xml

@@ -5,23 +5,23 @@
     <!-- 根据roleCode获取roleId -->
     <select id="getRoleIdByRoleCode" resultType="java.lang.String">
         select id
-        from hcst_system.sys_role
+        from `jeecg-boot`.sys_role
         where role_code = #{roleCode}
     </select>
 
     <!-- 根据userId获取角色code -->
     <select id="getRoleCodeByUserId" resultType="java.lang.String">
         select c.role_code
-        from hcst_system.sys_user a
-                 left join hcst_system.sys_user_role b on a.id = b.user_id
-                 left join hcst_system.sys_role c on b.role_id = c.id
+        from `jeecg-boot`.sys_user a
+                 left join `jeecg-boot`.sys_user_role b on a.id = b.user_id
+                 left join `jeecg-boot`.sys_role c on b.role_id = c.id
         where a.id = #{userId}
     </select>
 
 
     <select id="queryRoleByUserId" resultType="cn.com.ctop.common.entity.SysRole">
         SELECT t2.role_name,t2.role_code
-        FROM hcst_system.sys_user_role t1
+        FROM `jeecg-boot`.sys_user_role t1
                  LEFT JOIN sys_role t2 ON t1.role_id = t2.id
         WHERE t1.user_id = #{userId} LIMIT 1
     </select>

+ 1 - 1
jeecg-boot-report/src/main/java/cn/com/ctop/common/mapper/xml/SysUserMapper.xml

@@ -3,6 +3,6 @@
 <mapper namespace="cn.com.ctop.common.mapper.SysUserMapper">
 
     <select id="selectAllUser" resultType="org.jeecg.common.system.entity.SysUser">
-        select * from hcst_system.sys_user where del_flag = 0 and status = 1
+        select * from `jeecg-boot`.sys_user where del_flag = 0 and status = 1
     </select>
 </mapper>

+ 3 - 3
jeecg-boot-report/src/main/java/cn/com/ctop/common/mapper/xml/UserAllocationMapper.xml

@@ -3,16 +3,16 @@
 <mapper namespace="cn.com.ctop.common.mapper.UserAllocationMapper">
 
     <select id="queryListWithPermission" resultType="cn.com.ctop.common.entity.UserAllocation">
-        select * from hcst_system.user_allocation where 1=1 ${permissionSql}
+        select * from `jeecg-boot`.user_allocation where 1=1 ${permissionSql}
     </select>
     <select id="getAccountListByProjectList" resultType="com.alibaba.fastjson.JSONObject">
         select
         t1.project_id as 'projectId',
         t1.account_id as 'accountId',
-        (select realname from hcst_system.sys_user where id = t1.user_id ) as 'userName',
+        (select realname from `jeecg-boot`.sys_user where id = t1.user_id ) as 'userName',
         t1.auth_name as 'authName',
         t1.account_status as 'accountStatus'
-        from hcst_system.ctop_user_allocation t1
+        from `jeecg-boot`.ctop_user_allocation t1
         where t1.project_id in
         <foreach collection="list" item="item" separator=","
                  open="(" close=")">

+ 1 - 1
jeecg-boot-report/src/main/java/cn/com/ctop/report/controller/KuaishouAccountReportDailyDwController.java

@@ -41,7 +41,7 @@ public class KuaishouAccountReportDailyDwController {
         resultMap.put("message","获取数据成功");
         resultMap.put("code","0");
         resultMap.put("success",true);
-        resultMap.put("result",dataList);
+        resultMap.put("data",dataList);
         return resultMap;
     }
 

+ 2 - 1
jeecg-boot-report/src/main/java/cn/com/ctop/report/entity/AccountAttributionInfo.java

@@ -19,11 +19,12 @@ public class AccountAttributionInfo {
     private Long productId;
     private String advertiserId;
     private String companyId;
-    private String accountName;
+    private String authName;
     private String projectName;
     private String advertiserName;
     private String companyName;
     private String saleId;
     private String userId;
     private String orgCode;
+    private String userName;
 }

+ 11 - 12
jeecg-boot-report/src/main/java/cn/com/ctop/report/mapper/xml/AccountAttributionInfoMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="cn.com.ctop.report.mapper.AccountAttributionInfoMapper">
 
     <insert id="reloadData">
-        replace into hcst_system.ctop_account_attribution_info(id, account_id, project_id, product_id, advertiser_id, company_id,
+        replace into `jeecg-boot`.ctop_account_attribution_info(id, account_id, project_id, product_id, advertiser_id, company_id,
                                           account_name, project_name, advertiser_name, company_name, sale_id, user_id,
                                           org_code)
         select cua.account_id,
@@ -19,18 +19,18 @@
                cp.sale_id,
                su.id,
                su.org_code
-        from hcst_system.ctop_user_allocation cua
-                 left join hcst_system.ctop_project cp on cua.project_id = cp.id
-                 left join hcst_system.ctop_advertiser ca on ca.id = cua.advertiser_id
-                 left join hcst_system.sys_user su on su.id = cua.user_id
-                 left join hcst_system.user_company uc on uc.user_id = cua.user_id
-                 left join hcst_system.ctop_product product on product.id = cp.product_id where cua.account_id is not null;
+        from `jeecg-boot`.ctop_user_allocation cua
+                 left join `jeecg-boot`.ctop_project cp on cua.project_id = cp.id
+                 left join `jeecg-boot`.ctop_advertiser ca on ca.id = cua.advertiser_id
+                 left join `jeecg-boot`.sys_user su on su.id = cua.user_id
+                 left join `jeecg-boot`.user_company uc on uc.user_id = cua.user_id
+                 left join `jeecg-boot`.ctop_product product on product.id = cp.product_id where cua.account_id is not null;
     </insert>
     <select id="selectByParams" resultType="cn.com.ctop.report.entity.AccountAttributionInfo">
         select
                caai.*
-        from hcst_system.ctop_user_allocation cua
-        left join hcst_system.ctop_account_attribution_info caai on caai.account_id = cua.account_id
+        from jeecg-boot.ctop_user_allocation cua
+        left join `jeecg-boot`.ctop_account_attribution_info caai on caai.account_id = cua.account_id
         where cua.media_id in
         <foreach collection="mediaList" item="item" separator=","
                  open="(" close=")">
@@ -53,12 +53,11 @@
                 #{userId}
             </foreach>
         </if>
-        and cua.account_status = 0
     </select>
     <select id="selectDesignAccuntsByParams" resultType="cn.com.ctop.report.entity.AccountAttributionInfo">
         select caai.*
-        from hcst_system.ctop_user_allocation cua
-                 left join hcst_system.ctop_account_attribution_info caai on cua.account_id = caai.account_id
+        from `jeecg-boot`.ctop_user_allocation cua
+                 left join `jeecg-boot`.ctop_account_attribution_info caai on cua.account_id = caai.account_id
         where cua.account_status = 0
         <if test="mediaList != null">
             and cua.media_id in

+ 9 - 13
jeecg-boot-report/src/main/java/cn/com/ctop/report/mapper/xml/KuaishouMaterialVideoReportDailyDwMapper.xml

@@ -8,7 +8,7 @@
         FROM
         (select
         t1.signature
-        from ctop_etl_kuaishou_account_material_report_daily t1
+        from kuaishou_material_video_report_daily_dw t1
         where 1 = 1
         <if test="accountIds !=null and accountIds != ''">
             and t1.account_id in
@@ -23,30 +23,26 @@
         <if test="endDate !=null and endDate != ''">
             AND t1.stat_date &lt;= #{endDate}
         </if>
-        GROUP BY t1.signature
-        ) t1
-        LEFT JOIN ctop_etl_kuaishou_video_info t2
-        ON t1.signature = t2.video_code
-        WHERE
-        1 = 1
         <if test="leaderId !=null and leaderId != ''">
-            AND t2.design_team_leader_id = #{leaderId}
+            AND t1.leader_id = #{leaderId}
         </if>
         <if test="channelType != null">
-            AND t2.channel_type = #{channelType}
+            AND t1.channel_type = #{channelType}
         </if>
         <if test="clipId !=null and clipId != ''">
-            AND t2.clip_id = #{clipId}
+            AND t1.clip_id = #{clipId}
         </if>
         <if test="planId !=null and planId != ''">
-            AND t2.plan_id = #{planId}
+            AND t1.plan_id = #{planId}
         </if>
         <if test="shotId !=null and shotId != ''">
-            AND t2.shot_id = #{shotId}
+            AND t1.shot_id = #{shotId}
         </if>
         <if test="companyId !=null and companyId != ''">
-            AND t2.company_id = #{companyId}
+            AND t1.company_id = #{companyId}
         </if>
+        GROUP BY t1.signature
+        ) t2
     </select>
     <select id="getKuaiShouVideoReportByMap" resultType="java.util.List">
         SELECT

+ 1 - 1
jeecg-boot-report/src/main/resources/application-prod.yml

@@ -105,7 +105,7 @@ spring:
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
         master:
-          url: jdbc:mysql://139.186.27.96:3390/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
+          url: jdbc:mysql://139.186.27.96:3390/application?characterEncoding=UTF-8&useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
           username: data
           password: hcst@2021
           driver-class-name: com.mysql.jdbc.Driver

+ 6 - 0
jeecg-cloud-module/jeecg-cloud-gateway/src/main/resources/application-prod.yml

@@ -50,6 +50,12 @@ spring:
           - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
         predicates:
           - Path=/finance/**
+      - id: jeecg-bytedance-ad
+        uri: lb://jeecg-cloud-report
+        predicates:
+          - Path=/reportModule/**
+        filters:
+          - DedupeResponseHeader=Access-Control-Allow-Credentials Access-Control-Allow-Origin
 # hystrix 信号量隔离,3秒后自动超时
 hystrix:
   enabled: true