完成重庆壳牌

master
胡锐 4 months ago
parent 36f6e25c07
commit d944468253
  1. 14
      schedule/src/main/java/com/hfkj/schedule/GasSchedule.java
  2. 2
      service/src/main/java/com/hfkj/channel/gas/shell/CqShellPetroleumGasService.java

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

@ -3,7 +3,6 @@ package com.hfkj.channel.gas.shell;
import com.alibaba.excel.util.CollectionUtils; import com.alibaba.excel.util.CollectionUtils;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hfkj.channel.gas.newlink.NewLinkRequestService;
import com.hfkj.entity.BsGasOilGunNo; import com.hfkj.entity.BsGasOilGunNo;
import com.hfkj.entity.BsGasOilPrice; import com.hfkj.entity.BsGasOilPrice;
import com.hfkj.entity.BsMerchant; import com.hfkj.entity.BsMerchant;
@ -14,7 +13,6 @@ import com.hfkj.service.merchant.BsMerchantService;
import com.hfkj.sysenum.MerchantSourceTypeEnum; import com.hfkj.sysenum.MerchantSourceTypeEnum;
import com.hfkj.sysenum.MerchantStatusEnum; import com.hfkj.sysenum.MerchantStatusEnum;
import com.hfkj.sysenum.gas.GasOilPriceStatusEnum; import com.hfkj.sysenum.gas.GasOilPriceStatusEnum;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;

Loading…
Cancel
Save