Pu Zhibing
1 天以前 fac94f9e4c24f436662170d8194d238bfa4ad363
ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/util/TaskUtil.java
@@ -1,6 +1,8 @@
//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;
//
@@ -12,7 +14,7 @@
// * @Date 2025/5/21 11:43
// */
//@Component
//public class TaskUtil {
//public class TaskUtil implements ApplicationListener<WebServerInitializedEvent> {
//
//   @Resource
//   private AcquisitionBillingModeReplyService acquisitionBillingModeReplyService;
@@ -38,15 +40,20 @@
//   @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("5701".equals(port)){
//      if(null != port && port == 5701){
//         acquisitionBillingModeReplyService.taskDelete();
//         acquisitionBillingModeService.taskDelete();
//         billingModeVerifyReplyService.taskDelete();