Merge remote-tracking branch 'origin/master'

master
bynt 1 year ago
commit 7c05c80fa1

@ -31,6 +31,6 @@ public interface TbBDNewBackdataEntityRepository extends BaseRepository<TbBdNewB
@Query("SELECT t FROM TbBdNewBackdataEntity t WHERE t.gmtCreate > ?1 AND t.gmtCreate < ?2")
List<TbBdNewBackdataEntity> 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);
}

@ -32,6 +32,6 @@ public interface TbGdtNewBackdataEntityRepository extends BaseRepository<TbGdtNe
@Query("SELECT t FROM TbGdtNewBackdataEntity t WHERE t.gmtCreate > ?1 AND t.gmtCreate < ?2")
List<TbGdtNewBackdataEntity> 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);
}

@ -23,7 +23,7 @@ public interface TbJLV2BackdataEntityRepository extends BaseRepository<TbJLBackD
@Query("SELECT t FROM TbJLBackDataV2Entity t WHERE t.gmtCreate > ?1 AND t.gmtCreate < ?2")
List<TbJLBackDataV2Entity> 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);
/**

@ -31,6 +31,6 @@ public interface TbKSNewBackdataEntityRepository extends BaseRepository<TbKSNewB
@Query("SELECT t FROM TbKSNewBackdataEntity t WHERE t.gmtCreate > ?1 AND t.gmtCreate < ?2")
List<TbKSNewBackdataEntity> 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);
}

@ -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<String, List<String>> 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));

Loading…
Cancel
Save