Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java
songyinghao 4 years ago
parent
commit
c9bb7a3abc

+ 1 - 1
jeecg-boot-module-system/src/main/resources/application-dev.yml

@@ -135,7 +135,7 @@ spring:
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
       datasource:
         master:
         master:
-          url: jdbc:mysql://172.30.0.4:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&allowMultiQueries=true
+          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&allowMultiQueries=true
           username: hcst
           username: hcst
           password: hcst@2020
           password: hcst@2020
           driver-class-name: com.mysql.jdbc.Driver
           driver-class-name: com.mysql.jdbc.Driver

+ 0 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -353,7 +353,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
 
 
         String result = HttpUtils.httpPostRequest(url, param, headers);
         String result = HttpUtils.httpPostRequest(url, param, headers);
         JSONObject resultJson = JSONObject.parseObject(result);
         JSONObject resultJson = JSONObject.parseObject(result);
-        System.out.println(resultJson);
         Integer code = resultJson.getInteger("code");
         Integer code = resultJson.getInteger("code");
         String message = resultJson.getString("message");
         String message = resultJson.getString("message");
         if (null == code || code != 0) {
         if (null == code || code != 0) {

+ 99 - 99
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/AccountReportMapper.xml

@@ -5,44 +5,44 @@
 
 
     <select id="selectSummaryByAccountId" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectSummaryByAccountId" resultType="com.alibaba.fastjson.JSONObject">
         select
         select
-        sum(charge) cost, -- 消耗
-        sum(photo_show) photoShow, -- 封面展示
-        sum(photo_click) photoClick, -- 封面点击
-        sum(aclick) aclick, -- 素材曝光数
-        (sum(photo_click) / sum(photo_show)) photoClickRatio, -- 封面点击率
+        sum(charge) cost,
+        sum(photo_show) photoShow,
+        sum(photo_click) photoClick,
+        sum(aclick) aclick,
+        (sum(photo_click) / sum(photo_show)) photoClickRatio,
         (sum(form_count) / sum(bclick)) cvr,
         (sum(form_count) / sum(bclick)) cvr,
         ((sum(charge) / (sum(photo_show)) * 1000)) cpm,
         ((sum(charge) / (sum(photo_show)) * 1000)) cpm,
-        sum(bclick) bClick,-- 行为数
-        sum(form_count) formCount, -- 表单提交数
-        (sum(charge) / sum(form_count)) formPrice, -- 表单提交单价
-        ((sum(charge) / sum(form_count)) / #{discount}) afterFormPrice, -- 表单提交单价
-        sum(activation) activationCount, -- 激活数
-        (sum(charge) / sum(activation)) activationPrice, -- 激活单价
-        ((sum(charge) / sum(activation)) / #{discount}) afterActivationPrice, -- 激活单价
-        sum(event_register) eventRegister, -- 注册数
+        sum(bclick) bClick,
+        sum(form_count) formCount,
+        (sum(charge) / sum(form_count)) formPrice,
+        ((sum(charge) / sum(form_count)) / #{discount}) afterFormPrice,
+        sum(activation) activationCount,
+        (sum(charge) / sum(activation)) activationPrice,
+        ((sum(charge) / sum(activation)) / #{discount}) afterActivationPrice,
+        sum(event_register) eventRegister,
 
 
-        sum(form_count + activation) conversionNum, -- 转化数
+        sum(form_count + activation) conversionNum,
 
 
         (case
         (case
         when sum(activation +form_count) != 0
         when sum(activation +form_count) != 0
         then (sum(charge) / sum(activation +form_count))
         then (sum(charge) / sum(activation +form_count))
         else 0
         else 0
         end
         end
-        ) conversionPrice, -- 转化单价
+        ) conversionPrice,
 
 
         (case
         (case
         when sum(activation +form_count) != 0
         when sum(activation +form_count) != 0
         then (sum(charge) / sum(activation +form_count)) / #{discount}
         then (sum(charge) / sum(activation +form_count)) / #{discount}
         else 0
         else 0
         end
         end
-        ) afterConversionPrice, -- 折后转化单价
+        ) afterConversionPrice,
 
 
         (case
         (case
         when sum(event_register) != 0
         when sum(event_register) != 0
         then (sum(charge) / sum(event_register))
         then (sum(charge) / sum(event_register))
         else 0
         else 0
         end
         end
-        ) eventRegisterCost -- 注册成本
+        ) eventRegisterCost
         from
         from
         ctop_kuaishou_report_hourly_account
         ctop_kuaishou_report_hourly_account
         where stat_date = #{date}
         where stat_date = #{date}
@@ -57,29 +57,29 @@
 
 
     <select id="selectAccountReport" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectAccountReport" resultType="com.alibaba.fastjson.JSONObject">
         select
         select
-        sum(charge) cost, -- 消耗
-        sum(photo_show) photoShow, -- 封面展示
-        sum(photo_click) photoClick, -- 封面点击
-        sum(aclick) aclick, -- 素材曝光数
-        (sum(photo_click) / sum(photo_show)) photoClickRatio, -- 封面点击率
+        sum(charge) cost,
+        sum(photo_show) photoShow,
+        sum(photo_click) photoClick,
+        sum(aclick) aclick,
+        (sum(photo_click) / sum(photo_show)) photoClickRatio,
         (sum(form_count) / sum(bclick)) cvr,
         (sum(form_count) / sum(bclick)) cvr,
         ((sum(charge) / (sum(photo_show)) * 1000)) cpm,
         ((sum(charge) / (sum(photo_show)) * 1000)) cpm,
-        sum(bclick) bClick,-- 行为数
+        sum(bclick) bClick,
         sum(form_count) formCount,
         sum(form_count) formCount,
-        (sum(charge) / sum(form_count)) formPrice, -- 表单提交单价
-        ((sum(charge) / sum(form_count)) / #{discount}) afterFormPrice, -- 表单提交单价
-        sum(activation) activationCount, -- 激活数
-        (sum(charge) / sum(activation)) activationPrice, -- 激活单价
-        ((sum(charge) / sum(activation)) / #{discount}) afterActivationPrice, -- 激活单价
+        (sum(charge) / sum(form_count)) formPrice,
+        ((sum(charge) / sum(form_count)) / #{discount}) afterFormPrice,
+        sum(activation) activationCount,
+        (sum(charge) / sum(activation)) activationPrice,
+        ((sum(charge) / sum(activation)) / #{discount}) afterActivationPrice,
         account_id accountId,
         account_id accountId,
         (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName,
         (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName,
-        sum(event_next_day_stay) eventNextDayStay, -- 次留数
+        sum(event_next_day_stay) eventNextDayStay,
         (case
         (case
         when sum(activation) != 0
         when sum(activation) != 0
         then (sum(event_next_day_stay)/sum(activation))
         then (sum(event_next_day_stay)/sum(activation))
         else 0
         else 0
         end
         end
-        ) eventNextDayStayRatio -- 次留率=次留数/激活数
+        ) eventNextDayStayRatio
         from
         from
         ctop_kuaishou_report_daily_account
         ctop_kuaishou_report_daily_account
         where account_id in
         where account_id in
@@ -93,38 +93,38 @@
 
 
     <select id="selectAccountReportByDate" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectAccountReportByDate" resultType="com.alibaba.fastjson.JSONObject">
         select
         select
-        sum(charge) cost, -- 消耗
-        sum(photo_show) photoShow, -- 封面展示
-        sum(photo_click) photoClick, -- 封面点击
-        sum(aclick) aclick, -- 素材曝光数
-        (sum(photo_click) / sum(photo_show)) photoClickRatio, -- 封面点击率
+        sum(charge) cost,
+        sum(photo_show) photoShow,
+        sum(photo_click) photoClick,
+        sum(aclick) aclick,
+        (sum(photo_click) / sum(photo_show)) photoClickRatio,
         (sum(form_count) / sum(bclick)) cvr,
         (sum(form_count) / sum(bclick)) cvr,
         ((sum(charge) / (sum(photo_show)) * 1000)) cpm,
         ((sum(charge) / (sum(photo_show)) * 1000)) cpm,
-        sum(bclick) bClick,-- 行为数
+        sum(bclick) bClick,
         sum(form_count) formCount,
         sum(form_count) formCount,
-        (sum(charge) / sum(form_count)) formPrice, -- 表单提交单价
-        ((sum(charge) / sum(form_count)) / #{discount}) afterFormPrice, -- 表单提交单价
-        sum(activation) activationCount, -- 激活数
-        (sum(charge) / sum(activation)) activationPrice, -- 激活单价
-        ((sum(charge) / sum(activation)) / #{discount}) afterActivationPrice, -- 激活单价
-        sum(event_register) eventRegister, -- 注册数
-        sum(form_count + activation) conversionNum, -- 转化数
-        (sum(charge) / sum(activation +form_count )) conversionPrice, -- 转化单价
+        (sum(charge) / sum(form_count)) formPrice,
+        ((sum(charge) / sum(form_count)) / #{discount}) afterFormPrice,
+        sum(activation) activationCount,
+        (sum(charge) / sum(activation)) activationPrice,
+        ((sum(charge) / sum(activation)) / #{discount}) afterActivationPrice,
+        sum(event_register) eventRegister,
+        sum(form_count + activation) conversionNum,
+        (sum(charge) / sum(activation +form_count )) conversionPrice,
         (case
         (case
         when sum(event_register) != 0
         when sum(event_register) != 0
         then (sum(charge) / sum(event_register))
         then (sum(charge) / sum(event_register))
         else 0
         else 0
         end
         end
-        ) eventRegisterCost, -- 注册成本
+        ) eventRegisterCost,
         account_id accountId,
         account_id accountId,
         (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName,
         (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName,
-        sum(event_next_day_stay) eventNextDayStay, -- 次留数
+        sum(event_next_day_stay) eventNextDayStay,
         (case
         (case
         when sum(activation) != 0
         when sum(activation) != 0
         then (sum(event_next_day_stay)/sum(activation))
         then (sum(event_next_day_stay)/sum(activation))
         else 0
         else 0
         end
         end
-        ) eventNextDayStayRatio -- 次留率=次留数/激活数
+        ) eventNextDayStayRatio
         from
         from
         ctop_kuaishou_report_daily_account
         ctop_kuaishou_report_daily_account
         where stat_date &lt;= #{startDate}
         where stat_date &lt;= #{startDate}
@@ -140,27 +140,27 @@
 
 
     <select id="selectReportDetailGroupAccountId" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectReportDetailGroupAccountId" resultType="com.alibaba.fastjson.JSONObject">
         select
         select
-        sum(charge) cost, -- 消耗
-        sum(photo_show) photoShow, -- 封面展示
-        sum(photo_click) photoClick, -- 封面点击
-        sum(aclick) aclick, -- 素材曝光数
-        (sum(photo_click) / sum(photo_show)) photoClickRatio, -- 封面点击率
+        sum(charge) cost,
+        sum(photo_show) photoShow,
+        sum(photo_click) photoClick,
+        sum(aclick) aclick,
+        (sum(photo_click) / sum(photo_show)) photoClickRatio,
         (sum(form_count) / sum(bclick)) cvr,
         (sum(form_count) / sum(bclick)) cvr,
         ((sum(charge) / (sum(photo_show)) * 1000)) cpm,
         ((sum(charge) / (sum(photo_show)) * 1000)) cpm,
-        sum(bclick) bClick,-- 行为数
+        sum(bclick) bClick,
         sum(form_count) formCount,
         sum(form_count) formCount,
-        (sum(charge) / sum(form_count)) formPrice, -- 表单提交单价
-        sum(activation) activationCount, -- 激活数
-        (sum(charge) / sum(activation)) activationPrice, -- 激活单价
-        sum(event_register) eventRegister, -- 注册数
-        sum(form_count + activation) conversionNum, -- 转化数
+        (sum(charge) / sum(form_count)) formPrice,
+        sum(activation) activationCount,
+        (sum(charge) / sum(activation)) activationPrice,
+        sum(event_register) eventRegister,
+        sum(form_count + activation) conversionNum,
 
 
         (
         (
         case when sum(activation +form_count ) != 0
         case when sum(activation +form_count ) != 0
         then (sum(charge) / sum(activation +form_count))
         then (sum(charge) / sum(activation +form_count))
         else 0
         else 0
         end
         end
-        )conversionPrice, -- 转化单价
+        )conversionPrice,
 
 
 
 
         (case
         (case
@@ -168,7 +168,7 @@
         then (sum(charge) / sum(event_register))
         then (sum(charge) / sum(event_register))
         else 0
         else 0
         end
         end
-        ) eventRegisterCost, -- 注册成本
+        ) eventRegisterCost,
 
 
         account_id accountId,
         account_id accountId,
         (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName
         (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName
@@ -187,42 +187,42 @@
 
 
     <select id="selectReportDetailGroupAccountIdByDate" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectReportDetailGroupAccountIdByDate" resultType="com.alibaba.fastjson.JSONObject">
         select
         select
-        sum(charge) cost, -- 消耗
-        sum(photo_show) photoShow, -- 封面展示
-        sum(photo_click) photoClick, -- 封面点击
-        sum(aclick) aclick, -- 素材曝光数
-        (sum(photo_click) / sum(photo_show)) photoClickRatio, -- 封面点击率
+        sum(charge) cost,
+        sum(photo_show) photoShow,
+        sum(photo_click) photoClick,
+        sum(aclick) aclick,
+        (sum(photo_click) / sum(photo_show)) photoClickRatio,
         (sum(form_count) / sum(bclick)) cvr,
         (sum(form_count) / sum(bclick)) cvr,
         ((sum(charge) / (sum(photo_show)) * 1000)) cpm,
         ((sum(charge) / (sum(photo_show)) * 1000)) cpm,
-        sum(bclick) bClick,-- 行为数
+        sum(bclick) bClick,
         sum(form_count) formCount,
         sum(form_count) formCount,
-        (sum(charge) / sum(form_count)) formPrice, -- 表单提交单价
-        sum(activation) activationCount, -- 激活数
-        (sum(charge) / sum(activation)) activationPrice, -- 激活单价
-        sum(event_register) eventRegister, -- 注册数
-        sum(form_count + activation) conversionNum, -- 转化数
+        (sum(charge) / sum(form_count)) formPrice,
+        sum(activation) activationCount,
+        (sum(charge) / sum(activation)) activationPrice,
+        sum(event_register) eventRegister,
+        sum(form_count + activation) conversionNum,
         (
         (
         case when sum(activation +form_count ) != 0
         case when sum(activation +form_count ) != 0
         then (sum(charge) / sum(activation +form_count))
         then (sum(charge) / sum(activation +form_count))
         else 0
         else 0
         end
         end
-        )conversionPrice, -- 转化单价
+        )conversionPrice,
 
 
         (case
         (case
         when sum(event_register) != 0
         when sum(event_register) != 0
         then (sum(charge) / sum(event_register))
         then (sum(charge) / sum(event_register))
         else 0
         else 0
         end
         end
-        ) eventRegisterCost, -- 注册成本
+        ) eventRegisterCost,
         account_id accountId,
         account_id accountId,
         (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName,
         (select auth_name from ctop_user_allocation where account_id = accountId limit 1) accountName,
-        sum(event_next_day_stay) eventNextDayStay, -- 次留数
+        sum(event_next_day_stay) eventNextDayStay,
         (case
         (case
         when sum(activation) != 0
         when sum(activation) != 0
         then ( sum(event_next_day_stay) / sum(activation) )
         then ( sum(event_next_day_stay) / sum(activation) )
         else 0
         else 0
         end
         end
-        ) eventNextDayStayRatio -- 次留率=次留数/激活数
+        ) eventNextDayStayRatio
         from
         from
         ctop_kuaishou_report_daily_account
         ctop_kuaishou_report_daily_account
         where stat_date = #{statDate}
         where stat_date = #{statDate}
@@ -426,24 +426,24 @@
 
 
     <select id="selectSummaryByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectSummaryByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
         select
         select
-        sum(charge) cost, -- 消耗
+        sum(charge) cost,
         (case
         (case
         when sum(charge) != 0
         when sum(charge) != 0
         then (sum(charge) / #{discount})
         then (sum(charge) / #{discount})
         else 0
         else 0
         end
         end
-        ) discountCost, -- 封面点击率
+        ) discountCost,
 
 
-        sum(photo_show) photoShow, -- 封面展示
-        sum(photo_click) photoClick, -- 封面点击
-        sum(aclick) aclick, -- 素材曝光数
+        sum(photo_show) photoShow,
+        sum(photo_click) photoClick,
+        sum(aclick) aclick,
 
 
         (case
         (case
         when sum(photo_show) != 0
         when sum(photo_show) != 0
         then (sum(photo_click) / sum(photo_show))
         then (sum(photo_click) / sum(photo_show))
         else 0
         else 0
         end
         end
-        ) photoClickRatio, -- 封面点击率
+        ) photoClickRatio,
 
 
         (case
         (case
         when sum(bclick) != 0
         when sum(bclick) != 0
@@ -459,7 +459,7 @@
         end
         end
         ) cpm,
         ) cpm,
 
 
-        sum(bclick) bClick,-- 行为数
+        sum(bclick) bClick,
         (
         (
         CASE
         CASE
         WHEN sum(form_count + activation) != 0 THEN
         WHEN sum(form_count + activation) != 0 THEN
@@ -467,8 +467,8 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) conversionPrice, -- 转化单价
-        sum(form_count + activation) conversions, -- 转化数
+        ) conversionPrice,
+        sum(form_count + activation) conversions,
         (
         (
         CASE
         CASE
         WHEN sum(form_count + activation) != 0 THEN
         WHEN sum(form_count + activation) != 0 THEN
@@ -477,20 +477,20 @@
         0
         0
         END
         END
         ) discountConversionPrice,
         ) discountConversionPrice,
-        sum(event_register) eventRegister, -- 注册数
+        sum(event_register) eventRegister,
         (case
         (case
         when sum(event_register) != 0
         when sum(event_register) != 0
         then (sum(charge) / sum(event_register))
         then (sum(charge) / sum(event_register))
         else 0
         else 0
         end
         end
-        ) eventRegisterCost, -- 注册成本
-        sum(event_next_day_stay) eventNextDayStay, -- 次留数
+        ) eventRegisterCost,
+        sum(event_next_day_stay) eventNextDayStay,
         (case
         (case
         when sum(activation) != 0
         when sum(activation) != 0
         then (sum(event_next_day_stay)/sum(activation))
         then (sum(event_next_day_stay)/sum(activation))
         else 0
         else 0
         end
         end
-        ) eventNextDayStayRatio -- 次留率=次留数/激活数
+        ) eventNextDayStayRatio
 
 
         from
         from
         ctop_kuaishou_report_daily_account
         ctop_kuaishou_report_daily_account
@@ -521,24 +521,24 @@
     <select id="selectHourSummaryByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectHourSummaryByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
 
 
         select
         select
-        sum(charge) cost, -- 消耗
+        sum(charge) cost,
         (case
         (case
         when sum(charge) != 0
         when sum(charge) != 0
         then (sum(charge) / #{discount})
         then (sum(charge) / #{discount})
         else 0
         else 0
         end
         end
-        ) discountCost, -- 封面点击率
+        ) discountCost,
 
 
-        sum(photo_show) photoShow, -- 封面展示
-        sum(photo_click) photoClick, -- 封面点击
-        sum(aclick) aclick, -- 素材曝光数
+        sum(photo_show) photoShow,
+        sum(photo_click) photoClick,
+        sum(aclick) aclick,
 
 
         (case
         (case
         when sum(photo_show) != 0
         when sum(photo_show) != 0
         then (sum(photo_click) / sum(photo_show))
         then (sum(photo_click) / sum(photo_show))
         else 0
         else 0
         end
         end
-        ) photoClickRatio, -- 封面点击率
+        ) photoClickRatio,
 
 
         (case
         (case
         when sum(bclick) != 0
         when sum(bclick) != 0
@@ -553,8 +553,8 @@
         else 0
         else 0
         end
         end
         ) cpm,
         ) cpm,
-        sum(form_count + activation) conversions, -- 转化数
-        sum(bclick) bClick,-- 行为数
+        sum(form_count + activation) conversions,
+        sum(bclick) bClick,
 
 
         (
         (
         CASE
         CASE
@@ -563,7 +563,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) conversionPrice, -- 转化单价
+        ) conversionPrice,
         (
         (
         CASE
         CASE
         WHEN sum(activation + form_count) != 0 THEN
         WHEN sum(activation + form_count) != 0 THEN
@@ -572,13 +572,13 @@
         0
         0
         END
         END
         ) discountConversionPrice,
         ) discountConversionPrice,
-        sum(event_register) eventRegister, -- 注册数
+        sum(event_register) eventRegister,
         (case
         (case
         when sum(event_register) != 0
         when sum(event_register) != 0
         then (sum(charge) / sum(event_register))
         then (sum(charge) / sum(event_register))
         else 0
         else 0
         end
         end
-        ) eventRegisterCost -- 注册成本
+        ) eventRegisterCost
 
 
         from
         from
         ctop_kuaishou_report_hourly_account
         ctop_kuaishou_report_hourly_account

+ 31 - 31
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/DailyReportMapper.xml

@@ -5,9 +5,9 @@
     <select id="getDailyReport" parameterType="Map" resultType="cn.com.ctop.common.module.vo.DailyAccountReportVO">
     <select id="getDailyReport" parameterType="Map" resultType="cn.com.ctop.common.module.vo.DailyAccountReportVO">
         SELECT
         SELECT
         t1.*,
         t1.*,
-        truncate((t1.conversions / t1.bclick),4) conversionRate, -- 转化率
+        truncate((t1.conversions / t1.bclick),4) conversionRate,
 
 
-        truncate(t1.conversionPrice / #{discount},2) discountConversionPrice, -- 折后转化成本
+        truncate(t1.conversionPrice / #{discount},2) discountConversionPrice,
 
 
         (SELECT sum(contract_rebate_real_charged)
         (SELECT sum(contract_rebate_real_charged)
         from ctop_kuaishou_daily_flows
         from ctop_kuaishou_daily_flows
@@ -25,13 +25,13 @@
 
 
             </if>
             </if>
         </where>
         </where>
-        ) contractRebateRealCharged -- 激励花费
+        ) contractRebateRealCharged
         FROM (
         FROM (
         SELECT
         SELECT
-        sum(charge) cost, -- 消耗
-        sum(photo_show) photoShow, -- 展现数
-        sum(aclick) aclick, -- 素材曝光数
-        sum(photo_click) photoClick, -- 点击数
+        sum(charge) cost,
+        sum(photo_show) photoShow,
+        sum(aclick) aclick,
+        sum(photo_click) photoClick,
         (
         (
         CASE
         CASE
         WHEN sum(photo_show) != 0 THEN
         WHEN sum(photo_show) != 0 THEN
@@ -41,7 +41,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) photoClickRatio, -- 点击率
+        ) photoClickRatio,
         (
         (
         CASE
         CASE
         WHEN sum(charge) != 0 THEN
         WHEN sum(charge) != 0 THEN
@@ -51,9 +51,9 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) photoClickCost, -- 平均点击花费
+        ) photoClickCost,
 
 
-        sum(bclick) bclick, -- 行为数
+        sum(bclick) bclick,
 
 
         (
         (
         CASE
         CASE
@@ -62,7 +62,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) actionRatio, -- 行为率
+        ) actionRatio,
         (
         (
         CASE
         CASE
         WHEN sum(photo_show) != 0 THEN
         WHEN sum(photo_show) != 0 THEN
@@ -71,8 +71,8 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) impression1kCost, -- 平均千次展现花费
-        sum(form_count + activation) conversions, -- 转化数
+        ) impression1kCost,
+        sum(form_count + activation) conversions,
         (
         (
         CASE
         CASE
         WHEN sum(form_count + activation) != 0 THEN
         WHEN sum(form_count + activation) != 0 THEN
@@ -82,7 +82,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) conversionPrice -- 转化单价
+        ) conversionPrice
         FROM
         FROM
         ctop_kuaishou_report_daily_account
         ctop_kuaishou_report_daily_account
         <where>
         <where>
@@ -108,8 +108,8 @@
     <select id="getDailyGroupReport" parameterType="Map" resultType="cn.com.ctop.common.module.vo.DailyGroupReportVO">
     <select id="getDailyGroupReport" parameterType="Map" resultType="cn.com.ctop.common.module.vo.DailyGroupReportVO">
         SELECT
         SELECT
         t1.*,
         t1.*,
-        truncate(t1.conversions / t1.photoClick,4) clickConversionRate, -- 点击转化率
-        truncate(t1.conversionPrice / #{discount},2) discountConversionPrice-- 折后转化单价
+        truncate(t1.conversions / t1.photoClick,4) clickConversionRate,
+        truncate(t1.conversionPrice / #{discount},2) discountConversionPrice
         FROM
         FROM
         (
         (
         SELECT
         SELECT
@@ -121,15 +121,15 @@
         ctop_user_allocation
         ctop_user_allocation
         WHERE
         WHERE
         account_id = accountId
         account_id = accountId
-        ) authName, -- 账户名称
-        stat_date statDate, -- 报表日期
-        campaign_name campaignName, -- 计划名称
-        unit_name unitName, -- 广告组名称
-        sum(charge) cost, -- 花费
-        truncate((sum(charge) / #{discount}),2) disCountCost, -- 折后消费
-        sum(photo_show) photoShow, -- 展现数
-        sum(photo_click) photoClick, -- 点击数
-        sum(bclick) bclick, -- 行为数
+        ) authName,
+        stat_date statDate,
+        campaign_name campaignName,
+        unit_name unitName,
+        sum(charge) cost,
+        truncate((sum(charge) / #{discount}),2) disCountCost,
+        sum(photo_show) photoShow,
+        sum(photo_click) photoClick,
+        sum(bclick) bclick,
         (
         (
         CASE
         CASE
         WHEN sum(aclick) != 0 THEN
         WHEN sum(aclick) != 0 THEN
@@ -137,7 +137,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) actionRatio, -- 行为率
+        ) actionRatio,
 
 
 
 
         (
         (
@@ -147,7 +147,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) photoClickRatio, -- 点击率
+        ) photoClickRatio,
 
 
 
 
         (
         (
@@ -159,7 +159,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) impression1kCost, -- 平均千次展现花费
+        ) impression1kCost,
         (
         (
         CASE
         CASE
         WHEN sum(charge) != 0 THEN
         WHEN sum(charge) != 0 THEN
@@ -169,9 +169,9 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) photoClickCost, -- 平均点击花费
+        ) photoClickCost,
 
 
-        sum(form_count + activation) conversions, -- 转化数
+        sum(form_count + activation) conversions,
         (
         (
         CASE
         CASE
         WHEN sum(form_count + activation) != 0 THEN
         WHEN sum(form_count + activation) != 0 THEN
@@ -181,7 +181,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) conversionPrice -- 转化单价
+        ) conversionPrice
 
 
         FROM
         FROM
         ctop_kuaishou_report_daily_group
         ctop_kuaishou_report_daily_group

+ 69 - 69
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaiShouYiCheReportMapper.xml

@@ -110,7 +110,7 @@
 
 
     <select id="getDailyReportByMap" parameterType="java.util.Map" resultType="com.alibaba.fastjson.JSONObject">
     <select id="getDailyReportByMap" parameterType="java.util.Map" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         SELECT
-        '汇创' agent, -- 代理商
+        '汇创' agent,
         (
         (
         CASE
         CASE
         WHEN t1.media_id = 1 THEN
         WHEN t1.media_id = 1 THEN
@@ -120,13 +120,13 @@
         ELSE
         ELSE
         '未知'
         '未知'
         END
         END
-        ) media, -- 媒体
-        t1.system_type systemType, -- 设备
-        t2.stat_date statDate, -- 日期
-        sum(t2.charge) charge, -- 账面花费
-        ROUND(sum(t2.charge) / #{disCount}, 3) cashCost, -- 现金花费
-        sum(t2.photo_show) photoShow, -- 嚗光
-        sum(t2.photo_click) photoClick, -- 点击
+        ) media,
+        t1.system_type systemType,
+        t2.stat_date statDate,
+        sum(t2.charge) charge,
+        ROUND(sum(t2.charge) / #{disCount}, 3) cashCost,
+        sum(t2.photo_show) photoShow,
+        sum(t2.photo_click) photoClick,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_show) != 0 THEN
         WHEN sum(t2.photo_show) != 0 THEN
@@ -142,7 +142,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) clickRate, -- 点击率
+        ) clickRate,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_show) != 0 THEN
         WHEN sum(t2.photo_show) != 0 THEN
@@ -155,12 +155,12 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) impression1kCost, -- 千次嚗光花费
-        sum(t2.bclick) bclick, -- 行为量
-        sum(t2.download_completed) eventJinJianApp, -- 下载完成数
-        sum(t2.activation) activation, -- 账户激活量
-        0 youMengactivation, -- 友盟激活量
-        sum(t2.activation) tdActivation, -- TD激活量
+        ) impression1kCost,
+        sum(t2.bclick) bclick,
+        sum(t2.download_completed) eventJinJianApp,
+        sum(t2.activation) activation,
+        0 youMengactivation,
+        sum(t2.activation) tdActivation,
         (
         (
         CASE
         CASE
         WHEN sum(t2.activation) != 0 THEN
         WHEN sum(t2.activation) != 0 THEN
@@ -171,8 +171,8 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) activationCost, -- 账户激活成本
-        0 youMengactivationCost, -- 友盟激活成本
+        ) activationCost,
+        0 youMengactivationCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.activation) != 0 THEN
         WHEN sum(t2.activation) != 0 THEN
@@ -183,7 +183,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) tdActivationCost, -- TD激活成本
+        ) tdActivationCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.bclick) != 0 THEN
         WHEN sum(t2.bclick) != 0 THEN
@@ -194,7 +194,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) actionCost, -- 平均行为单价
+        ) actionCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_click) != 0 THEN
         WHEN sum(t2.photo_click) != 0 THEN
@@ -205,7 +205,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) clickCost, -- 平均点击单价
+        ) clickCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_click) != 0 THEN
         WHEN sum(t2.photo_click) != 0 THEN
@@ -219,7 +219,7 @@
         ELSE
         ELSE
         CONCAT(0, '%')
         CONCAT(0, '%')
         END
         END
-        ) actionRatio, -- 行为率
+        ) actionRatio,
         (
         (
         CASE
         CASE
         WHEN sum(t2.bclick) != 0 THEN
         WHEN sum(t2.bclick) != 0 THEN
@@ -233,7 +233,7 @@
         ELSE
         ELSE
         CONCAT(0, '%')
         CONCAT(0, '%')
         END
         END
-        ) eventJinJianAppRatio, -- 下载完成行为率
+        ) eventJinJianAppRatio,
         (
         (
         CASE
         CASE
         WHEN sum(t2.download_completed) != 0 THEN
         WHEN sum(t2.download_completed) != 0 THEN
@@ -247,7 +247,7 @@
         ELSE
         ELSE
         CONCAT(0, '%')
         CONCAT(0, '%')
         END
         END
-        ) activationRatio -- 下载完成激活率
+        ) activationRatio
         FROM
         FROM
         ctop_user_allocation t1
         ctop_user_allocation t1
         LEFT JOIN ctop_kuaishou_report_daily_account t2 ON t1.account_id = t2.account_id
         LEFT JOIN ctop_kuaishou_report_daily_account t2 ON t1.account_id = t2.account_id
@@ -268,7 +268,7 @@
     <select id="getDirectApplicationReportByMap" parameterType="java.util.Map"
     <select id="getDirectApplicationReportByMap" parameterType="java.util.Map"
             resultType="com.alibaba.fastjson.JSONObject">
             resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         SELECT
-        '汇创' agent, -- 代理商
+        '汇创' agent,
         (
         (
         CASE
         CASE
         WHEN t2.media_id = 1 THEN
         WHEN t2.media_id = 1 THEN
@@ -278,13 +278,13 @@
         ELSE
         ELSE
         '未知'
         '未知'
         END
         END
-        ) media, -- 媒体
-        t2.system_type systemType, -- 设备
-        t2.stat_date statDate, -- 日期
-        sum(t2.charge) charge, -- 账面花费
-        ROUND(sum(t2.charge) / #{disCount}, 3) cashCost, -- 现金花费
-        sum(t2.photo_show) photoShow, -- 嚗光
-        sum(t2.photo_click) photoClick, -- 点击
+        ) media,
+        t2.system_type systemType,
+        t2.stat_date statDate,
+        sum(t2.charge) charge,
+        ROUND(sum(t2.charge) / #{disCount}, 3) cashCost,
+        sum(t2.photo_show) photoShow,
+        sum(t2.photo_click) photoClick,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_show) != 0 THEN
         WHEN sum(t2.photo_show) != 0 THEN
@@ -300,7 +300,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) clickRate,-- 点击率
+        ) clickRate,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_show) != 0 THEN
         WHEN sum(t2.photo_show) != 0 THEN
@@ -313,12 +313,12 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) impression1kCost, -- 千次嚗光花费
-        sum(t2.bclick) bclick, -- 行为量
-        sum(t2.download_completed) eventJinJianApp, -- 下载完成数
-        sum(t2.activation) activation, -- 账户激活量
-        0 youMengactivation, -- 友盟激活量
-        sum(t2.activation) tdActivation, -- TD激活量
+        ) impression1kCost,
+        sum(t2.bclick) bclick,
+        sum(t2.download_completed) eventJinJianApp,
+        sum(t2.activation) activation,
+        0 youMengactivation,
+        sum(t2.activation) tdActivation,
         (
         (
         CASE
         CASE
         WHEN sum(t2.activation) != 0 THEN
         WHEN sum(t2.activation) != 0 THEN
@@ -329,8 +329,8 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) activationCost, -- 账户激活成本
-        0 youMengactivationCost,-- 友盟激活成本
+        ) activationCost,
+        0 youMengactivationCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.activation) != 0 THEN
         WHEN sum(t2.activation) != 0 THEN
@@ -341,7 +341,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) tdActivationCost,-- TD激活成本
+        ) tdActivationCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.bclick) != 0 THEN
         WHEN sum(t2.bclick) != 0 THEN
@@ -352,7 +352,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) actionCost,-- 平均行为单价
+        ) actionCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_click) != 0 THEN
         WHEN sum(t2.photo_click) != 0 THEN
@@ -363,7 +363,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) clickCost, -- 平均点击单价
+        ) clickCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_click) != 0 THEN
         WHEN sum(t2.photo_click) != 0 THEN
@@ -377,7 +377,7 @@
         ELSE
         ELSE
         CONCAT(0, '%')
         CONCAT(0, '%')
         END
         END
-        ) actionRatio, -- 行为率
+        ) actionRatio,
         (
         (
         CASE
         CASE
         WHEN sum(t2.bclick) != 0 THEN
         WHEN sum(t2.bclick) != 0 THEN
@@ -391,7 +391,7 @@
         ELSE
         ELSE
         CONCAT(0, '%')
         CONCAT(0, '%')
         END
         END
-        ) eventJinJianAppRatio, -- 下载完成行为率
+        ) eventJinJianAppRatio,
         (
         (
         CASE
         CASE
         WHEN sum(t2.download_completed) != 0 THEN
         WHEN sum(t2.download_completed) != 0 THEN
@@ -405,7 +405,7 @@
         ELSE
         ELSE
         CONCAT(0, '%')
         CONCAT(0, '%')
         END
         END
-        ) activationRatio -- 下载完成激活率
+        ) activationRatio
         FROM
         FROM
         (
         (
         SELECT
         SELECT
@@ -453,7 +453,7 @@
             resultType="com.alibaba.fastjson.JSONObject">
             resultType="com.alibaba.fastjson.JSONObject">
 
 
         SELECT
         SELECT
-        '汇创' agent, -- 代理商
+        '汇创' agent,
         (
         (
         CASE
         CASE
         WHEN t2.media_id = 1 THEN
         WHEN t2.media_id = 1 THEN
@@ -463,14 +463,14 @@
         ELSE
         ELSE
         '未知'
         '未知'
         END
         END
-        ) media, -- 媒体
-        t2.system_type systemType, -- 设备
-        t2.stat_date statDate, -- 日期
+        ) media,
+        t2.system_type systemType,
+        t2.stat_date statDate,
         t2.campaignName campaignName ,
         t2.campaignName campaignName ,
-        sum(t2.charge) charge, -- 账面花费
-        ROUND(sum(t2.charge) / #{disCount}, 3) cashCost, -- 现金花费
-        sum(t2.photo_show) photoShow, -- 嚗光
-        sum(t2.photo_click) photoClick, -- 点击
+        sum(t2.charge) charge,
+        ROUND(sum(t2.charge) / #{disCount}, 3) cashCost,
+        sum(t2.photo_show) photoShow,
+        sum(t2.photo_click) photoClick,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_show) != 0 THEN
         WHEN sum(t2.photo_show) != 0 THEN
@@ -486,7 +486,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) clickRate,-- 点击率
+        ) clickRate,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_show) != 0 THEN
         WHEN sum(t2.photo_show) != 0 THEN
@@ -499,12 +499,12 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) impression1kCost, -- 千次嚗光花费
-        sum(t2.bclick) bclick, -- 行为量
-        sum(t2.download_completed) eventJinJianApp, -- 下载完成数
-        sum(t2.activation) activation, -- 账户激活量
-        0 youMengactivation, -- 友盟激活量
-        sum(t2.activation) tdActivation, -- TD激活量
+        ) impression1kCost,
+        sum(t2.bclick) bclick,
+        sum(t2.download_completed) eventJinJianApp,
+        sum(t2.activation) activation,
+        0 youMengactivation,
+        sum(t2.activation) tdActivation,
         (
         (
         CASE
         CASE
         WHEN sum(t2.activation) != 0 THEN
         WHEN sum(t2.activation) != 0 THEN
@@ -515,8 +515,8 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) activationCost, -- 账户激活成本
-        0 youMengactivationCost,-- 友盟激活成本
+        ) activationCost,
+        0 youMengactivationCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.activation) != 0 THEN
         WHEN sum(t2.activation) != 0 THEN
@@ -527,7 +527,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) tdActivationCost,-- TD激活成本
+        ) tdActivationCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.bclick) != 0 THEN
         WHEN sum(t2.bclick) != 0 THEN
@@ -538,7 +538,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) actionCost,-- 平均行为单价
+        ) actionCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_click) != 0 THEN
         WHEN sum(t2.photo_click) != 0 THEN
@@ -549,7 +549,7 @@
         ELSE
         ELSE
         0
         0
         END
         END
-        ) clickCost, -- 平均点击单价
+        ) clickCost,
         (
         (
         CASE
         CASE
         WHEN sum(t2.photo_click) != 0 THEN
         WHEN sum(t2.photo_click) != 0 THEN
@@ -563,7 +563,7 @@
         ELSE
         ELSE
         CONCAT(0, '%')
         CONCAT(0, '%')
         END
         END
-        ) actionRatio, -- 行为率
+        ) actionRatio,
         (
         (
         CASE
         CASE
         WHEN sum(t2.bclick) != 0 THEN
         WHEN sum(t2.bclick) != 0 THEN
@@ -577,7 +577,7 @@
         ELSE
         ELSE
         CONCAT(0, '%')
         CONCAT(0, '%')
         END
         END
-        ) eventJinJianAppRatio, -- 下载完成行为率
+        ) eventJinJianAppRatio,
         (
         (
         CASE
         CASE
         WHEN sum(t2.download_completed) != 0 THEN
         WHEN sum(t2.download_completed) != 0 THEN
@@ -591,7 +591,7 @@
         ELSE
         ELSE
         CONCAT(0, '%')
         CONCAT(0, '%')
         END
         END
-        ) activationRatio -- 下载完成激活率
+        ) activationRatio
         FROM
         FROM
         (
         (
         SELECT
         SELECT

+ 165 - 191
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyAccountMapper.xml

@@ -547,52 +547,52 @@
         b.project_id as 'projectId',
         b.project_id as 'projectId',
         (select project_name from ctop_project where id = b.project_id) as 'projectName',
         (select project_name from ctop_project where id = b.project_id) as 'projectName',
         round(sum(a.charge),2) as 'charge',
         round(sum(a.charge),2) as 'charge',
-        sum(a.photo_show) as 'photoShow', -- 封面曝光数
-        sum(a.photo_click) as 'photoClick', -- 封面点击数
-        sum(a.aclick) as 'aclick', -- 素材曝光数
-        sum(a.bclick) as 'bclick', -- 行为数
-        sum(a.activation) as 'activation', -- 激活数
-        sum(a.submit) as 'submit', -- 提交按钮点击数
-        sum(a.event_register) as 'eventRegister', -- 注册数
-        sum(a.event_next_day_stay) as 'eventNextDayStay', -- 次日留存数
-        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost', -- 激活成本
+        sum(a.photo_show) as 'photoShow',
+        sum(a.photo_click) as 'photoClick',
+        sum(a.aclick) as 'aclick',
+        sum(a.bclick) as 'bclick',
+        sum(a.activation) as 'activation',
+        sum(a.submit) as 'submit',
+        sum(a.event_register) as 'eventRegister',
+        sum(a.event_next_day_stay) as 'eventNextDayStay',
+        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost',
         case when photo_show!=0 then concat(round(sum(a.photo_click)/sum(a.photo_show) * 100 ,2),'%') else 0 end as
         case when photo_show!=0 then concat(round(sum(a.photo_click)/sum(a.photo_show) * 100 ,2),'%') else 0 end as
-        'photoClickRatio', -- 封面点击率
+        'photoClickRatio',
         case when aclick!=0 then concat(round(sum(a.bclick)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'actionRate',
         case when aclick!=0 then concat(round(sum(a.bclick)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'actionRate',
         (case
         (case
         when sum(a.photo_show) != 0
         when sum(a.photo_show) != 0
         then round((sum(a.charge) / sum(a.photo_show)) * 1000,2)
         then round((sum(a.charge) / sum(a.photo_show)) * 1000,2)
         else 0
         else 0
         end
         end
-        ) as 'impression1kCost', -- 均千次封面曝光花费
+        ) as 'impression1kCost',
         (case
         (case
         when sum(a.photo_click) != 0
         when sum(a.photo_click) != 0
         then round(sum(a.charge) / sum(a.photo_click),2)
         then round(sum(a.charge) / sum(a.photo_click),2)
         else 0
         else 0
         end
         end
-        ) as 'photoClickCost', -- 平均封面点击单价
+        ) as 'photoClickCost',
         (CASE
         (CASE
         WHEN sum(a.bclick) != 0
         WHEN sum(a.bclick) != 0
         THEN round(sum(a.charge) / sum(a.bclick),2)
         THEN round(sum(a.charge) / sum(a.bclick),2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'actionCost', -- 平均行为单价
-        sum(a.photo_share) as 'photoShare', -- 分享数
-        sum(a.photo_comment) as 'photoComment', -- 评论数
-        sum(a.photo_like) as 'photoLike', -- 点赞数
-        sum(a.follow) as 'follow', -- 新增关注数
-        sum(a.report) as 'report', -- 举报数
-        sum(a.cancel_follow) as 'cancelFollow', -- 取消关注数
-        sum(a.block) as 'block', -- 拉黑数
-        sum(a.negative) as 'nagative', -- 减少此类作品数
-        sum(a.download_started) as 'downloadStarted', -- 应用下载数据-安卓下载开始数
-        sum(a.download_completed) as 'downloadCompleted', -- 应用下载数据-安卓下载完成数
+        ) as 'actionCost',
+        sum(a.photo_share) as 'photoShare',
+        sum(a.photo_comment) as 'photoComment',
+        sum(a.photo_like) as 'photoLike',
+        sum(a.follow) as 'follow',
+        sum(a.report) as 'report',
+        sum(a.cancel_follow) as 'cancelFollow',
+        sum(a.block) as 'block',
+        sum(a.negative) as 'nagative',
+        sum(a.download_started) as 'downloadStarted',
+        sum(a.download_completed) as 'downloadCompleted',
         (CASE
         (CASE
         WHEN sum(a.event_next_day_stay) != 0
         WHEN sum(a.event_next_day_stay) != 0
         THEN round(sum(a.charge) / sum(a.event_next_day_stay),2)
         THEN round(sum(a.charge) / sum(a.event_next_day_stay),2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'eventNextDayStayCost' -- 次日留存成本
+        ) as 'eventNextDayStayCost'
         from
         from
         ctop_kuaishou_report_daily_account a
         ctop_kuaishou_report_daily_account a
         left join ctop_user_allocation b on a.account_id = b.account_id
         left join ctop_user_allocation b on a.account_id = b.account_id
@@ -646,53 +646,53 @@
         )
         )
         ) as 'designResponsibleName',
         ) as 'designResponsibleName',
         ifnull(round(sum(a.charge),3),0) as 'charge',
         ifnull(round(sum(a.charge),3),0) as 'charge',
-        ifnull(sum(a.photo_show),0) as 'photoShow', -- 封面曝光数
-        ifnull(sum(a.photo_click),0) as 'photoClick', -- 封面点击数
-        ifnull(sum(a.aclick),0) as 'aclick', -- 素材曝光数
-        ifnull(sum(a.bclick),0) as 'bclick', -- 行为数
-        ifnull(sum(a.activation),0) as 'activation', -- 激活数
-        ifnull(sum(a.submit),0) as 'submit', -- 提交按钮点击数
-        ifnull(sum(a.event_register),0) as 'eventRegister', -- 注册数
-        ifnull(sum(event_next_day_stay),0) as 'eventNextDayStay', -- 次日留存数
-        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost', -- 激活成本
+        ifnull(sum(a.photo_show),0) as 'photoShow',
+        ifnull(sum(a.photo_click),0) as 'photoClick',
+        ifnull(sum(a.aclick),0) as 'aclick',
+        ifnull(sum(a.bclick),0) as 'bclick',
+        ifnull(sum(a.activation),0) as 'activation',
+        ifnull(sum(a.submit),0) as 'submit',
+        ifnull(sum(a.event_register),0) as 'eventRegister',
+        ifnull(sum(event_next_day_stay),0) as 'eventNextDayStay',
+        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost',
         case when (sum(a.photo_show) is not null and sum(a.photo_show)!=0) then
         case when (sum(a.photo_show) is not null and sum(a.photo_show)!=0) then
         concat(round(ifnull(sum(a.photo_click),0)/sum(a.photo_show) * 100 ,2),'%') else 0 end as 'photoClickRate',
         concat(round(ifnull(sum(a.photo_click),0)/sum(a.photo_show) * 100 ,2),'%') else 0 end as 'photoClickRate',
         case when (sum(a.aclick) is not null and sum(a.aclick)!=0) then
         case when (sum(a.aclick) is not null and sum(a.aclick)!=0) then
-        concat(round(ifnull(sum(a.bclick),0)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'bclickRate', -- 行为率
+        concat(round(ifnull(sum(a.bclick),0)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'bclickRate',
         (case
         (case
         when (sum(a.photo_show) is not null and sum(a.photo_show) != 0)
         when (sum(a.photo_show) is not null and sum(a.photo_show) != 0)
         then round((ifnull(sum(a.charge),0) / sum(a.photo_show)) * 1000,2)
         then round((ifnull(sum(a.charge),0) / sum(a.photo_show)) * 1000,2)
         else 0
         else 0
         end
         end
-        ) as 'impression1kCost', -- 均千次封面曝光花费
+        ) as 'impression1kCost',
         (case
         (case
         when (sum(a.photo_click) is not null and sum(a.photo_click) != 0)
         when (sum(a.photo_click) is not null and sum(a.photo_click) != 0)
         then round( ifnull(sum(a.charge),0) / sum(a.photo_click),2)
         then round( ifnull(sum(a.charge),0) / sum(a.photo_click),2)
         else 0
         else 0
         end
         end
-        ) as 'photoClickCost', -- 平均封面点击单价
+        ) as 'photoClickCost',
         (CASE
         (CASE
         WHEN ( sum(a.bclick) is not null and sum(a.bclick) != 0)
         WHEN ( sum(a.bclick) is not null and sum(a.bclick) != 0)
         THEN round(sum(a.charge) / sum(a.bclick),2)
         THEN round(sum(a.charge) / sum(a.bclick),2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'actionCost', -- 平均行为单价
-        ifnull(sum(a.photo_share),0) as 'photoShare', -- 分享数
-        ifnull(sum(a.photo_comment),0) as 'photoComment', -- 评论数
-        ifnull(sum(a.photo_like),0) as 'photoLike', -- 点赞数
-        ifnull(sum(a.follow),0) as 'follow', -- 新增关注数
-        ifnull(sum(a.report),0) as 'report', -- 举报数
-        ifnull(sum(a.cancel_follow),0) as 'cancelFollow', -- 取消关注数
-        ifnull(sum(a.block),0) as 'block', -- 拉黑数
-        ifnull(sum(a.negative),0) as 'nagative', -- 减少此类作品数
-        ifnull(sum(a.download_started),0) as 'downloadStarted', -- 应用下载数据-安卓下载开始数
-        ifnull(sum(a.download_completed),0) as 'downloadCompleted', -- 应用下载数据-安卓下载完成数
+        ) as 'actionCost',
+        ifnull(sum(a.photo_share),0) as 'photoShare',
+        ifnull(sum(a.photo_comment),0) as 'photoComment',
+        ifnull(sum(a.photo_like),0) as 'photoLike',
+        ifnull(sum(a.follow),0) as 'follow',
+        ifnull(sum(a.report),0) as 'report',
+        ifnull(sum(a.cancel_follow),0) as 'cancelFollow',
+        ifnull(sum(a.block),0) as 'block',
+        ifnull(sum(a.negative),0) as 'nagative',
+        ifnull(sum(a.download_started),0) as 'downloadStarted',
+        ifnull(sum(a.download_completed),0) as 'downloadCompleted',
         (CASE
         (CASE
         WHEN ( sum(a.event_next_day_stay) is not null and sum(a.event_next_day_stay) != 0)
         WHEN ( sum(a.event_next_day_stay) is not null and sum(a.event_next_day_stay) != 0)
         THEN round( ifnull(sum(a.charge),0) / sum(a.event_next_day_stay) ,2)
         THEN round( ifnull(sum(a.charge),0) / sum(a.event_next_day_stay) ,2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'eventNextDayStayCost' -- 次日留存成本
+        ) as 'eventNextDayStayCost'
         from
         from
         ctop_kuaishou_report_daily_account a
         ctop_kuaishou_report_daily_account a
         left join ctop_user_allocation b
         left join ctop_user_allocation b
@@ -710,10 +710,10 @@
         group by b.project_id order by sum(a.charge) desc
         group by b.project_id order by sum(a.charge) desc
     </select>
     </select>
 
 
-    <!-- 计划汇总 -->
+
     <select id="getKuaishouCampaignInfoByAccountId"
     <select id="getKuaishouCampaignInfoByAccountId"
             resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccountDTO">
             resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccountDTO">
-        -- select * from(
+
         select
         select
         #{yn} as 'yn',
         #{yn} as 'yn',
         concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
         concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
@@ -721,55 +721,55 @@
         (select project_name from ctop_project where id = b.project_id) as 'projectName',
         (select project_name from ctop_project where id = b.project_id) as 'projectName',
         b.auth_name as 'authName',
         b.auth_name as 'authName',
         a.account_id as 'accountId',
         a.account_id as 'accountId',
-        a.campaign_id as 'campaignId', -- 计划id
-        a.campaign_name as 'campaignName', -- 计划名称
+        a.campaign_id as 'campaignId',
+        a.campaign_name as 'campaignName',
         round(sum(a.charge),2) as 'charge',
         round(sum(a.charge),2) as 'charge',
-        sum(a.photo_show) as 'photoShow', -- 封面曝光数
-        sum(a.photo_click) as 'photoClick', -- 封面点击数
-        sum(a.aclick) as 'aclick', -- 素材曝光数
-        sum(a.bclick) as 'bclick', -- 行为数
-        sum(a.activation) as 'activation', -- 激活数
-        sum(a.submit) as 'submit', -- 提交按钮点击数
-        sum(a.event_register) as 'eventRegister', -- 注册数
-        sum(event_next_day_stay) as 'eventNextDayStay', -- 次日留存数
-        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost', -- 激活成本
+        sum(a.photo_show) as 'photoShow',
+        sum(a.photo_click) as 'photoClick',
+        sum(a.aclick) as 'aclick',
+        sum(a.bclick) as 'bclick',
+        sum(a.activation) as 'activation',
+        sum(a.submit) as 'submit',
+        sum(a.event_register) as 'eventRegister',
+        sum(event_next_day_stay) as 'eventNextDayStay',
+        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost',
         case when photo_show!=0 then concat(round(sum(a.photo_click)/sum(a.photo_show) * 100 ,2),'%') else 0 end as
         case when photo_show!=0 then concat(round(sum(a.photo_click)/sum(a.photo_show) * 100 ,2),'%') else 0 end as
-        'photoClickRatio', -- 封面点击率
-        case when aclick!=0 then concat(round(sum(a.bclick)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'actionRate', --
+        'photoClickRatio',
+        case when aclick!=0 then concat(round(sum(a.bclick)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'actionRate',
         (case
         (case
         when sum(a.photo_show) != 0
         when sum(a.photo_show) != 0
         then round((sum(a.charge) / sum(a.photo_show)) * 1000,2)
         then round((sum(a.charge) / sum(a.photo_show)) * 1000,2)
         else 0
         else 0
         end
         end
-        ) as 'impression1kCost', -- 均千次封面曝光花费
+        ) as 'impression1kCost',
         (case
         (case
         when sum(a.photo_click) != 0
         when sum(a.photo_click) != 0
         then round(sum(a.charge) / sum(a.photo_click),2)
         then round(sum(a.charge) / sum(a.photo_click),2)
         else 0
         else 0
         end
         end
-        ) as 'photoClickCost', -- 平均封面点击单价
+        ) as 'photoClickCost',
         (CASE
         (CASE
         WHEN sum(a.bclick) != 0
         WHEN sum(a.bclick) != 0
         THEN round(sum(a.charge) / sum(a.bclick),2)
         THEN round(sum(a.charge) / sum(a.bclick),2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'actionCost', -- 平均行为单价
-        sum(a.photo_share) as 'photoShare', -- 分享数
-        sum(a.photo_comment) as 'photoComment', -- 评论数
-        sum(a.photo_like) as 'photoLike', -- 点赞数
-        sum(a.follow) as 'follow', -- 新增关注数
-        sum(a.report) as 'report', -- 举报数
-        sum(a.cancel_follow) as 'cancelFollow', -- 取消关注数
-        sum(a.block) as 'block', -- 拉黑数
-        sum(a.negative) as 'nagative', -- 减少此类作品数
-        sum(a.download_started) as 'downloadStarted', -- 应用下载数据-安卓下载开始数
-        sum(a.download_completed) as 'downloadCompleted', -- 应用下载数据-安卓下载完成数
+        ) as 'actionCost',
+        sum(a.photo_share) as 'photoShare',
+        sum(a.photo_comment) as 'photoComment',
+        sum(a.photo_like) as 'photoLike',
+        sum(a.follow) as 'follow',
+        sum(a.report) as 'report',
+        sum(a.cancel_follow) as 'cancelFollow',
+        sum(a.block) as 'block',
+        sum(a.negative) as 'nagative',
+        sum(a.download_started) as 'downloadStarted',
+        sum(a.download_completed) as 'downloadCompleted',
         (CASE
         (CASE
         WHEN sum(a.event_next_day_stay) != 0
         WHEN sum(a.event_next_day_stay) != 0
         THEN round(sum(a.charge) / sum(a.event_next_day_stay),2)
         THEN round(sum(a.charge) / sum(a.event_next_day_stay),2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'eventNextDayStayCost' -- 次日留存成本
+        ) as 'eventNextDayStayCost'
         from
         from
         ctop_kuaishou_report_daily_campaign a
         ctop_kuaishou_report_daily_campaign a
         left join ctop_user_allocation b on a.account_id = b.account_id
         left join ctop_user_allocation b on a.account_id = b.account_id
@@ -798,18 +798,13 @@
         </if>
         </if>
         group by a.campaign_id
         group by a.campaign_id
         order by sum(a.charge) desc
         order by sum(a.charge) desc
-        <!--        ) m-->
 
 
-        <!--        <if test="yn = 1">-->
-        <!--            where-->
-        <!--            m.charge != 0-->
-        <!--        </if>-->
     </select>
     </select>
 
 
-    <!-- 根据计划id获取组信息 -->
+
     <select id="getKuaishouUnitInfoByCampaignId"
     <select id="getKuaishouUnitInfoByCampaignId"
             resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccountDTO">
             resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccountDTO">
-        -- select * from (
+
         select
         select
         #{yn} as 'yn',
         #{yn} as 'yn',
         concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
         concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
@@ -817,61 +812,61 @@
         (select project_name from ctop_project where id = b.project_id) as 'projectName',
         (select project_name from ctop_project where id = b.project_id) as 'projectName',
         a.account_id as 'accountId',
         a.account_id as 'accountId',
         b.auth_name as 'authName',
         b.auth_name as 'authName',
-        a.campaign_id as 'campaignId', -- 计划id
-        a.campaign_name as 'campaignName', -- 计划名称
-        a.unit_id as 'unitId', -- 组id,
-        a.unit_name as 'unitName', -- 组名称
+        a.campaign_id as 'campaignId',
+        a.campaign_name as 'campaignName',
+        a.unit_id as 'unitId',
+        a.unit_name as 'unitName',
         round(sum(a.charge),2) as 'charge',
         round(sum(a.charge),2) as 'charge',
-        sum(a.photo_show) as 'photoShow', -- 封面曝光数
-        sum(a.photo_click) as 'photoClick', -- 封面点击数
-        sum(a.aclick) as 'aclick', -- 素材曝光数
-        sum(a.bclick) as 'bclick', -- 行为数
-        sum(a.activation) as 'activation', -- 激活数
-        sum(a.submit) as 'submit', -- 提交按钮点击数
-        sum(a.event_register) as 'eventRegister', -- 注册数
-        sum(event_next_day_stay) as 'eventNextDayStay', -- 次日留存数
-        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost', -- 激活成本
+        sum(a.photo_show) as 'photoShow',
+        sum(a.photo_click) as 'photoClick',
+        sum(a.aclick) as 'aclick',
+        sum(a.bclick) as 'bclick',
+        sum(a.activation) as 'activation',
+        sum(a.submit) as 'submit',
+        sum(a.event_register) as 'eventRegister',
+        sum(event_next_day_stay) as 'eventNextDayStay',
+        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost',
         case when photo_show!=0 then concat(round(sum(a.photo_click)/sum(a.photo_show) * 100 ,2),'%') else 0 end as
         case when photo_show!=0 then concat(round(sum(a.photo_click)/sum(a.photo_show) * 100 ,2),'%') else 0 end as
-        'photoClickRatio', -- 封面点击率
+        'photoClickRatio',
         case when aclick!=0 then concat(round(sum(a.bclick)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'actionRate',
         case when aclick!=0 then concat(round(sum(a.bclick)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'actionRate',
         (case
         (case
         when sum(a.photo_show) != 0
         when sum(a.photo_show) != 0
         then round((sum(a.charge) / sum(a.photo_show)) * 1000,2)
         then round((sum(a.charge) / sum(a.photo_show)) * 1000,2)
         else 0
         else 0
         end
         end
-        ) as 'impression1kCost', -- 均千次封面曝光花费
+        ) as 'impression1kCost',
         (case
         (case
         when sum(a.photo_click) != 0
         when sum(a.photo_click) != 0
         then round(sum(a.charge) / sum(a.photo_click),2)
         then round(sum(a.charge) / sum(a.photo_click),2)
         else 0
         else 0
         end
         end
-        ) as 'photoClickCost', -- 平均封面点击单价
+        ) as 'photoClickCost',
         (CASE
         (CASE
         WHEN sum(a.bclick) != 0
         WHEN sum(a.bclick) != 0
         THEN round(sum(a.charge) / sum(a.bclick),2)
         THEN round(sum(a.charge) / sum(a.bclick),2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'actionCost', -- 平均行为单价
-        sum(a.photo_share) as 'photoShare', -- 分享数
-        sum(a.photo_comment) as 'photoComment', -- 评论数
-        sum(a.photo_like) as 'photoLike', -- 点赞数
-        sum(a.follow) as 'follow', -- 新增关注数
-        sum(a.report) as 'report', -- 举报数
-        sum(a.cancel_follow) as 'cancelFollow', -- 取消关注数
-        sum(a.block) as 'block', -- 拉黑数
-        sum(a.negative) as 'nagative', -- 减少此类作品数
-        sum(a.download_started) as 'downloadStarted', -- 应用下载数据-安卓下载开始数
-        sum(a.download_completed) as 'downloadCompleted', -- 应用下载数据-安卓下载完成数
+        ) as 'actionCost',
+        sum(a.photo_share) as 'photoShare',
+        sum(a.photo_comment) as 'photoComment',
+        sum(a.photo_like) as 'photoLike',
+        sum(a.follow) as 'follow',
+        sum(a.report) as 'report',
+        sum(a.cancel_follow) as 'cancelFollow',
+        sum(a.block) as 'block',
+        sum(a.negative) as 'nagative',
+        sum(a.download_started) as 'downloadStarted',
+        sum(a.download_completed) as 'downloadCompleted',
         (CASE
         (CASE
         WHEN sum(a.event_next_day_stay) != 0
         WHEN sum(a.event_next_day_stay) != 0
         THEN round(sum(a.charge) / sum(a.event_next_day_stay),2)
         THEN round(sum(a.charge) / sum(a.event_next_day_stay),2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'eventNextDayStayCost' -- 次日留存成本
+        ) as 'eventNextDayStayCost'
         from
         from
         ctop_kuaishou_report_daily_group a
         ctop_kuaishou_report_daily_group a
         left join ctop_user_allocation b on a.account_id = b.account_id
         left join ctop_user_allocation b on a.account_id = b.account_id
-        -- left join ctop_kuaishou_campaign c on a.campaign_id = c.campaign_id
+
         where
         where
         a.stat_date &gt;= #{startDate}
         a.stat_date &gt;= #{startDate}
         and
         and
@@ -897,11 +892,7 @@
         </if>
         </if>
         group by unit_id
         group by unit_id
         order by sum(a.charge) desc
         order by sum(a.charge) desc
-        <!--            ) m-->
-        <!--        <if test="yn = 1">-->
-        <!--            where-->
-        <!--            m.charge != 0-->
-        <!--        </if>-->
+
     </select>
     </select>
 
 
     <select id="queryProjectMemberByUserId" resultType="long">
     <select id="queryProjectMemberByUserId" resultType="long">
@@ -922,14 +913,6 @@
     <select id="queryProjectInfoBySaleId" resultType="long">
     <select id="queryProjectInfoBySaleId" resultType="long">
         select
         select
         distinct c.id as projectId
         distinct c.id as projectId
-        -- c.project_name as projectName,
-        -- a.advertiser_id as advertiserId,
-        -- c.advertiser_name as advertiserName,
-        -- (SELECT media_id from ctop_project c where c.id=a.project_id limit 1) as mediaId,
-        -- c.responsible_name as responsibleName,
-        -- c.design_responsible_name as designResponsibleName,
-        -- c.sale_id as saleId,
-        -- u.realname as saleName
         from
         from
         ctop_project c
         ctop_project c
         left join sys_user u on c.sale_id = u.id
         left join sys_user u on c.sale_id = u.id
@@ -946,9 +929,7 @@
         select
         select
         distinct id as projectId,
         distinct id as projectId,
         project_name as projectName,
         project_name as projectName,
-        -- a.advertiser_id as advertiserId,
         advertiser_name as advertiserName,
         advertiser_name as advertiserName,
-        -- (SELECT media_id from ctop_project c where c.id=a.project_id limit 1) as mediaId,
         responsible_name as responsibleName,
         responsible_name as responsibleName,
         design_responsible_name as designResponsibleName
         design_responsible_name as designResponsibleName
         from ctop_project
         from ctop_project
@@ -970,14 +951,10 @@
         where a.user_id = #{userId}
         where a.user_id = #{userId}
     </select>
     </select>
 
 
-    <!-- 管理员所在项目 -->
+
     <select id="queryProjectMemberByAdmins" resultType="long">
     <select id="queryProjectMemberByAdmins" resultType="long">
         select
         select
         id as projectId
         id as projectId
-        -- project_name as projectName,
-        -- advertiser_name as advertiserName ,
-        -- responsible_name as responsibleName,
-        -- design_responsible_name as designResponsibleName
         from
         from
         ctop_project
         ctop_project
         where
         where
@@ -991,7 +968,7 @@
 
 
     <select id="getKuaishouCreativeInfoByUnitId"
     <select id="getKuaishouCreativeInfoByUnitId"
             resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccountDTO">
             resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccountDTO">
-        -- select * from (
+
         select
         select
         #{yn} as 'yn',
         #{yn} as 'yn',
         concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
         concat(#{startDate}, '~' ,#{endDate}) as 'statDate',
@@ -1001,57 +978,57 @@
         b.auth_name as 'authName',
         b.auth_name as 'authName',
         a.creative_id as 'creativeId',
         a.creative_id as 'creativeId',
         a.creative_name as 'creativeName',
         a.creative_name as 'creativeName',
-        a.campaign_id as 'campaignId', -- 计划id
-        a.campaign_name as 'campaignName', -- 计划名称
-        a.unit_id as 'unitId', -- 组id,
-        a.unit_name as 'unitName', -- 组名称
+        a.campaign_id as 'campaignId',
+        a.campaign_name as 'campaignName',
+        a.unit_id as 'unitId',
+        a.unit_name as 'unitName',
         round(sum(a.charge),2) as 'charge',
         round(sum(a.charge),2) as 'charge',
-        sum(a.photo_show) as 'photoShow', -- 封面曝光数
-        sum(a.photo_click) as 'photoClick', -- 封面点击数
-        sum(a.aclick) as 'aclick', -- 素材曝光数
-        sum(a.bclick) as 'bclick', -- 行为数
-        sum(a.activation) as 'activation', -- 激活数
-        sum(a.submit) as 'submit', -- 提交按钮点击数
-        sum(a.event_register) as 'eventRegister', -- 注册数
-        sum(event_next_day_stay) as 'eventNextDayStay', -- 次日留存数
-        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost', -- 激活成本
+        sum(a.photo_show) as 'photoShow',
+        sum(a.photo_click) as 'photoClick',
+        sum(a.aclick) as 'aclick',
+        sum(a.bclick) as 'bclick',
+        sum(a.activation) as 'activation',
+        sum(a.submit) as 'submit',
+        sum(a.event_register) as 'eventRegister',
+        sum(event_next_day_stay) as 'eventNextDayStay',
+        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost',
         case when photo_show!=0 then concat(round(sum(a.photo_click)/sum(a.photo_show) * 100 ,2),'%') else 0 end as
         case when photo_show!=0 then concat(round(sum(a.photo_click)/sum(a.photo_show) * 100 ,2),'%') else 0 end as
-        'photoClickRatio', -- 封面点击率
+        'photoClickRatio',
         case when aclick!=0 then concat(round(sum(a.bclick)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'actionRate',
         case when aclick!=0 then concat(round(sum(a.bclick)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'actionRate',
         (case
         (case
         when sum(a.photo_show) != 0 and sum(a.photo_show) is not null
         when sum(a.photo_show) != 0 and sum(a.photo_show) is not null
         then round((sum(a.charge) / sum(a.photo_show)) * 1000,2)
         then round((sum(a.charge) / sum(a.photo_show)) * 1000,2)
         else 0
         else 0
         end
         end
-        ) as 'impression1kCost', -- 均千次封面曝光花费
+        ) as 'impression1kCost',
         (case
         (case
         when sum(a.photo_click) != 0
         when sum(a.photo_click) != 0
         then round(sum(a.charge) / sum(a.photo_click),2)
         then round(sum(a.charge) / sum(a.photo_click),2)
         else 0
         else 0
         end
         end
-        ) as 'photoClickCost', -- 平均封面点击单价
+        ) as 'photoClickCost',
         (CASE
         (CASE
         WHEN sum(a.bclick) != 0
         WHEN sum(a.bclick) != 0
         THEN round(sum(a.charge) / sum(a.bclick),2)
         THEN round(sum(a.charge) / sum(a.bclick),2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'actionCost', -- 平均行为单价
-        sum(a.photo_share) as 'photoShare', -- 分享数
-        sum(a.photo_comment) as 'photoComment', -- 评论数
-        sum(a.photo_like) as 'photoLike', -- 点赞数
-        sum(a.follow) as 'follow', -- 新增关注数
-        sum(a.report) as 'report', -- 举报数
-        sum(a.cancel_follow) as 'cancelFollow', -- 取消关注数
-        sum(a.block) as 'block', -- 拉黑数
-        sum(a.negative) as 'nagative', -- 减少此类作品数
-        sum(a.download_started) as 'downloadStarted', -- 应用下载数据-安卓下载开始数
-        sum(a.download_completed) as 'downloadCompleted', -- 应用下载数据-安卓下载完成数
+        ) as 'actionCost',
+        sum(a.photo_share) as 'photoShare',
+        sum(a.photo_comment) as 'photoComment',
+        sum(a.photo_like) as 'photoLike',
+        sum(a.follow) as 'follow',
+        sum(a.report) as 'report',
+        sum(a.cancel_follow) as 'cancelFollow',
+        sum(a.block) as 'block',
+        sum(a.negative) as 'nagative',
+        sum(a.download_started) as 'downloadStarted',
+        sum(a.download_completed) as 'downloadCompleted',
         (CASE
         (CASE
         WHEN sum(a.event_next_day_stay) != 0
         WHEN sum(a.event_next_day_stay) != 0
         THEN round(sum(a.charge) / sum(a.event_next_day_stay),2)
         THEN round(sum(a.charge) / sum(a.event_next_day_stay),2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'eventNextDayStayCost', -- 次日留存成本
+        ) as 'eventNextDayStayCost',
         (select url from ctop_kuaishou_video_get where photo_id = c.photo_id limit 1) as url,
         (select url from ctop_kuaishou_video_get where photo_id = c.photo_id limit 1) as url,
         (select cover_url from ctop_kuaishou_video_get where photo_id = c.photo_id limit 1) as coverUrl,
         (select cover_url from ctop_kuaishou_video_get where photo_id = c.photo_id limit 1) as coverUrl,
         (select material_type from ctop_kuaishou_video_get where photo_id = c.photo_id limit 1) as materialType
         (select material_type from ctop_kuaishou_video_get where photo_id = c.photo_id limit 1) as materialType
@@ -1085,13 +1062,10 @@
         </if>
         </if>
         group by a.creative_id
         group by a.creative_id
         order by sum(a.charge) desc
         order by sum(a.charge) desc
-        <!--        )m-->
-        <!--        <if test="yn=1">-->
-        <!--            where m.charge != 0-->
-        <!--        </if>-->
+
     </select>
     </select>
 
 
-    <!-- 获取项目成员所在所有项目下的所有账户id -->
+
     <select id="getVideoUrl" resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouVideoInfoDTO">
     <select id="getVideoUrl" resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouVideoInfoDTO">
         select
         select
         url as url,
         url as url,
@@ -1167,53 +1141,53 @@
         )
         )
         ) as 'designResponsibleName',
         ) as 'designResponsibleName',
         ifnull(round(sum(a.charge),3),0) as 'charge',
         ifnull(round(sum(a.charge),3),0) as 'charge',
-        ifnull(sum(a.photo_show),0) as 'photoShow', -- 封面曝光数
-        ifnull(sum(a.photo_click),0) as 'photoClick', -- 封面点击数
-        ifnull(sum(a.aclick),0) as 'aclick', -- 素材曝光数
-        ifnull(sum(a.bclick),0) as 'bclick', -- 行为数
-        ifnull(sum(a.activation),0) as 'activation', -- 激活数
-        ifnull(sum(a.submit),0) as 'submit', -- 提交按钮点击数
-        ifnull(sum(a.event_register),0) as 'eventRegister', -- 注册数
-        ifnull(sum(event_next_day_stay),0) as 'eventNextDayStay', -- 次日留存数
-        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost', -- 激活成本
+        ifnull(sum(a.photo_show),0) as 'photoShow',
+        ifnull(sum(a.photo_click),0) as 'photoClick',
+        ifnull(sum(a.aclick),0) as 'aclick',
+        ifnull(sum(a.bclick),0) as 'bclick',
+        ifnull(sum(a.activation),0) as 'activation',
+        ifnull(sum(a.submit),0) as 'submit',
+        ifnull(sum(a.event_register),0) as 'eventRegister',
+        ifnull(sum(event_next_day_stay),0) as 'eventNextDayStay',
+        ROUND(IFNULL(sum(a.charge)/sum(a.activation),0),2) as 'activationCost',
         case when (sum(a.photo_show) is not null and sum(a.photo_show)!=0) then
         case when (sum(a.photo_show) is not null and sum(a.photo_show)!=0) then
         concat(round(ifnull(sum(a.photo_click),0)/sum(a.photo_show) * 100 ,2),'%') else 0 end as 'photoClickRate',
         concat(round(ifnull(sum(a.photo_click),0)/sum(a.photo_show) * 100 ,2),'%') else 0 end as 'photoClickRate',
         case when (sum(a.aclick) is not null and sum(a.aclick)!=0) then
         case when (sum(a.aclick) is not null and sum(a.aclick)!=0) then
-        concat(round(ifnull(sum(a.bclick),0)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'bclickRate', -- 行为率
+        concat(round(ifnull(sum(a.bclick),0)/sum(a.aclick) * 100 ,2),'%') else 0 end as 'bclickRate',
         (case
         (case
         when (sum(a.photo_show) is not null and sum(a.photo_show) != 0)
         when (sum(a.photo_show) is not null and sum(a.photo_show) != 0)
         then round((ifnull(sum(a.charge),0) / sum(a.photo_show)) * 1000,2)
         then round((ifnull(sum(a.charge),0) / sum(a.photo_show)) * 1000,2)
         else 0
         else 0
         end
         end
-        ) as 'impression1kCost', -- 均千次封面曝光花费
+        ) as 'impression1kCost',
         (case
         (case
         when (sum(a.photo_click) is not null and sum(a.photo_click) != 0)
         when (sum(a.photo_click) is not null and sum(a.photo_click) != 0)
         then round( ifnull(sum(a.charge),0) / sum(a.photo_click),2)
         then round( ifnull(sum(a.charge),0) / sum(a.photo_click),2)
         else 0
         else 0
         end
         end
-        ) as 'photoClickCost', -- 平均封面点击单价
+        ) as 'photoClickCost',
         (CASE
         (CASE
         WHEN ( sum(a.bclick) is not null and sum(a.bclick) != 0)
         WHEN ( sum(a.bclick) is not null and sum(a.bclick) != 0)
         THEN round(sum(a.charge) / sum(a.bclick),2)
         THEN round(sum(a.charge) / sum(a.bclick),2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'actionCost', -- 平均行为单价
-        ifnull(sum(a.photo_share),0) as 'photoShare', -- 分享数
-        ifnull(sum(a.photo_comment),0) as 'photoComment', -- 评论数
-        ifnull(sum(a.photo_like),0) as 'photoLike', -- 点赞数
-        ifnull(sum(a.follow),0) as 'follow', -- 新增关注数
-        ifnull(sum(a.report),0) as 'report', -- 举报数
-        ifnull(sum(a.cancel_follow),0) as 'cancelFollow', -- 取消关注数
-        ifnull(sum(a.block),0) as 'block', -- 拉黑数
-        ifnull(sum(a.negative),0) as 'nagative', -- 减少此类作品数
-        ifnull(sum(a.download_started),0) as 'downloadStarted', -- 应用下载数据-安卓下载开始数
-        ifnull(sum(a.download_completed),0) as 'downloadCompleted', -- 应用下载数据-安卓下载完成数
+        ) as 'actionCost',
+        ifnull(sum(a.photo_share),0) as 'photoShare',
+        ifnull(sum(a.photo_comment),0) as 'photoComment',
+        ifnull(sum(a.photo_like),0) as 'photoLike',
+        ifnull(sum(a.follow),0) as 'follow',
+        ifnull(sum(a.report),0) as 'report',
+        ifnull(sum(a.cancel_follow),0) as 'cancelFollow',
+        ifnull(sum(a.block),0) as 'block',
+        ifnull(sum(a.negative),0) as 'nagative',
+        ifnull(sum(a.download_started),0) as 'downloadStarted',
+        ifnull(sum(a.download_completed),0) as 'downloadCompleted',
         (CASE
         (CASE
         WHEN ( sum(a.event_next_day_stay) is not null and sum(a.event_next_day_stay) != 0)
         WHEN ( sum(a.event_next_day_stay) is not null and sum(a.event_next_day_stay) != 0)
         THEN round( ifnull(sum(a.charge),0) / sum(a.event_next_day_stay) ,2)
         THEN round( ifnull(sum(a.charge),0) / sum(a.event_next_day_stay) ,2)
         ELSE 0
         ELSE 0
         end
         end
-        ) as 'eventNextDayStayCost' -- 次日留存成本
+        ) as 'eventNextDayStayCost'
         from
         from
         ctop_kuaishou_report_daily_account a
         ctop_kuaishou_report_daily_account a
         left join ctop_user_allocation b
         left join ctop_user_allocation b

+ 36 - 36
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyAgentSumMapper.xml

@@ -2,24 +2,24 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAgentSumMapper">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAgentSumMapper">
 
 
-    <!-- 公司报表sql -->
+
     <select id="companyReport" resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAgentSum">
     <select id="companyReport" resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAgentSum">
             select
             select
-            date_format(date, '%Y-%m-%d') as date,  <!-- 日期 -->
-            cost_campaign_count as costCampaignCount,  <!-- 有消费计划数 -->
-            balance as balance,  <!-- 总余额 -->
-            cost as cost,  <!-- 总消耗 -->
-            xianjin_cost as xianjinCost,  <!-- 现金消耗 -->
-            fandian_cost as fandianCost,  <!-- 后返消耗 -->
-            kuangfan_cost as kuangfanCost,  <!-- 框返消耗 -->
-            jili_cost as jiliCost,  <!-- 激励账户消耗 -->
-            xinyong_cost as xinyongCost,  <!-- 信用账户消耗 -->
-            fengmian_show_count as fengmianShowCount,  <!-- 封面曝光数 -->
-            fengmian_click_count as fengmianClickCount,  <!-- 封面点击数 -->
-            sucai_show_count as sucaiShowCount,  <!-- 素材曝光数 -->
-            convert_count as convertCount,  <!-- 行为数 -->
-            fengmian_click_rate as fengmianClickRate,  <!-- 封面点击率 -->
-            convert_click_rate as convertClickRate  <!-- 转化点击率 -->
+            date_format(date, '%Y-%m-%d') as date,
+            cost_campaign_count as costCampaignCount,
+            balance as balance,
+            cost as cost,
+            xianjin_cost as xianjinCost,
+            fandian_cost as fandianCost,
+            kuangfan_cost as kuangfanCost,
+            jili_cost as jiliCost,
+            xinyong_cost as xinyongCost,
+            fengmian_show_count as fengmianShowCount,
+            fengmian_click_count as fengmianClickCount,
+            sucai_show_count as sucaiShowCount,
+            convert_count as convertCount,
+            fengmian_click_rate as fengmianClickRate,
+            convert_click_rate as convertClickRate
         from
         from
         ctop_kuaishou_report_daily_agent_sum
         ctop_kuaishou_report_daily_agent_sum
         where
         where
@@ -30,20 +30,20 @@
 
 
     <select id="companyReportSum" resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAgentSum">
     <select id="companyReportSum" resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAgentSum">
         select
         select
-        sum(cost_campaign_count) as costCampaignCount,  <!-- 有消费计划数 -->
-        sum(balance) as balance,  <!-- 总余额 -->
-        sum(cost) as cost,  <!-- 总消耗 -->
-        sum(xianjin_cost) as xianjinCost,  <!-- 现金消耗 -->
-        sum(fandian_cost) as fandianCost,  <!-- 后返消耗 -->
-        sum(kuangfan_cost) as kuangfanCost,  <!-- 框返消耗 -->
-        sum(jili_cost) as jiliCost,  <!-- 激励账户消耗 -->
-        sum(xinyong_cost) as xinyongCost,  <!-- 信用账户消耗 -->
-        sum(fengmian_show_count) as fengmianShowCount,  <!-- 封面曝光数 -->
-        sum(fengmian_click_count) as fengmianClickCount,  <!-- 封面点击数 -->
-        sum(sucai_show_count) as sucaiShowCount,  <!-- 素材曝光数 -->
-        sum(convert_count) as convertCount,  <!-- 行为数 -->
-        sum(fengmian_click_rate) as fengmianClickRate,  <!-- 封面点击率 -->
-        sum(convert_click_rate) as convertClickRate  <!-- 转化点击率 -->
+        sum(cost_campaign_count) as costCampaignCount,
+        sum(balance) as balance,
+        sum(cost) as cost,
+        sum(xianjin_cost) as xianjinCost,
+        sum(fandian_cost) as fandianCost,
+        sum(kuangfan_cost) as kuangfanCost,
+        sum(jili_cost) as jiliCost,
+        sum(xinyong_cost) as xinyongCost,
+        sum(fengmian_show_count) as fengmianShowCount,
+        sum(fengmian_click_count) as fengmianClickCount,
+        sum(sucai_show_count) as sucaiShowCount,
+        sum(convert_count) as convertCount,
+        sum(fengmian_click_rate) as fengmianClickRate,
+        sum(convert_click_rate) as convertClickRate
         from
         from
         ctop_kuaishou_report_daily_agent_sum
         ctop_kuaishou_report_daily_agent_sum
         where
         where
@@ -51,14 +51,14 @@
         date &gt;= #{startDate}
         date &gt;= #{startDate}
     </select>
     </select>
 
 
-    <!-- 根据传入时间获取公司报表账户的列表 -->
+
     <select id="companyReportAccountDetailList" resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAgent">
     <select id="companyReportAccountDetailList" resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAgent">
             select
             select
-            date_format(date, '%Y-%m-%d') as date,  <!-- 日期 -->
-            account_id as accountId,  <!-- 账户id -->
-            kid as kid, <!-- 快手id -->
-            advertiser_name as advertiserName, <!-- 广告主名称 -->
-            advertiser_create_time as advertiserCreateTime, <!-- 广告主创建时间 -->
+            date_format(date, '%Y-%m-%d') as date,
+            account_id as accountId,
+            kid as kid,
+            advertiser_name as advertiserName,
+            advertiser_create_time as advertiserCreateTime,
             cost_campaign_count as costCampaignCount, <!-- 有消费计划数 -->
             cost_campaign_count as costCampaignCount, <!-- 有消费计划数 -->
             balance as balance, <!-- 总余额 -->
             balance as balance, <!-- 总余额 -->
             cost as cost, <!-- 总消耗 -->
             cost as cost, <!-- 总消耗 -->

+ 78 - 78
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/MaterialReportMapper.xml

@@ -13,45 +13,45 @@
 
 
     <select id="selectByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         SELECT
-        sum(t2.charge) cost, -- 花费
-        sum(t2.photo_show) photoShow, -- 封面曝光数
-        sum(t2.photo_click) photoClick, -- 封面点击数
-        sum(t2.aclick) aclick, -- 素材曝光数
-        sum(t2.bclick) bclick, -- 行为数
+        sum(t2.charge) cost,
+        sum(t2.photo_show) photoShow,
+        sum(t2.photo_click) photoClick,
+        sum(t2.aclick) aclick,
+        sum(t2.bclick) bclick,
         (case
         (case
         when sum(photo_show) != 0
         when sum(photo_show) != 0
         then (sum(t2.photo_click) / sum(photo_show))
         then (sum(t2.photo_click) / sum(photo_show))
         else 0
         else 0
         end
         end
-        ) photoClickRatio, -- 封面点击率
+        ) photoClickRatio,
 
 
         (case
         (case
         when sum(aclick) != 0
         when sum(aclick) != 0
         then (sum(t2.bclick) / sum(aclick))
         then (sum(t2.bclick) / sum(aclick))
         else 0
         else 0
         end
         end
-        ) actionRatio, -- 行为率
+        ) actionRatio,
 
 
         (case
         (case
         when sum(t2.photo_show) != 0
         when sum(t2.photo_show) != 0
         then ((sum(t2.charge) / sum(t2.photo_show)) * 1000)
         then ((sum(t2.charge) / sum(t2.photo_show)) * 1000)
         else 0
         else 0
         end
         end
-        ) impression1kCost, -- 均千次封面曝光花费
+        ) impression1kCost,
 
 
         (case
         (case
         when sum(t2.photo_click) != 0
         when sum(t2.photo_click) != 0
         then (sum(t2.charge) / sum(t2.photo_click))
         then (sum(t2.charge) / sum(t2.photo_click))
         else 0
         else 0
         end
         end
-        ) photoClickCost, -- 平均封面点击单价
+        ) photoClickCost,
 
 
         (CASE
         (CASE
         WHEN sum(t2.photo_click) != 0
         WHEN sum(t2.photo_click) != 0
         THEN (sum(t2.charge) / sum(t2.photo_click))
         THEN (sum(t2.charge) / sum(t2.photo_click))
         ELSE 0
         ELSE 0
         end
         end
-        ) actionCost, -- 平均行为单价
+        ) actionCost,
 
 
         (case
         (case
         WHEN sum(t2.form_count) != 0
         WHEN sum(t2.form_count) != 0
@@ -60,7 +60,7 @@
         THEN sum(t2.activation)
         THEN sum(t2.activation)
         ELSE 0
         ELSE 0
         END
         END
-        ) conversions, -- 转化数
+        ) conversions,
 
 
         (
         (
         CASE
         CASE
@@ -70,10 +70,10 @@
         THEN (sum(t2.charge) / sum(t2.activation))
         THEN (sum(t2.charge) / sum(t2.activation))
         ELSE 0
         ELSE 0
         END
         END
-        ) conversionPrice, -- 转化单价
+        ) conversionPrice,
         t2.photo_url as  'url',
         t2.photo_url as  'url',
         t2.cover_url as  'coverUrl',
         t2.cover_url as  'coverUrl',
-        t2.signature signature -- 视频md5
+        t2.signature signature
         from
         from
         ctop_user_allocation t1
         ctop_user_allocation t1
         left join
         left join
@@ -100,45 +100,45 @@
 
 
     <select id="selectChainRatioByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectChainRatioByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         SELECT
-        sum(charge) cost, -- 花费
-        sum(photo_show) photoShow, -- 封面曝光数
-        sum(photo_click) photoClick, -- 封面点击数
-        sum(aclick) aclick, -- 素材曝光数
-        sum(bclick) bclick, -- 行为数
+        sum(charge) cost,
+        sum(photo_show) photoShow,
+        sum(photo_click) photoClick,
+        sum(aclick) aclick,
+        sum(bclick) bclick,
         (case
         (case
         when sum(photo_show) != 0
         when sum(photo_show) != 0
         then (sum(photo_click) / sum(photo_show))
         then (sum(photo_click) / sum(photo_show))
         else 0
         else 0
         end
         end
-        ) photoClickRatio, -- 封面点击率
+        ) photoClickRatio,
 
 
         (case
         (case
         when sum(aclick) != 0
         when sum(aclick) != 0
         then (sum(bclick) / sum(aclick))
         then (sum(bclick) / sum(aclick))
         else 0
         else 0
         end
         end
-        ) actionRatio, -- 行为率
+        ) actionRatio,
 
 
         (case
         (case
         when sum(photo_show) != 0
         when sum(photo_show) != 0
         then ((sum(charge) / sum(photo_show)) * 1000)
         then ((sum(charge) / sum(photo_show)) * 1000)
         else 0
         else 0
         end
         end
-        ) impression1kCost, -- 均千次封面曝光花费
+        ) impression1kCost,
 
 
         (case
         (case
         when sum(photo_click) != 0
         when sum(photo_click) != 0
         then (sum(charge) / sum(photo_click))
         then (sum(charge) / sum(photo_click))
         else 0
         else 0
         end
         end
-        ) photoClickCost, -- 平均封面点击单价
+        ) photoClickCost,
 
 
         (CASE
         (CASE
         WHEN sum(photo_click) != 0
         WHEN sum(photo_click) != 0
         THEN (sum(charge) / sum(photo_click))
         THEN (sum(charge) / sum(photo_click))
         ELSE 0
         ELSE 0
         end
         end
-        ) actionCost, -- 平均行为单价
+        ) actionCost,
 
 
         (case
         (case
         WHEN sum(form_count) != 0
         WHEN sum(form_count) != 0
@@ -147,7 +147,7 @@
         THEN sum(activation)
         THEN sum(activation)
         ELSE 0
         ELSE 0
         END
         END
-        ) conversions, -- 转化数
+        ) conversions,
 
 
         (
         (
         CASE
         CASE
@@ -157,7 +157,7 @@
         THEN (sum(charge) / sum(activation))
         THEN (sum(charge) / sum(activation))
         ELSE 0
         ELSE 0
         END
         END
-        ) conversionPrice -- 转化单价
+        ) conversionPrice
         from
         from
         ctop_kuaishou_report_hourly_creative_statistic
         ctop_kuaishou_report_hourly_creative_statistic
 
 
@@ -184,45 +184,45 @@
     <select id="selectDailyByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectDailyByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
 
 
         SELECT
         SELECT
-        sum(t2.charge) cost, -- 花费
-        sum(t2.photo_show) photoShow, -- 封面曝光数
-        sum(t2.photo_click) photoClick, -- 封面点击数
-        sum(t2.aclick) aclick, -- 素材曝光数
-        sum(t2.bclick) bclick, -- 行为数
+        sum(t2.charge) cost,
+        sum(t2.photo_show) photoShow,
+        sum(t2.photo_click) photoClick,
+        sum(t2.aclick) aclick,
+        sum(t2.bclick) bclick,
         (case
         (case
         when sum(t2.photo_show) != 0
         when sum(t2.photo_show) != 0
         then (sum(t2.photo_click) / sum(t2.photo_show))
         then (sum(t2.photo_click) / sum(t2.photo_show))
         else 0
         else 0
         end
         end
-        ) photoClickRatio, -- 封面点击率
+        ) photoClickRatio,
 
 
         (case
         (case
         when sum(t2.aclick) != 0
         when sum(t2.aclick) != 0
         then (sum(t2.bclick) / sum(t2.aclick))
         then (sum(t2.bclick) / sum(t2.aclick))
         else 0
         else 0
         end
         end
-        ) actionRatio, -- 行为率
+        ) actionRatio,
 
 
         (case
         (case
         when sum(t2.photo_show) != 0
         when sum(t2.photo_show) != 0
         then ((sum(t2.charge) / sum(t2.photo_show)) * 1000)
         then ((sum(t2.charge) / sum(t2.photo_show)) * 1000)
         else 0
         else 0
         end
         end
-        ) impression1kCost, -- 均千次封面曝光花费
+        ) impression1kCost,
 
 
         (case
         (case
         when sum(t2.photo_click) != 0
         when sum(t2.photo_click) != 0
         then (sum(t2.charge) / sum(t2.photo_click))
         then (sum(t2.charge) / sum(t2.photo_click))
         else 0
         else 0
         end
         end
-        ) photoClickCost, -- 平均封面点击单价
+        ) photoClickCost,
 
 
         (CASE
         (CASE
         WHEN sum(t2.photo_click) != 0
         WHEN sum(t2.photo_click) != 0
         THEN (sum(t2.charge) / sum(t2.photo_click))
         THEN (sum(t2.charge) / sum(t2.photo_click))
         ELSE 0
         ELSE 0
         end
         end
-        ) actionCost, -- 平均行为单价
+        ) actionCost,
 
 
         (case
         (case
         WHEN sum(t2.form_count) != 0
         WHEN sum(t2.form_count) != 0
@@ -231,7 +231,7 @@
         THEN sum(t2.activation)
         THEN sum(t2.activation)
         ELSE 0
         ELSE 0
         END
         END
-        ) conversions, -- 转化数
+        ) conversions,
 
 
         (
         (
         CASE
         CASE
@@ -241,10 +241,10 @@
         THEN (sum(t2.charge) / sum(t2.activation))
         THEN (sum(t2.charge) / sum(t2.activation))
         ELSE 0
         ELSE 0
         END
         END
-        ) conversionPrice, -- 转化单价
+        ) conversionPrice,
         t2.photo_url as  'url',
         t2.photo_url as  'url',
         t2.cover_url as  'coverUrl',
         t2.cover_url as  'coverUrl',
-        t2.signature signature -- 视频md5
+        t2.signature signature
         from
         from
         ctop_user_allocation t1
         ctop_user_allocation t1
         left join
         left join
@@ -273,45 +273,45 @@
 
 
     <select id="selectDailyChainRatioByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectDailyChainRatioByMap" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         SELECT
-        sum(charge) cost, -- 花费
-        sum(photo_show) photoShow, -- 封面曝光数
-        sum(photo_click) photoClick, -- 封面点击数
-        sum(aclick) aclick, -- 素材曝光数
-        sum(bclick) bclick, -- 行为数
+        sum(charge) cost,
+        sum(photo_show) photoShow,
+        sum(photo_click) photoClick,
+        sum(aclick) aclick,
+        sum(bclick) bclick,
         (case
         (case
         when sum(photo_show) != 0
         when sum(photo_show) != 0
         then (sum(photo_click) / sum(photo_show))
         then (sum(photo_click) / sum(photo_show))
         else 0
         else 0
         end
         end
-        ) photoClickRatio, -- 封面点击率
+        ) photoClickRatio,
 
 
         (case
         (case
         when sum(aclick) != 0
         when sum(aclick) != 0
         then (sum(bclick) / sum(aclick))
         then (sum(bclick) / sum(aclick))
         else 0
         else 0
         end
         end
-        ) actionRatio, -- 行为率
+        ) actionRatio,
 
 
         (case
         (case
         when sum(photo_show) != 0
         when sum(photo_show) != 0
         then ((sum(charge) / sum(photo_show)) * 1000)
         then ((sum(charge) / sum(photo_show)) * 1000)
         else 0
         else 0
         end
         end
-        ) impression1kCost, -- 均千次封面曝光花费
+        ) impression1kCost,
 
 
         (case
         (case
         when sum(photo_click) != 0
         when sum(photo_click) != 0
         then (sum(charge) / sum(photo_click))
         then (sum(charge) / sum(photo_click))
         else 0
         else 0
         end
         end
-        ) photoClickCost, -- 平均封面点击单价
+        ) photoClickCost,
 
 
         (CASE
         (CASE
         WHEN sum(photo_click) != 0
         WHEN sum(photo_click) != 0
         THEN (sum(charge) / sum(photo_click))
         THEN (sum(charge) / sum(photo_click))
         ELSE 0
         ELSE 0
         end
         end
-        ) actionCost, -- 平均行为单价
+        ) actionCost,
 
 
         (case
         (case
         WHEN sum(form_count) != 0
         WHEN sum(form_count) != 0
@@ -320,7 +320,7 @@
         THEN sum(activation)
         THEN sum(activation)
         ELSE 0
         ELSE 0
         END
         END
-        ) conversions, -- 转化数
+        ) conversions,
 
 
         (
         (
         CASE
         CASE
@@ -330,7 +330,7 @@
         THEN (sum(charge) / sum(activation))
         THEN (sum(charge) / sum(activation))
         ELSE 0
         ELSE 0
         END
         END
-        ) conversionPrice -- 转化单价
+        ) conversionPrice
         from
         from
         ctop_kuaishou_report_daily_material
         ctop_kuaishou_report_daily_material
         <where>
         <where>
@@ -357,45 +357,45 @@
 
 
     <select id="selectHourMaterialList" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectHourMaterialList" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         SELECT
-        sum(t2.charge) cost, -- 花费
-        sum(t2.photo_show) photoShow, -- 封面曝光数
-        sum(t2.photo_click) photoClick, -- 封面点击数
-        sum(t2.aclick) aclick, -- 素材曝光数
-        sum(t2.bclick) bclick, -- 行为数
+        sum(t2.charge) cost,
+        sum(t2.photo_show) photoShow,
+        sum(t2.photo_click) photoClick,
+        sum(t2.aclick) aclick,
+        sum(t2.bclick) bclick,
         (case
         (case
         when sum(photo_show) != 0
         when sum(photo_show) != 0
         then (sum(t2.photo_click) / sum(photo_show))
         then (sum(t2.photo_click) / sum(photo_show))
         else 0
         else 0
         end
         end
-        ) photoClickRatio, -- 封面点击率
+        ) photoClickRatio,
 
 
         (case
         (case
         when sum(aclick) != 0
         when sum(aclick) != 0
         then (sum(t2.bclick) / sum(aclick))
         then (sum(t2.bclick) / sum(aclick))
         else 0
         else 0
         end
         end
-        ) actionRatio, -- 行为率
+        ) actionRatio,
 
 
         (case
         (case
         when sum(t2.photo_show) != 0
         when sum(t2.photo_show) != 0
         then ((sum(t2.charge) / sum(t2.photo_show)) * 1000)
         then ((sum(t2.charge) / sum(t2.photo_show)) * 1000)
         else 0
         else 0
         end
         end
-        ) impression1kCost, -- 均千次封面曝光花费
+        ) impression1kCost,
 
 
         (case
         (case
         when sum(t2.photo_click) != 0
         when sum(t2.photo_click) != 0
         then (sum(t2.charge) / sum(t2.photo_click))
         then (sum(t2.charge) / sum(t2.photo_click))
         else 0
         else 0
         end
         end
-        ) photoClickCost, -- 平均封面点击单价
+        ) photoClickCost,
 
 
         (CASE
         (CASE
         WHEN sum(t2.photo_click) != 0
         WHEN sum(t2.photo_click) != 0
         THEN (sum(t2.charge) / sum(t2.photo_click))
         THEN (sum(t2.charge) / sum(t2.photo_click))
         ELSE 0
         ELSE 0
         end
         end
-        ) actionCost, -- 平均行为单价
+        ) actionCost,
 
 
         (case
         (case
         WHEN sum(t2.form_count) != 0
         WHEN sum(t2.form_count) != 0
@@ -404,7 +404,7 @@
         THEN sum(t2.activation)
         THEN sum(t2.activation)
         ELSE 0
         ELSE 0
         END
         END
-        ) conversions, -- 转化数
+        ) conversions,
 
 
         (
         (
         CASE
         CASE
@@ -414,10 +414,10 @@
         THEN (sum(t2.charge) / sum(t2.activation))
         THEN (sum(t2.charge) / sum(t2.activation))
         ELSE 0
         ELSE 0
         END
         END
-        ) conversionPrice, -- 转化单价
+        ) conversionPrice,
 
 
-        t2.url url, -- 视频url
-        t2.signature signature, -- 视频md5
+        t2.url url,
+        t2.signature signature,
         t2.account_id accountId
         t2.account_id accountId
         from
         from
         ctop_oauth_token t1
         ctop_oauth_token t1
@@ -445,46 +445,46 @@
 
 
     <select id="selectDayMaterialList" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
     <select id="selectDayMaterialList" parameterType="Map" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
         SELECT
-        sum(t1.charge) cost, -- 花费
-        sum(t1.photo_show) photoShow, -- 封面曝光数
-        sum(t1.photo_click) photoClick, -- 封面点击数
-        sum(t1.aclick) aclick, -- 素材曝光数
-        sum(t1.bclick) bclick, -- 行为数
-        sum(t1.download_completed) downloadCompleted, -- 安卓下载完成 数
+        sum(t1.charge) cost,
+        sum(t1.photo_show) photoShow,
+        sum(t1.photo_click) photoClick,
+        sum(t1.aclick) aclick,
+        sum(t1.bclick) bclick,
+        sum(t1.download_completed) downloadCompleted,
         (case
         (case
         when sum(t1.photo_show) != 0
         when sum(t1.photo_show) != 0
         then (sum(t1.photo_click) / sum(t1.photo_show))
         then (sum(t1.photo_click) / sum(t1.photo_show))
         else 0
         else 0
         end
         end
-        ) photoClickRatio, -- 封面点击率
+        ) photoClickRatio,
 
 
         (case
         (case
         when sum(t1.aclick) != 0
         when sum(t1.aclick) != 0
         then (sum(t1.bclick) / sum(t1.aclick))
         then (sum(t1.bclick) / sum(t1.aclick))
         else 0
         else 0
         end
         end
-        ) actionRatio, -- 行为率
+        ) actionRatio,
 
 
         (case
         (case
         when sum(t1.photo_show) != 0
         when sum(t1.photo_show) != 0
         then ((sum(t1.charge) / sum(t1.photo_show)) * 1000)
         then ((sum(t1.charge) / sum(t1.photo_show)) * 1000)
         else 0
         else 0
         end
         end
-        ) impression1kCost, -- 均千次封面曝光花费
+        ) impression1kCost,
 
 
         (case
         (case
         when sum(t1.photo_click) != 0
         when sum(t1.photo_click) != 0
         then (sum(t1.charge) / sum(t1.photo_click))
         then (sum(t1.charge) / sum(t1.photo_click))
         else 0
         else 0
         end
         end
-        ) photoClickCost, -- 平均封面点击单价
+        ) photoClickCost,
 
 
         (CASE
         (CASE
         WHEN sum(t1.photo_click) != 0
         WHEN sum(t1.photo_click) != 0
         THEN (sum(t1.charge) / sum(t1.photo_click))
         THEN (sum(t1.charge) / sum(t1.photo_click))
         ELSE 0
         ELSE 0
         end
         end
-        ) actionCost, -- 平均行为单价
+        ) actionCost,
 
 
         (case
         (case
         WHEN sum(t1.form_count) != 0
         WHEN sum(t1.form_count) != 0
@@ -493,7 +493,7 @@
         THEN sum(t1.activation)
         THEN sum(t1.activation)
         ELSE 0
         ELSE 0
         END
         END
-        ) conversions, -- 转化数
+        ) conversions,
 
 
         (
         (
         CASE
         CASE
@@ -503,11 +503,11 @@
         THEN (sum(t1.charge) / sum(t1.activation))
         THEN (sum(t1.charge) / sum(t1.activation))
         ELSE 0
         ELSE 0
         END
         END
-        ) conversionPrice, -- 转化单价
+        ) conversionPrice,
 
 
         t1.photo_url  as  'url',
         t1.photo_url  as  'url',
         t1.cover_url as  'coverUrl',
         t1.cover_url as  'coverUrl',
-        t1.signature signature, -- 视频md5
+        t1.signature signature,
         t1.account_id accountId
         t1.account_id accountId
         from
         from
         ctop_kuaishou_report_daily_material t1
         ctop_kuaishou_report_daily_material t1