|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
package com.hfkj.schedule; |
|
|
|
|
|
|
|
|
|
import com.hfkj.channel.gas.newlink.NewLinkGasService; |
|
|
|
|
import com.hfkj.channel.gas.shell.CqShellPetroleumGasService; |
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled; |
|
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
|
@ -16,12 +17,23 @@ import javax.annotation.Resource; |
|
|
|
|
public class GasSchedule { |
|
|
|
|
@Resource |
|
|
|
|
private NewLinkGasService newLinkGasService; |
|
|
|
|
@Resource |
|
|
|
|
private CqShellPetroleumGasService cqShellPetroleumGasService; |
|
|
|
|
@Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次
|
|
|
|
|
public void GasSchedule() { |
|
|
|
|
public void newLinkGasSchedule() { |
|
|
|
|
try { |
|
|
|
|
newLinkGasService.refresh(); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
System.out.println("能链【团油】油站获取失败!!!"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次
|
|
|
|
|
public void cqGasSchedule() { |
|
|
|
|
try { |
|
|
|
|
cqShellPetroleumGasService.refresh(); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
System.out.println("加好油【重庆壳牌】油站获取失败!!!"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|