Selaa lähdekoodia

投放数据-更新时间显示为报表中返回数据中最大的updateTime

huangxuechao 4 vuotta sitten
vanhempi
commit
4c89f58f4e

+ 1 - 1
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/report/mapper/xml/BytedanceReportMaterialDailyMapper.xml

@@ -14,7 +14,7 @@
             creative.count,
             video.material_upload_time as materialUploadTime,
             video.poster_url as posterUrl,
-            report.stat_datetime as statDatetime
+            report.update_time as updateTime
         FROM
             ctop_bytedance_report_material_daily report
         LEFT JOIN ctop_bytedance_video_info video ON video.material_id = report.material_id AND video.account_id = report.account_id

+ 5 - 5
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/report/service/impl/BytedanceReportMaterialDailyServiceImpl.java

@@ -38,7 +38,7 @@ public class BytedanceReportMaterialDailyServiceImpl extends ServiceImpl<Bytedan
         PageHelper.startPage(pageNum,pageSize);
         List<Map<String, Object>> dailyReportList = bytedanceReportMaterialDailyMapper.selectMaterialDailyReportByAccountId(accountId, startTime, endTime);
 
-        Date maxStatDatetime = null;
+        Date maxUpdateTime = null;
 
         for (Map<String, Object> dailyReportMap: dailyReportList) {
             if(dailyReportMap == null || dailyReportMap.isEmpty()){
@@ -47,8 +47,8 @@ public class BytedanceReportMaterialDailyServiceImpl extends ServiceImpl<Bytedan
 
 
 
-            if(Check.isNull(maxStatDatetime) || maxStatDatetime.before(DateUtils.str2Date(dailyReportMap.get("statDatetime").toString(),new SimpleDateFormat("yyyy-MM-dd")))){
-                maxStatDatetime = DateUtils.str2Date(dailyReportMap.get("statDatetime").toString(),new SimpleDateFormat("yyyy-MM-dd"));
+            if(Check.isNull(maxUpdateTime) || maxUpdateTime.before(DateUtils.str2Date(dailyReportMap.get("updateTime").toString(),new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")))){
+                maxUpdateTime = DateUtils.str2Date(dailyReportMap.get("updateTime").toString(),new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
             }
 
             if(dailyReportMap.get("count") == null){
@@ -88,8 +88,8 @@ public class BytedanceReportMaterialDailyServiceImpl extends ServiceImpl<Bytedan
         }
 
         for (Map<String, Object> dailyReportMap: dailyReportList) {
-            if(!Check.isNull(maxStatDatetime)){
-                dailyReportMap.put("statDatetime",maxStatDatetime);
+            if(!Check.isNull(maxUpdateTime)){
+                dailyReportMap.put("updateTime",maxUpdateTime);
             }
 
         }