Commit c4f7b0be by huluobin

黑五

parent 69731924
...@@ -53,7 +53,7 @@ public class EbayFinanceAdSyncJob extends PointJob { ...@@ -53,7 +53,7 @@ public class EbayFinanceAdSyncJob extends PointJob {
if (startTime.toLocalDate().compareTo(LocalDate.now()) < 0) { if (startTime.toLocalDate().compareTo(LocalDate.now()) < 0) {
listByPage.parallelStream().forEach(jobAccountLog -> { listByPage.forEach(jobAccountLog -> {
//先删除再更新 //先删除再更新
dcBaseFinanceEbayMapper.deleteByExample(DcBaseFinanceEbayExample.newAndCreateCriteria() dcBaseFinanceEbayMapper.deleteByExample(DcBaseFinanceEbayExample.newAndCreateCriteria()
.andBjDateBetween(startTime, endTime) .andBjDateBetween(startTime, endTime)
......
...@@ -84,15 +84,37 @@ public class EbayFinanceAdSyncJobTest { ...@@ -84,15 +84,37 @@ public class EbayFinanceAdSyncJobTest {
public void testThreadPool() { public void testThreadPool() {
EbayFinanceAdSyncJob ebayFinanceAdSyncJob = new EbayFinanceAdSyncJob(); EbayFinanceAdSyncJob ebayFinanceAdSyncJob = new EbayFinanceAdSyncJob();
LocalDateTime start = LocalDateTime.of(2020, 11, 17, 0, 0); LocalDateTime start = LocalDateTime.of(2020, 11, 18, 0, 0);
LocalDateTime end = LocalDateTime.of(2020, 11, 19, 0, 0); LocalDateTime end = LocalDateTime.of(2020, 12, 2, 0, 0);
List<LocalDateTime> localDateTimeList = Stream.iterate(start, List<LocalDateTime> localDateTimeList = Stream.iterate(start,
localDateTime -> localDateTime.plusDays(1)) localDateTime -> localDateTime.plusDays(1))
.limit(ChronoUnit.DAYS.between(start, end) + 1) .limit(ChronoUnit.DAYS.between(start, end) + 1)
.collect(Collectors.toList()); .collect(Collectors.toList());
localDateTimeList.parallelStream().forEach(localDateTime -> { localDateTimeList.forEach(localDateTime -> {
JobPointLog jobPointLog = new JobPointLog();
jobPointLog.setStartTime(localDateTime);
jobPointLog.setEndTime(localDateTime.plusDays(1));
ebayFinanceAdSyncJob.executeJob(null, jobPointLog);
});
}
@Test
public void testThreadPool2() {
EbayFinanceAdSyncJob ebayFinanceAdSyncJob = new EbayFinanceAdSyncJob();
LocalDateTime start = LocalDateTime.of(2020, 11, 25, 0, 0);
LocalDateTime end = LocalDateTime.of(2020, 12, 2, 0, 0);
List<LocalDateTime> localDateTimeList = Stream.iterate(start,
localDateTime -> localDateTime.plusDays(1))
.limit(ChronoUnit.DAYS.between(start, end) + 1)
.collect(Collectors.toList());
localDateTimeList.forEach(localDateTime -> {
JobPointLog jobPointLog = new JobPointLog(); JobPointLog jobPointLog = new JobPointLog();
jobPointLog.setStartTime(localDateTime); jobPointLog.setStartTime(localDateTime);
jobPointLog.setEndTime(localDateTime.plusDays(1)); jobPointLog.setEndTime(localDateTime.plusDays(1));
......
...@@ -3139,6 +3139,10 @@ ...@@ -3139,6 +3139,10 @@
and warehouse_code = #{warehouseCode} and warehouse_code = #{warehouseCode}
and !(paid_time &gt;= '2020-11-11 00:00:00' and paid_time &lt;= '2020-11-13 00:00:00' and and !(paid_time &gt;= '2020-11-11 00:00:00' and paid_time &lt;= '2020-11-13 00:00:00' and
platform_type = 'Aliexpress') platform_type = 'Aliexpress')
and !(paid_time &gt;= '2020-11-23 00:00:00' and paid_time &lt;= '2020-11-28 00:00:00' and
platform_type = 'Aliexpress')
and !(paid_time &gt;= '2020-11-23 00:00:00' and paid_time &lt;= '2020-12-06 00:00:00' and
platform_type = 'FBA')
and platform_order_type != '手工单' and platform_order_type != '手工单'
) sales_table ) sales_table
......
...@@ -3738,6 +3738,9 @@ ...@@ -3738,6 +3738,9 @@
and has_buyer_remark = 0 and has_buyer_remark = 0
and has_platsku_remark = 0 and has_platsku_remark = 0
and has_innersale = 0 and has_innersale = 0
and !(paid_time &gt;= '2020-11-23 00:00:00' and paid_time &lt;= '2020-12-06 00:00:00' and
platform_type = 'FBA')
and platform_order_type != '手工单'
) / #{days} ) / #{days}
</select> </select>
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<configuration> <configuration>
<!--<properties resource="db-tj.properties"/>--> <!--<properties resource="db-tj.properties"/>-->
<properties resource="db-dev.properties"/> <!-- <properties resource="db-dev.properties"/>-->
<!-- <properties resource="db-prod.properties"/>--> <properties resource="db-prod.properties"/>
<settings> <settings>
<setting name="mapUnderscoreToCamelCase" value="true"/> <setting name="mapUnderscoreToCamelCase" value="true"/>
</settings> </settings>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment