Commit 9ff31a53 authored by liucx's avatar liucx

打印日志

parent aa3046e4
...@@ -31,33 +31,41 @@ public class TimedTaskController { ...@@ -31,33 +31,41 @@ public class TimedTaskController {
@ApiOperation(value = "日统计沟通记录次数", notes = "日统计沟通记录次数 ", httpMethod = "GET") @ApiOperation(value = "日统计沟通记录次数", notes = "日统计沟通记录次数 ", httpMethod = "GET")
@GetMapping("dayCommunication") @GetMapping("dayCommunication")
@Scheduled(cron = "0 25 12,16 * * ?") // @Scheduled(cron = "0 25 12,16 * * ?")
@Scheduled(cron = "0 34 12,17 * * ?")
public CommonResult dayCommunicationCount() { public CommonResult dayCommunicationCount() {
communicationRecordStatisticalLogService.saveOrUpdateDay(); communicationRecordStatisticalLogService.saveOrUpdateDay();
logger.info("日统计沟通记录次数成功");
return CommonResult.success("日统计沟通记录次数成功"); return CommonResult.success("日统计沟通记录次数成功");
} }
@ApiOperation(value = "周统计沟通记录次数", notes = "周统计沟通记录次数 ", httpMethod = "GET") @ApiOperation(value = "周统计沟通记录次数", notes = "周统计沟通记录次数 ", httpMethod = "GET")
@GetMapping("weekCommunication") @GetMapping("weekCommunication")
@Scheduled(cron = "0 15 12,16 * * ?") @Scheduled(cron = "0 33 12,17 * * ?")
//@Scheduled(cron = "0 15 12,16 * * ?")
public CommonResult weekCommunicationCount() { public CommonResult weekCommunicationCount() {
communicationRecordStatisticalLogService.saveOrUpdateWeek(); communicationRecordStatisticalLogService.saveOrUpdateWeek();
logger.info("日统计沟通记录次数成功");
return CommonResult.success("日统计沟通记录次数成功"); return CommonResult.success("日统计沟通记录次数成功");
} }
@ApiOperation(value = "月统计沟通记录次数", notes = "月统计沟通记录次数 ", httpMethod = "GET") @ApiOperation(value = "月统计沟通记录次数", notes = "月统计沟通记录次数 ", httpMethod = "GET")
@GetMapping("mothCommunication") @GetMapping("mothCommunication")
@Scheduled(cron = "0 20 12,16 * * ?") @Scheduled(cron = "0 32 12,17 * * ?")
// @Scheduled(cron = "0 20 12,16 * * ?")
public CommonResult monthCommunicationCount() { public CommonResult monthCommunicationCount() {
communicationRecordStatisticalLogService.saveOrUpdateMonth(); communicationRecordStatisticalLogService.saveOrUpdateMonth();
return CommonResult.success("日统计沟通记录次数成功"); logger.info("月统计沟通记录次数成功");
return CommonResult.success("月统计沟通记录次数");
} }
@ApiOperation(value = "总数据统计", notes = "总数据统计 ", httpMethod = "GET") @ApiOperation(value = "总数据统计", notes = "总数据统计 ", httpMethod = "GET")
@Scheduled(cron = "0 10 8,12,17 * * ?") // @Scheduled(cron = "0 10 8,12,17 * * ?")
@Scheduled(cron = "0 31 8,12,17 * * ?")
public CommonResult totalommunication() { public CommonResult totalommunication() {
communicationRecordStatisticalLogService.totalommunication(); communicationRecordStatisticalLogService.totalommunication();
return CommonResult.success("日统计沟通记录次数成功"); logger.info("总统计沟通记录次数成功");
return CommonResult.success("总统计沟通记录次数成功");
} }
...@@ -68,6 +76,7 @@ public class TimedTaskController { ...@@ -68,6 +76,7 @@ public class TimedTaskController {
@Scheduled(cron = "59 59 23 * * ? ") @Scheduled(cron = "59 59 23 * * ? ")
public CommonResult dayCommunicationReset() { public CommonResult dayCommunicationReset() {
communicationRecordStatisticalLogService.dayCommunicationReset(); communicationRecordStatisticalLogService.dayCommunicationReset();
logger.info("日清零成功");
return CommonResult.success("日统计记录清零成功"); return CommonResult.success("日统计记录清零成功");
} }
...@@ -76,14 +85,17 @@ public class TimedTaskController { ...@@ -76,14 +85,17 @@ public class TimedTaskController {
@Scheduled(cron = "0 0 23 ? * 1") @Scheduled(cron = "0 0 23 ? * 1")
public CommonResult weekCommunicationReset() { public CommonResult weekCommunicationReset() {
communicationRecordStatisticalLogService.weekCommunicationReset(); communicationRecordStatisticalLogService.weekCommunicationReset();
return CommonResult.success("日统计记录清零成功"); logger.info("周清零成功");
return CommonResult.success("周清零成功");
} }
@ApiOperation(value = "月清零", notes = "月清零 ", httpMethod = "GET") @ApiOperation(value = "月清零", notes = "月清零 ", httpMethod = "GET")
@GetMapping("mothCommunicationReset") @GetMapping("mothCommunicationReset")
@Scheduled(cron = "0 0 23 L * ?") @Scheduled(cron = "0 0 23 L * ?")
public CommonResult mothCommunicationReset() { public CommonResult mothCommunicationReset() {
communicationRecordStatisticalLogService.mothCommunicationReset(); communicationRecordStatisticalLogService.mothCommunicationReset();
return CommonResult.success("日统计记录清零成功"); logger.info("月清零成功");
return CommonResult.success("月清零成功");
} }
......
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