Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
manager
Project
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
reyun
manager
Commits
cf1f5f45
Commit
cf1f5f45
authored
Jul 15, 2021
by
lzxry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加tkio流量拉取入库时间
parent
b6dc9ff4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
TkioFlow.java
src/main/java/common/model/TkioFlow.java
+9
-0
TrackingFlowTask.java
src/main/java/track/task/TrackingFlowTask.java
+10
-0
No files found.
src/main/java/common/model/TkioFlow.java
View file @
cf1f5f45
...
...
@@ -19,6 +19,7 @@ public class TkioFlow {
private
String
contractCode
;
private
Long
flow
;
private
Long
costFlow
;
private
String
createTime
;
public
String
getDs
()
{
return
ds
;
...
...
@@ -67,4 +68,12 @@ public class TkioFlow {
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
}
src/main/java/track/task/TrackingFlowTask.java
View file @
cf1f5f45
...
...
@@ -51,6 +51,9 @@ public class TrackingFlowTask {
@Autowired
private
TkioFlowHistoryRepository
tkioFlowHistoryRepository
;
/**
* 功能描述:定时同步流量(每7分钟执行一次)
*/
public
void
syncFlow
()
{
List
<
CalculationFlow
>
calculationFlows
=
calculationFlowRepository
.
findByStatus
(
0
);
for
(
CalculationFlow
calculationFlow
:
calculationFlows
)
{
...
...
@@ -198,6 +201,9 @@ public class TrackingFlowTask {
}
}
/**
* 功能描述:定时同步昨日流量(每天十点)
*/
public
void
task
()
{
List
<
String
>
emails
=
contractRepository
.
findDistinctEmailByPlatform
(
"tkio"
);
...
...
@@ -354,6 +360,7 @@ public class TrackingFlowTask {
public
TkioFlow
getTkioFlow
(
BigInteger
clickNum
,
String
yesterday
,
Contract
contract
)
{
TkioFlow
tkioFlow
=
new
TkioFlow
();
tkioFlow
.
setCreateTime
(
DateUtil
.
now
());
tkioFlow
.
setDs
(
yesterday
);
tkioFlow
.
setEmail
(
contract
.
getEmail
());
tkioFlow
.
setContractCode
(
contract
.
getContractCode
());
...
...
@@ -381,6 +388,9 @@ public class TrackingFlowTask {
}
/**
* 功能描述:临时跑一段时间内的流量任务
*/
public
void
reset
(){
List
<
String
>
emails
=
contractRepository
.
findDistinctEmailByPlatform
(
"tkio"
);
...
...
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