From 8223fab24aa1bb5b4cbf78ab347c147fef7f544e Mon Sep 17 00:00:00 2001 From: wjt Date: Thu, 6 Jul 2023 11:57:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=9A=E6=97=B6=E5=8E=8B?= =?UTF-8?q?=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/TbBDNewBackdataEntityRepository.java | 2 +- .../repository/TbGdtNewBackdataEntityRepository.java | 2 +- .../repository/TbJLV2BackdataEntityRepository.java | 2 +- .../repository/TbKSNewBackdataEntityRepository.java | 2 +- .../java/com/baiyee/adcallback/task/TfSourceTaskNew.java | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/baiyee/adcallback/repository/TbBDNewBackdataEntityRepository.java b/src/main/java/com/baiyee/adcallback/repository/TbBDNewBackdataEntityRepository.java index 750ce66..379b841 100644 --- a/src/main/java/com/baiyee/adcallback/repository/TbBDNewBackdataEntityRepository.java +++ b/src/main/java/com/baiyee/adcallback/repository/TbBDNewBackdataEntityRepository.java @@ -31,6 +31,6 @@ public interface TbBDNewBackdataEntityRepository extends BaseRepository ?1 AND t.gmtCreate < ?2") List queryByDate(DateTime startDate, DateTime endDate); - @Query("SELECT count(t) FROM TbJLBackDataV1Entity t WHERE t.imei != '__IMEI__' and t.gmtCreate > ?1 AND t.gmtCreate < ?2") + @Query("SELECT count(t) FROM TbBdNewBackdataEntity t WHERE t.imei != '__IMEI__' and t.gmtCreate > ?1 AND t.gmtCreate < ?2") Integer countByGmtCreate(DateTime startDate, DateTime endDate); } diff --git a/src/main/java/com/baiyee/adcallback/repository/TbGdtNewBackdataEntityRepository.java b/src/main/java/com/baiyee/adcallback/repository/TbGdtNewBackdataEntityRepository.java index 78306fb..8da7ec2 100644 --- a/src/main/java/com/baiyee/adcallback/repository/TbGdtNewBackdataEntityRepository.java +++ b/src/main/java/com/baiyee/adcallback/repository/TbGdtNewBackdataEntityRepository.java @@ -32,6 +32,6 @@ public interface TbGdtNewBackdataEntityRepository extends BaseRepository ?1 AND t.gmtCreate < ?2") List queryByDate(DateTime startDate, DateTime endDate); - @Query("SELECT count(t) FROM TbJLBackDataV1Entity t WHERE t.imei != '__IMEI__' and t.gmtCreate > ?1 AND t.gmtCreate < ?2") + @Query("SELECT count(t) FROM TbGdtNewBackdataEntity t WHERE t.imei != '__IMEI__' and t.gmtCreate > ?1 AND t.gmtCreate < ?2") Integer countByGmtCreate(DateTime startDate, DateTime endDate); } diff --git a/src/main/java/com/baiyee/adcallback/repository/TbJLV2BackdataEntityRepository.java b/src/main/java/com/baiyee/adcallback/repository/TbJLV2BackdataEntityRepository.java index 2aeedd2..26b60c6 100644 --- a/src/main/java/com/baiyee/adcallback/repository/TbJLV2BackdataEntityRepository.java +++ b/src/main/java/com/baiyee/adcallback/repository/TbJLV2BackdataEntityRepository.java @@ -23,7 +23,7 @@ public interface TbJLV2BackdataEntityRepository extends BaseRepository ?1 AND t.gmtCreate < ?2") List queryByDate(DateTime startDate, DateTime endDate); - @Query("SELECT count(t) FROM TbJLBackDataV1Entity t WHERE t.imei != '__IMEI__' and t.gmtCreate > ?1 AND t.gmtCreate < ?2") + @Query("SELECT count(t) FROM TbJLBackDataV2Entity t WHERE t.imei != '__IMEI__' and t.gmtCreate > ?1 AND t.gmtCreate < ?2") Integer countByGmtCreate(DateTime startDate, DateTime endDate); /** diff --git a/src/main/java/com/baiyee/adcallback/repository/TbKSNewBackdataEntityRepository.java b/src/main/java/com/baiyee/adcallback/repository/TbKSNewBackdataEntityRepository.java index cc94739..6bc69d4 100644 --- a/src/main/java/com/baiyee/adcallback/repository/TbKSNewBackdataEntityRepository.java +++ b/src/main/java/com/baiyee/adcallback/repository/TbKSNewBackdataEntityRepository.java @@ -31,6 +31,6 @@ public interface TbKSNewBackdataEntityRepository extends BaseRepository ?1 AND t.gmtCreate < ?2") List queryByDate(DateTime startDate, DateTime endDate); - @Query("SELECT count(t) FROM TbJLBackDataV1Entity t WHERE t.imei != '__IMEI__' and t.gmtCreate > ?1 AND t.gmtCreate < ?2") + @Query("SELECT count(t) FROM TbKSNewBackdataEntity t WHERE t.imei != '__IMEI__' and t.gmtCreate > ?1 AND t.gmtCreate < ?2") Integer countByGmtCreate(DateTime startDate, DateTime endDate); } diff --git a/src/main/java/com/baiyee/adcallback/task/TfSourceTaskNew.java b/src/main/java/com/baiyee/adcallback/task/TfSourceTaskNew.java index adf7a42..f00d36b 100644 --- a/src/main/java/com/baiyee/adcallback/task/TfSourceTaskNew.java +++ b/src/main/java/com/baiyee/adcallback/task/TfSourceTaskNew.java @@ -108,7 +108,7 @@ public class TfSourceTaskNew { /** - * 压缩记录入库,每次压缩5万 + * 压缩记录入库,每次压缩10万 */ private void saveData(Integer total, DateTime startTime, DateTime endTime, String dataSourceName) { if (total <= 0) { @@ -135,7 +135,7 @@ public class TfSourceTaskNew { for (Map.Entry> entry : map.entrySet()) { String password = RandomUtil.randomString(6); String newPath = zipFile(filePath + File.separator + entry.getKey() + ".zip", entry.getValue(), password); - if (StrUtil.isNotBlank(filePath)) { + if (StrUtil.isNotBlank(newPath)) { //保存文件记录 TbTfSourceEntity tbTfSourceEntity = new TbTfSourceEntity().addTbTfSourceEntity(format, null, null, entry.getKey(), newPath, password); saveList.add(tbTfSourceEntity); @@ -151,7 +151,7 @@ public class TfSourceTaskNew { String format = DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd"); //生成文件 for (String tag : mapByTag.keySet()) { - String filePath = path + File.separator + format + File.separator + tag + circulateNum + ".csv"; + String filePath = path + File.separator + format + File.separator + tag + "-" + circulateNum + ".csv"; File file = new File(filePath); CsvWriter writer = new CsvWriter(file, StandardCharsets.UTF_8); writer.writeBeans(mapByTag.get(tag));