Explorar el Código

将时报当天汇总数据洗进日报表中

zhaoxian hace 4 años
padre
commit
352362dc8d

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/EtlKuaishouReportAccountDailyMapper.java

@@ -17,7 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface EtlKuaishouReportAccountDailyMapper extends BaseMapper<EtlKuaishouReportAccountDaily> {
 
-    void replaceBatch(@Param("list") List<EtlKuaishouReportAccountDaily> list);
+    void replaceBatch(@Param("list") List<EtlKuaishouReportAccountHourly> list);
 
     EtlKuaishouReportAccountHourly getOnedayAggregatebyDaily(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("accountId") Long accountId);
 

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

@@ -51,7 +51,7 @@ public interface KuaishouReportDailyAccountMapper extends BaseMapper<KuaishouRep
 
     void replaceBatchAdScene(@Param("addList") List<KuaishouReportDailyAccount> addList);
 
-    List<EtlKuaishouReportAccountDaily> queryEveryDayDataForAccount();
+    List<EtlKuaishouReportAccountHourly> queryEveryDayDataForAccount();
 
     BigDecimal getSumChargeByAccountIdAndStatDate(@Param("accountId") Long accountId, @Param("statDate") String statDate);
 }

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

@@ -1452,7 +1452,7 @@
     </select>
 
     <select id="queryEveryDayDataForAccount"
-            resultType="cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouReportAccountDaily">
+            resultType="cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouReportAccountHourly">
     SELECT stat_date,
            account_id,
            SUM(charge) as 'charge',

+ 2 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/EtlKuaishouReportAccountDailyServiceImpl.java

@@ -2,6 +2,7 @@ package cn.com.ctop.kuaishou.modules.report.service.impl;
 
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouReportAccountDaily;
+import cn.com.ctop.kuaishou.modules.report.entity.EtlKuaishouReportAccountHourly;
 import cn.com.ctop.kuaishou.modules.report.mapper.EtlKuaishouReportAccountDailyMapper;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAccountMapper;
 import cn.com.ctop.kuaishou.modules.report.service.IEtlKuaishouReportAccountDailyService;
@@ -29,7 +30,7 @@ public class EtlKuaishouReportAccountDailyServiceImpl extends ServiceImpl<EtlKua
 
     @Override
     public void queryEveryDayDataForAccount() {
-        List<EtlKuaishouReportAccountDaily> list = dailyAccountMapper.queryEveryDayDataForAccount();
+        List<EtlKuaishouReportAccountHourly> list = dailyAccountMapper.queryEveryDayDataForAccount();
         if (!Check.isNull(list)) {
             etlDailyAccountMapper.replaceBatch(list);
         }

+ 3 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/EtlKuaishouReportAccountHourlyServiceImpl.java

@@ -64,6 +64,7 @@ public class EtlKuaishouReportAccountHourlyServiceImpl extends ServiceImpl<EtlKu
         if (!Check.isNull(list)) {
             etlHourlyAccountMapper.replaceBatch(list);
         }
+        etlDailyAccountMapper.replaceBatch(list);
     }
 
     @Override
@@ -128,8 +129,8 @@ public class EtlKuaishouReportAccountHourlyServiceImpl extends ServiceImpl<EtlKu
             if ("photo_comment".equals(value)) {
                 value = "comment";
             }
-            if("play_3s_count".equals(value)){
-                value =  value = request.getString("value");
+            if ("play_3s_count".equals(value)) {
+                value = value = request.getString("value");
                 type = "more";
             }
             todayList = etlHourlyAccountMapper.getOnedayEtlReportList(startTime, accountId, value, type);