Commit 872bf201 authored by 董建华's avatar 董建华

新增数据上报手动触发

parent e8467582
......@@ -7,6 +7,7 @@ import com.emums.InfoType;
import com.entity.FileEntry;
import com.service.report.ReportService;
import com.timer.ReportTimer;
import com.util.ThreadPoolUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -38,13 +39,27 @@ public class ReportController {
@Autowired
private ReportTimer reportTimer;
public static boolean isrun = false;
@RequestMapping("report")
public String report(String token) {
@RequestMapping("report")
public String report(String token,String type) {
if (!"4745589d-f394-9028-26e5-2913aa252917".equals(token)) {
return "token有误";
}
reportTimer.reportDayData();
return "任务执行";
ThreadPoolUtil.getInstance().execute(()->{
if ("1".equals(type)) {
reportService.reportLoanDayData();//放款
} else if ("2".equals(type)) {
reportService.reportRepayDayData();//还款
} else if ("3".equals(type)) {
reportService.reportOverDayData();//天逾期
} else if ("4".equals(type)) {
reportService.reportOverMonthData();//月逾期
} else if ("all".equals(type)) {
reportTimer.reportDayData();
}
reportTimer.talk(ReportTimer.result);
});
return "任务执行执行";
}
@RequestMapping("/upDataByJson")
......
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