Commit cf1f5f45 by lzxry

添加tkio流量拉取入库时间

parent b6dc9ff4
......@@ -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;
}
}
......@@ -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");
......
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