| | |
| | | //package com.ruoyi.integration.util; |
| | | // |
| | | //import com.ruoyi.integration.mongodb.service.*; |
| | | //import org.springframework.boot.web.context.WebServerInitializedEvent; |
| | | //import org.springframework.context.ApplicationListener; |
| | | //import org.springframework.scheduling.annotation.Scheduled; |
| | | //import org.springframework.stereotype.Component; |
| | | // |
| | |
| | | // * @Date 2025/5/21 11:43 |
| | | // */ |
| | | //@Component |
| | | //public class TaskUtil { |
| | | //public class TaskUtil implements ApplicationListener<WebServerInitializedEvent> { |
| | | // |
| | | // @Resource |
| | | // private AcquisitionBillingModeReplyService acquisitionBillingModeReplyService; |
| | |
| | | // @Resource |
| | | // private ChargingHandshakeService chargingHandshakeService; |
| | | // |
| | | // private Integer port = null; |
| | | // |
| | | // @Override |
| | | // public void onApplicationEvent(WebServerInitializedEvent event) { |
| | | // port = event.getWebServer().getPort(); |
| | | // } |
| | | // |
| | | // |
| | | // /** |
| | | // * 定时任务 |
| | | // */ |
| | | // @Scheduled(cron = "0 0 9 * * ?") |
| | | // public void run(){ |
| | | // //获取当前运行的端口号 |
| | | // String port = System.getProperty("server.port"); |
| | | // if("5071".equals(port)){ |
| | | // if(null != port && port == 5701){ |
| | | // acquisitionBillingModeReplyService.taskDelete(); |
| | | // acquisitionBillingModeService.taskDelete(); |
| | | // billingModeVerifyReplyService.taskDelete(); |