| | |
| | | package com.ruoyi.integration.util; |
| | | |
| | | import com.ruoyi.integration.mongodb.service.PingService; |
| | | import com.ruoyi.integration.mongodb.service.PongService; |
| | | import com.ruoyi.integration.rocket.produce.ChargingMessageListener; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | @Resource |
| | | private ChargingMessageListener chargingMessageListener; |
| | | |
| | | @Resource |
| | | private PingService pingService; |
| | | |
| | | @Resource |
| | | private PongService pongService; |
| | | |
| | | |
| | | /** |
| | | * 5分钟执行的定时任务 |
| | |
| | | public void taskMonth() { |
| | | chargingMessageListener.transactionRecord(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Scheduled(cron = "0 0 0 * * ?") |
| | | public void task2() { |
| | | pingService.delPing(); |
| | | pongService.delPong(); |
| | | } |
| | | } |