Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bailuntec-datacenter
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
bailuntec-datacenter
Commits
776eb93e
Commit
776eb93e
authored
Dec 01, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fee
parent
dd99f46f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
229 additions
and
2 deletions
+229
-2
AmazonAdJob.java
...mazon-ad/src/main/java/com/bailuntec/job/AmazonAdJob.java
+2
-2
AmazonJobService.java
...main/java/com/bailuntec/job/service/AmazonJobService.java
+0
-0
pom.xml
datacenter-base/base-sync-ebay/pom.xml
+64
-0
EbayJob.java
...se-sync-ebay/src/main/java/com/bailuntec/job/EbayJob.java
+30
-0
SampleApp.java
...-sync-ebay/src/main/java/com/bailuntec/job/SampleApp.java
+26
-0
EbayService.java
.../src/main/java/com/bailuntec/job/service/EbayService.java
+42
-0
application-prod.yml
...se/base-sync-ebay/src/main/resources/application-prod.yml
+32
-0
application-test.yml
...se/base-sync-ebay/src/main/resources/application-test.yml
+31
-0
SyncFeeService.java
...c/main/java/com/bailuntec/job/service/SyncFeeService.java
+1
-0
pom.xml
datacenter-base/pom.xml
+1
-0
No files found.
datacenter-base/base-sync-amazon-ad/src/main/java/com/bailuntec/job/AmazonAdJob.java
View file @
776eb93e
...
@@ -35,7 +35,7 @@ public class AmazonAdJob {
...
@@ -35,7 +35,7 @@ public class AmazonAdJob {
* </p>
* </p>
*/
*/
// @Scheduled(cron = "0 0 13 * * ?")
// @Scheduled(cron = "0 0 13 * * ?")
@Scheduled
(
cron
=
"0/1 * * * * ?"
)
//
@Scheduled(cron = "0/1 * * * * ?")
public
void
generateAmazonAdReport
()
{
public
void
generateAmazonAdReport
()
{
log
.
info
(
"每天下午1点生成昨天的亚马逊广告报告 任务开始"
);
log
.
info
(
"每天下午1点生成昨天的亚马逊广告报告 任务开始"
);
amazonJobService
.
generateAmazonAdReport
();
amazonJobService
.
generateAmazonAdReport
();
...
@@ -47,7 +47,7 @@ public class AmazonAdJob {
...
@@ -47,7 +47,7 @@ public class AmazonAdJob {
* 每小时下载未下载的报告
* 每小时下载未下载的报告
* </p>
* </p>
*/
*/
@Scheduled
(
cron
=
"0/1 * * * * ?"
)
//
@Scheduled(cron = "0/1 * * * * ?")
// @Scheduled(cron = "0 1 0/1 * * ?")
// @Scheduled(cron = "0 1 0/1 * * ?")
public
void
downloadAmazonAdReport
()
{
public
void
downloadAmazonAdReport
()
{
log
.
info
(
"每小时下载未下载的报告 任务开始"
);
log
.
info
(
"每小时下载未下载的报告 任务开始"
);
...
...
datacenter-base/base-sync-amazon-ad/src/main/java/com/bailuntec/job/service/AmazonJobService.java
0 → 100644
View file @
776eb93e
This diff is collapsed.
Click to expand it.
datacenter-base/base-sync-ebay/pom.xml
0 → 100644
View file @
776eb93e
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
datacenter-base
</artifactId>
<groupId>
com.bailuntec
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
base-sync-ebay
</artifactId>
<properties>
<maven.compiler.target>
1.8
</maven.compiler.target>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.encoding>
UTF-8
</maven.compiler.encoding>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven-surefire-plugin.version>
2.18.1
</maven-surefire-plugin.version>
<maven.build.timestamp.format>
yyyyMMddHHmm
</maven.build.timestamp.format>
</properties>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
2.3.3.RELEASE
</version>
<configuration>
<mainClass>
com.bailuntec.job.SampleApp
</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
com.spotify
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<version>
1.0.0
</version>
<configuration>
<skipDockerBuild>
false
</skipDockerBuild>
<imageName>
ccr.ccs.tencentyun.com/blt.data.job/base-sync-sample:${maven.build.timestamp}
</imageName>
<dockerDirectory>
src/main/docker
</dockerDirectory>
<resources>
<resource>
<targetPath>
/
</targetPath>
<directory>
${project.build.directory}
</directory>
<include>
${project.build.finalName}.jar
</include>
</resource>
</resources>
<serverId>
bailuntec-docker
</serverId>
</configuration>
</plugin>
</plugins>
</build>
</project>
datacenter-base/base-sync-ebay/src/main/java/com/bailuntec/job/EbayJob.java
0 → 100644
View file @
776eb93e
package
com
.
bailuntec
.
job
;
import
com.bailuntec.job.service.EbayService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
@Slf4j
@Component
public
class
EbayJob
{
@Resource
EbayService
ebayService
;
@Scheduled
(
cron
=
"0 0/1 * * * ?"
)
public
void
baseSyncFinanceFee
()
{
try
{
log
.
info
(
"每分钟同步费用单 开始"
);
ebayService
.
sync
();
log
.
info
(
"每分钟同步费用单 结束"
);
}
catch
(
Exception
ex
)
{
log
.
error
(
"每分钟同步费用单 异常:"
,
ex
);
}
}
}
datacenter-base/base-sync-ebay/src/main/java/com/bailuntec/job/SampleApp.java
0 → 100644
View file @
776eb93e
package
com
.
bailuntec
.
job
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/10/28 3:16 下午
*/
@SpringBootApplication
@EnableScheduling
@ComponentScan
(
"com.bailuntec"
)
@EnableFeignClients
(
basePackages
=
{
"com.bailuntec.api"
,
"com.bailuntec.*.api"
})
public
class
SampleApp
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
SampleApp
.
class
,
args
);
}
}
datacenter-base/base-sync-ebay/src/main/java/com/bailuntec/job/service/EbayService.java
0 → 100644
View file @
776eb93e
package
com
.
bailuntec
.
job
.
service
;
import
com.bailuntec.common.BeanUtils
;
import
com.bailuntec.common.ListUtil
;
import
com.bailuntec.cost.api.CostApi
;
import
com.bailuntec.cost.api.dto.CostDto
;
import
com.bailuntec.cost.api.dto.ManageCostDto
;
import
com.bailuntec.cost.api.response.CostResult
;
import
com.bailuntec.domain.DcBaseFinanceFee
;
import
com.bailuntec.domain.DcBaseFinanceLogistics
;
import
com.bailuntec.domain.DcBaseFinanceManagecost
;
import
com.bailuntec.domain.DcJobConfig
;
import
com.bailuntec.infrastructure.mapper.DcBaseFinanceFeeMapper
;
import
com.bailuntec.infrastructure.mapper.DcBaseFinanceLogisticsMapper
;
import
com.bailuntec.infrastructure.mapper.DcBaseFinanceManagecostMapper
;
import
com.bailuntec.infrastructure.mapper.DcJobConfigMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.github.pagehelper.PageInfo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/10/7 11:38 上午
*/
@Slf4j
@Service
public
class
EbayService
{
public
void
sync
()
{
}
}
datacenter-base/base-sync-ebay/src/main/resources/application-prod.yml
0 → 100644
View file @
776eb93e
spring
:
# 服务名称
application
:
name
:
base-sync-sample
# 数据配置
datasource
:
url
:
jdbc:mysql://10.0.8.15:3306/bailun_datacenter?serverTimezone=GMT%2B8&characterEncoding=utf-8
username
:
root
password
:
'
#7kfnymAM$Y9-Ntf'
driver-class-name
:
com.mysql.jdbc.Driver
main
:
allow-bean-definition-overriding
:
true
#mybatis plus 配置
mybatis-plus
:
mapper-locations
:
-
classpath*:com/bailuntec/mapper/*.xml
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
feign
:
hystrix
:
enabled
:
false
client
:
config
:
default
:
connectTimeout
:
30000
readTimeout
:
30000
server
:
port
:
8080
datacenter-base/base-sync-ebay/src/main/resources/application-test.yml
0 → 100644
View file @
776eb93e
spring
:
# 服务名称
application
:
name
:
base-sync-sample
# 数据配置
datasource
:
url
:
jdbc:mysql://gz-cdb-kp7s5i79.sql.tencentcdb.com:61691/bailun_datacenter?serverTimezone=GMT%2B8&characterEncoding=utf-8
username
:
root
password
:
'
#7kfnymAM$Y9-Ntf'
driver-class-name
:
com.mysql.jdbc.Driver
main
:
allow-bean-definition-overriding
:
true
#mybatis plus 配置
mybatis-plus
:
mapper-locations
:
-
classpath*:com/bailuntec/mapper/*.xml
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
feign
:
hystrix
:
enabled
:
false
client
:
config
:
default
:
connectTimeout
:
30000
readTimeout
:
30000
server
:
port
:
1224
datacenter-base/base-sync-fee/src/main/java/com/bailuntec/job/service/SyncFeeService.java
View file @
776eb93e
...
@@ -63,6 +63,7 @@ public class SyncFeeService {
...
@@ -63,6 +63,7 @@ public class SyncFeeService {
result
.
getData
().
forEach
(
costDto
->
{
result
.
getData
().
forEach
(
costDto
->
{
DcBaseFinanceFee
dcBaseFinanceFee
=
new
DcBaseFinanceFee
();
DcBaseFinanceFee
dcBaseFinanceFee
=
new
DcBaseFinanceFee
();
BeanUtils
.
copyProperties
(
costDto
,
dcBaseFinanceFee
,
"id"
);
BeanUtils
.
copyProperties
(
costDto
,
dcBaseFinanceFee
,
"id"
);
dcBaseFinanceFee
.
setCreateTime
(
LocalDateTime
.
ofInstant
(
costDto
.
getCreateTime
().
toInstant
(),
ZoneId
.
systemDefault
()));
//更新
//更新
int
update
=
dcBaseFinanceFeeMapper
.
update
(
dcBaseFinanceFee
,
new
LambdaQueryWrapper
<
DcBaseFinanceFee
>()
int
update
=
dcBaseFinanceFeeMapper
.
update
(
dcBaseFinanceFee
,
new
LambdaQueryWrapper
<
DcBaseFinanceFee
>()
.
eq
(
DcBaseFinanceFee:
:
getCostNo
,
dcBaseFinanceFee
.
getCostNo
()));
.
eq
(
DcBaseFinanceFee:
:
getCostNo
,
dcBaseFinanceFee
.
getCostNo
()));
...
...
datacenter-base/pom.xml
View file @
776eb93e
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
<module>
base-sync-oms-order
</module>
<module>
base-sync-oms-order
</module>
<module>
base-sync-company
</module>
<module>
base-sync-company
</module>
<module>
base-sync-purchase-details
</module>
<module>
base-sync-purchase-details
</module>
<module>
base-sync-ebay
</module>
</modules>
</modules>
</project>
</project>
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