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
bltdc
dc-java
Commits
9c4b48f8
Commit
9c4b48f8
authored
Dec 12, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ebay的平台费直接改为读取oms的
parent
d6e81269
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
33 deletions
+31
-33
EbayFinanceAdSyncJobTest.java
...test/java/com/bailuntec/job/EbayFinanceAdSyncJobTest.java
+2
-2
OrderSyncJob.java
...s-order/src/main/java/com/bailuntec/job/OrderSyncJob.java
+7
-4
OrderSyncTask.java
...-order/src/main/java/com/bailuntec/job/OrderSyncTask.java
+1
-1
OmsOrderTest.java
...-base/base-sync-oms-order/src/test/java/OmsOrderTest.java
+1
-1
DcBaseOmsSkuMapper.java
...rc/main/java/com/bailuntec/mapper/DcBaseOmsSkuMapper.java
+5
-1
DcBaseOmsSkuMapper.xml
...src/main/java/com/bailuntec/mapper/DcBaseOmsSkuMapper.xml
+1
-0
mybatis-config.xml
data-common/src/main/resources/mybatis-config.xml
+2
-2
Application.java
...uto-turnover/src/main/java/com/bailuntec/Application.java
+9
-19
job.properties
...show/show-auto-turnover/src/main/resources/job.properties
+3
-3
No files found.
data-base/base-sync-finance-ebay/src/test/java/com/bailuntec/job/EbayFinanceAdSyncJobTest.java
View file @
9c4b48f8
...
@@ -84,8 +84,8 @@ public class EbayFinanceAdSyncJobTest {
...
@@ -84,8 +84,8 @@ public class EbayFinanceAdSyncJobTest {
public
void
testThreadPool
()
{
public
void
testThreadPool
()
{
EbayFinanceAdSyncJob
ebayFinanceAdSyncJob
=
new
EbayFinanceAdSyncJob
();
EbayFinanceAdSyncJob
ebayFinanceAdSyncJob
=
new
EbayFinanceAdSyncJob
();
LocalDateTime
start
=
LocalDateTime
.
of
(
2020
,
1
1
,
18
,
0
,
0
);
LocalDateTime
start
=
LocalDateTime
.
of
(
2020
,
1
2
,
1
,
0
,
0
);
LocalDateTime
end
=
LocalDateTime
.
of
(
2020
,
12
,
2
,
0
,
0
);
LocalDateTime
end
=
LocalDateTime
.
of
(
2020
,
12
,
1
2
,
0
,
0
);
List
<
LocalDateTime
>
localDateTimeList
=
Stream
.
iterate
(
start
,
List
<
LocalDateTime
>
localDateTimeList
=
Stream
.
iterate
(
start
,
localDateTime
->
localDateTime
.
plusDays
(
1
))
localDateTime
->
localDateTime
.
plusDays
(
1
))
...
...
data-base/base-sync-oms-order/src/main/java/com/bailuntec/job/OrderSyncJob.java
View file @
9c4b48f8
...
@@ -254,10 +254,13 @@ public class OrderSyncJob extends PointJob {
...
@@ -254,10 +254,13 @@ public class OrderSyncJob extends PointJob {
checkFbaFee
(
dcBaseOmsSku
,
dcBaseOmsOrder
);
checkFbaFee
(
dcBaseOmsSku
,
dcBaseOmsOrder
);
}
}
if
((
dcBaseOmsOrder
.
getCostPlatformFee
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
&&
(
initTotalCost
.
compareTo
(
BigDecimal
.
valueOf
(
0
))
==
1
)
&&
(
amountSales
.
compareTo
(
BigDecimal
.
ZERO
)
==
1
))
{
//ebay的平台费直接改为读取oms的
DcBaseOmsSkuMapper
dcBaseOmsSkuMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseOmsSkuMapper
.
class
);
if
((
dcBaseOmsOrder
.
getCostPlatformFee
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
&&
BigDecimal
costPlatformFee
=
dcBaseOmsSkuMapper
.
selectCostPlatformFee
(
dcBaseOmsSku
.
getBailunSku
(),
dcBaseOmsSku
.
getPlatformType
(),
dcBaseOmsSku
.
getWebsite
());
(
initTotalCost
.
compareTo
(
BigDecimal
.
valueOf
(
0
))
==
1
)
&&
totalCostPlatformFee
=
totalCostPlatformFee
.
add
(
costPlatformFee
==
null
?
BigDecimal
.
ZERO
:
costPlatformFee
);
(
amountSales
.
compareTo
(
BigDecimal
.
ZERO
)
==
1
))
{
// DcBaseOmsSkuMapper dcBaseOmsSkuMapper = SessionUtil.getSession().getMapper(DcBaseOmsSkuMapper.class);
// BigDecimal costPlatformFee = dcBaseOmsSkuMapper.selectCostPlatformFee(dcBaseOmsSku.getBailunSku(), dcBaseOmsSku.getPlatformType(), dcBaseOmsSku.getWebsite(),dcBaseOmsSku.getOriginOrderId());
// totalCostPlatformFee = totalCostPlatformFee.add(costPlatformFee == null ? BigDecimal.ZERO : costPlatformFee);
hasCostPlatformFee
=
false
;
hasCostPlatformFee
=
false
;
}
}
...
...
data-base/base-sync-oms-order/src/main/java/com/bailuntec/job/OrderSyncTask.java
View file @
9c4b48f8
...
@@ -256,7 +256,7 @@ public class OrderSyncTask extends PointJob {
...
@@ -256,7 +256,7 @@ public class OrderSyncTask extends PointJob {
if
((
dcBaseOmsOrder
.
getCostPlatformFee
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
&&
(
initTotalCost
.
compareTo
(
BigDecimal
.
valueOf
(
0
))
==
1
)
&&
(
amountSales
.
compareTo
(
BigDecimal
.
ZERO
)
==
1
))
{
if
((
dcBaseOmsOrder
.
getCostPlatformFee
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
)
&&
(
initTotalCost
.
compareTo
(
BigDecimal
.
valueOf
(
0
))
==
1
)
&&
(
amountSales
.
compareTo
(
BigDecimal
.
ZERO
)
==
1
))
{
DcBaseOmsSkuMapper
dcBaseOmsSkuMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseOmsSkuMapper
.
class
);
DcBaseOmsSkuMapper
dcBaseOmsSkuMapper
=
SessionUtil
.
getSession
().
getMapper
(
DcBaseOmsSkuMapper
.
class
);
BigDecimal
costPlatformFee
=
dcBaseOmsSkuMapper
.
selectCostPlatformFee
(
dcBaseOmsSku
.
getBailunSku
(),
dcBaseOmsSku
.
getPlatformType
(),
dcBaseOmsSku
.
getWebsite
());
BigDecimal
costPlatformFee
=
dcBaseOmsSkuMapper
.
selectCostPlatformFee
(
dcBaseOmsSku
.
getBailunSku
(),
dcBaseOmsSku
.
getPlatformType
(),
dcBaseOmsSku
.
getWebsite
()
,
dcBaseOmsSku
.
getOriginOrderId
()
);
totalCostPlatformFee
=
totalCostPlatformFee
.
add
(
costPlatformFee
==
null
?
BigDecimal
.
ZERO
:
costPlatformFee
);
totalCostPlatformFee
=
totalCostPlatformFee
.
add
(
costPlatformFee
==
null
?
BigDecimal
.
ZERO
:
costPlatformFee
);
hasCostPlatformFee
=
false
;
hasCostPlatformFee
=
false
;
}
}
...
...
data-base/base-sync-oms-order/src/test/java/OmsOrderTest.java
View file @
9c4b48f8
...
@@ -26,7 +26,7 @@ public class OmsOrderTest {
...
@@ -26,7 +26,7 @@ public class OmsOrderTest {
// map.put("BailunLastUpdateTimeFrom", "2019-04-11 11:45:33");
// map.put("BailunLastUpdateTimeFrom", "2019-04-11 11:45:33");
// map.put("BailunLastUpdateTimeTo", "2019-04-11 16:17:03");
// map.put("BailunLastUpdateTimeTo", "2019-04-11 16:17:03");
//OriginOrderNo=112-7750508-3145827
//OriginOrderNo=112-7750508-3145827
map
.
put
(
"OriginOrderNo"
,
"353
296395593-1198797722
022"
);
map
.
put
(
"OriginOrderNo"
,
"353
300877748-1202307414
022"
);
//353295108454-1198385057022
//353295108454-1198385057022
// map.put("OriginOrderNo", "353295108454-1198385057022");
// map.put("OriginOrderNo", "353295108454-1198385057022");
Request
request
=
new
Request
.
Builder
()
Request
request
=
new
Request
.
Builder
()
...
...
data-common/src/main/java/com/bailuntec/mapper/DcBaseOmsSkuMapper.java
View file @
9c4b48f8
...
@@ -132,7 +132,11 @@ public interface DcBaseOmsSkuMapper {
...
@@ -132,7 +132,11 @@ public interface DcBaseOmsSkuMapper {
BigDecimal
selectFBAFee
(
@Param
(
"bailunSku"
)
String
bailunSku
,
@Param
(
"webSite"
)
String
webSite
,
@Param
(
"paidTime"
)
LocalDateTime
paidTime
);
BigDecimal
selectFBAFee
(
@Param
(
"bailunSku"
)
String
bailunSku
,
@Param
(
"webSite"
)
String
webSite
,
@Param
(
"paidTime"
)
LocalDateTime
paidTime
);
BigDecimal
selectCostPlatformFee
(
@Param
(
"bailunSku"
)
String
bailunSku
,
@Param
(
"platformType"
)
String
platformType
,
@Param
(
"webSite"
)
String
webSite
);
@Deprecated
BigDecimal
selectCostPlatformFee
(
@Param
(
"bailunSku"
)
String
bailunSku
,
@Param
(
"platformType"
)
String
platformType
,
@Param
(
"webSite"
)
String
webSite
,
@Param
(
"originOrderId"
)
String
originOrderId
);
DcBaseOmsSku
selectOneByCreateTime
(
@Param
(
"bailunSku"
)
String
bailunSku
);
DcBaseOmsSku
selectOneByCreateTime
(
@Param
(
"bailunSku"
)
String
bailunSku
);
...
...
data-common/src/main/java/com/bailuntec/mapper/DcBaseOmsSkuMapper.xml
View file @
9c4b48f8
...
@@ -3714,6 +3714,7 @@
...
@@ -3714,6 +3714,7 @@
AND bailun_sku = #{bailunSku}
AND bailun_sku = #{bailunSku}
AND website = #{webSite}
AND website = #{webSite}
AND cost_platform_fee
>
0
AND cost_platform_fee
>
0
and origin_order_id !=#{originOrderId}
order by order_update_time desc
order by order_update_time desc
limit 1
limit 1
</select>
</select>
...
...
data-common/src/main/resources/mybatis-config.xml
View file @
9c4b48f8
...
@@ -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>
...
...
data-show/show-auto-turnover/src/main/java/com/bailuntec/Application.java
View file @
9c4b48f8
...
@@ -7,16 +7,11 @@ import com.bailuntec.job.ReplaceLogisticJob;
...
@@ -7,16 +7,11 @@ import com.bailuntec.job.ReplaceLogisticJob;
import
com.bailuntec.utils.PropertiesUtil
;
import
com.bailuntec.utils.PropertiesUtil
;
import
com.dangdang.ddframe.job.config.JobCoreConfiguration
;
import
com.dangdang.ddframe.job.config.JobCoreConfiguration
;
import
com.dangdang.ddframe.job.config.simple.SimpleJobConfiguration
;
import
com.dangdang.ddframe.job.config.simple.SimpleJobConfiguration
;
import
com.dangdang.ddframe.job.event.JobEventConfiguration
;
import
com.dangdang.ddframe.job.event.rdb.JobEventRdbConfiguration
;
import
com.dangdang.ddframe.job.lite.api.JobScheduler
;
import
com.dangdang.ddframe.job.lite.api.JobScheduler
;
import
com.dangdang.ddframe.job.lite.config.LiteJobConfiguration
;
import
com.dangdang.ddframe.job.lite.config.LiteJobConfiguration
;
import
com.dangdang.ddframe.job.lite.lifecycle.api.JobAPIFactory
;
import
com.dangdang.ddframe.job.lite.lifecycle.api.JobOperateAPI
;
import
com.dangdang.ddframe.job.reg.base.CoordinatorRegistryCenter
;
import
com.dangdang.ddframe.job.reg.base.CoordinatorRegistryCenter
;
import
com.dangdang.ddframe.job.reg.zookeeper.ZookeeperConfiguration
;
import
com.dangdang.ddframe.job.reg.zookeeper.ZookeeperConfiguration
;
import
com.dangdang.ddframe.job.reg.zookeeper.ZookeeperRegistryCenter
;
import
com.dangdang.ddframe.job.reg.zookeeper.ZookeeperRegistryCenter
;
import
com.google.common.base.Optional
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
...
@@ -36,24 +31,19 @@ public class Application {
...
@@ -36,24 +31,19 @@ public class Application {
log
.
info
(
"starting app..."
);
log
.
info
(
"starting app..."
);
//
//
new
JobScheduler
(
createRegistryCenter
(),
new
JobScheduler
(
createRegistryCenter
(),
createJobConfigurationNormal
(),
createJobConfigurationNormal
()).
init
();
createJobEventConfiguration
()).
init
();
new
JobScheduler
(
createRegistryCenter
(),
new
JobScheduler
(
createRegistryCenter
(),
createJobConfigurationIncrement
(),
createJobConfigurationIncrement
()).
init
();
createJobEventConfiguration
()).
init
();
new
JobScheduler
(
createRegistryCenter
(),
new
JobScheduler
(
createRegistryCenter
(),
createReplaceLogistic
(),
createReplaceLogistic
()).
init
();
createJobEventConfiguration
()).
init
();
new
JobScheduler
(
createRegistryCenter
(),
new
JobScheduler
(
createRegistryCenter
(),
createQueueConsumer
(),
createQueueConsumer
()).
init
();
createJobEventConfiguration
()).
init
();
new
JobScheduler
(
createRegistryCenter
(),
new
JobScheduler
(
createRegistryCenter
(),
createJobConfigurationNeNormal
(),
createJobConfigurationNeNormal
()).
init
();
createJobEventConfiguration
()).
init
();
}
}
...
@@ -122,10 +112,10 @@ public class Application {
...
@@ -122,10 +112,10 @@ public class Application {
return
LiteJobConfiguration
.
newBuilder
(
simpleJobConfig
).
build
();
return
LiteJobConfiguration
.
newBuilder
(
simpleJobConfig
).
build
();
}
}
//
private
static
JobEventConfiguration
createJobEventConfiguration
()
{
//
private static JobEventConfiguration createJobEventConfiguration() {
return
new
JobEventRdbConfiguration
(
setUpEventTraceDataSource
());
//
return new JobEventRdbConfiguration(setUpEventTraceDataSource());
}
//
}
private
static
DataSource
setUpEventTraceDataSource
()
{
private
static
DataSource
setUpEventTraceDataSource
()
{
DruidDataSource
result
=
new
DruidDataSource
();
DruidDataSource
result
=
new
DruidDataSource
();
...
...
data-show/show-auto-turnover/src/main/resources/job.properties
View file @
9c4b48f8
...
@@ -10,9 +10,9 @@ EVENT_RDB_STORAGE_PASSWORD=#7kfnymAM$Y9-Ntf
...
@@ -10,9 +10,9 @@ EVENT_RDB_STORAGE_PASSWORD=#7kfnymAM$Y9-Ntf
ZOOKEEPER_SERVER=172.31.255.120:2181
ZOOKEEPER_SERVER=172.31.255.120:2181
NAME_SPACE
=
data-center
NAME_SPACE
=
data-center
JOB_NAME
=
show-auto-turnover2
8
JOB_NAME
=
show-auto-turnover2
9
JOB_CRON
=
0 0 3 * * ?
#
JOB_CRON=0 0 3 * * ?
#JOB_CRON=0 0 10
* * ?
JOB_CRON
=
0 35 11
* * ?
SHARDING_TOTAL_COUNT
=
8
SHARDING_TOTAL_COUNT
=
8
...
...
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