Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
dc-java
Commits
c4f7b0be
Commit
c4f7b0be
authored
Dec 02, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
黑五
parent
69731924
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
6 deletions
+35
-6
EbayFinanceAdSyncJob.java
...src/main/java/com/bailuntec/job/EbayFinanceAdSyncJob.java
+1
-1
EbayFinanceAdSyncJobTest.java
...test/java/com/bailuntec/job/EbayFinanceAdSyncJobTest.java
+25
-3
DcAutoSalesMapper.xml
.../src/main/java/com/bailuntec/mapper/DcAutoSalesMapper.xml
+4
-0
DcBaseOmsSkuMapper.xml
...src/main/java/com/bailuntec/mapper/DcBaseOmsSkuMapper.xml
+3
-0
mybatis-config.xml
data-common/src/main/resources/mybatis-config.xml
+2
-2
No files found.
data-base/base-sync-finance-ebay/src/main/java/com/bailuntec/job/EbayFinanceAdSyncJob.java
View file @
c4f7b0be
...
@@ -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
)
...
...
data-base/base-sync-finance-ebay/src/test/java/com/bailuntec/job/EbayFinanceAdSyncJobTest.java
View file @
c4f7b0be
...
@@ -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
,
1
7
,
0
,
0
);
LocalDateTime
start
=
LocalDateTime
.
of
(
2020
,
11
,
1
8
,
0
,
0
);
LocalDateTime
end
=
LocalDateTime
.
of
(
2020
,
1
1
,
19
,
0
,
0
);
LocalDateTime
end
=
LocalDateTime
.
of
(
2020
,
1
2
,
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
));
...
...
data-common/src/main/java/com/bailuntec/mapper/DcAutoSalesMapper.xml
View file @
c4f7b0be
...
@@ -3139,6 +3139,10 @@
...
@@ -3139,6 +3139,10 @@
and warehouse_code = #{warehouseCode}
and warehouse_code = #{warehouseCode}
and !(paid_time
>
= '2020-11-11 00:00:00' and paid_time
<
= '2020-11-13 00:00:00' and
and !(paid_time
>
= '2020-11-11 00:00:00' and paid_time
<
= '2020-11-13 00:00:00' and
platform_type = 'Aliexpress')
platform_type = 'Aliexpress')
and !(paid_time
>
= '2020-11-23 00:00:00' and paid_time
<
= '2020-11-28 00:00:00' and
platform_type = 'Aliexpress')
and !(paid_time
>
= '2020-11-23 00:00:00' and paid_time
<
= '2020-12-06 00:00:00' and
platform_type = 'FBA')
and platform_order_type != '手工单'
and platform_order_type != '手工单'
) sales_table
) sales_table
...
...
data-common/src/main/java/com/bailuntec/mapper/DcBaseOmsSkuMapper.xml
View file @
c4f7b0be
...
@@ -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
>
= '2020-11-23 00:00:00' and paid_time
<
= '2020-12-06 00:00:00' and
platform_type = 'FBA')
and platform_order_type != '手工单'
) / #{days}
) / #{days}
</select>
</select>
...
...
data-common/src/main/resources/mybatis-config.xml
View file @
c4f7b0be
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment