diff --git a/schedule/src/main/java/com/hfkj/schedule/GasSchedule.java b/schedule/src/main/java/com/hfkj/schedule/GasSchedule.java index 1f032da..936091a 100644 --- a/schedule/src/main/java/com/hfkj/schedule/GasSchedule.java +++ b/schedule/src/main/java/com/hfkj/schedule/GasSchedule.java @@ -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("加好油【重庆壳牌】油站获取失败!!!"); + } + } } diff --git a/service/src/main/java/com/hfkj/channel/gas/shell/CqShellPetroleumGasService.java b/service/src/main/java/com/hfkj/channel/gas/shell/CqShellPetroleumGasService.java index 324edbe..9017c6b 100644 --- a/service/src/main/java/com/hfkj/channel/gas/shell/CqShellPetroleumGasService.java +++ b/service/src/main/java/com/hfkj/channel/gas/shell/CqShellPetroleumGasService.java @@ -3,7 +3,6 @@ package com.hfkj.channel.gas.shell; import com.alibaba.excel.util.CollectionUtils; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.hfkj.channel.gas.newlink.NewLinkRequestService; import com.hfkj.entity.BsGasOilGunNo; import com.hfkj.entity.BsGasOilPrice; import com.hfkj.entity.BsMerchant; @@ -14,7 +13,6 @@ import com.hfkj.service.merchant.BsMerchantService; import com.hfkj.sysenum.MerchantSourceTypeEnum; import com.hfkj.sysenum.MerchantStatusEnum; import com.hfkj.sysenum.gas.GasOilPriceStatusEnum; -import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; import javax.annotation.Resource;