diff --git a/hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java b/hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java index df13d2dd..a596365c 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java @@ -17,6 +17,7 @@ import com.hai.dao.HighUserCouponMapper; import com.hai.entity.*; import com.hai.enum_type.MerStoreAmountSourceTypeEnum; import com.hai.enum_type.MerStoreAmountTypeEnum; +import com.hai.enum_type.MerchantStoreSourceType; import com.hai.enum_type.OrderPushType; import com.hai.model.HighMerchantStoreModel; import com.hai.model.ResponseData; @@ -118,6 +119,9 @@ public class UnionPayController { @Resource private ApiMemberProductService apiMemberProductService; + @Resource + private ShellGroupService shellGroupService; + @RequestMapping(value = "/notify", method = RequestMethod.POST) @ApiOperation(value = "银联支付 -> 异步回调") public void notify(@RequestBody String params,HttpServletRequest request, HttpServletResponse response) { @@ -343,6 +347,16 @@ public class UnionPayController { if (orderPushObject != null && orderPushObject.getString("code").equals("200")) { highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); } + } else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { + + // 推送壳牌 + JSONObject syncPayment = shellGroupService.gasSyncPayment(order.getOrderNo(), + store.getStoreKey(), + order.getPayTime(), + highChildOrder.getGasPriceGun(), + highChildOrder.getGasOilNo(), + highChildOrder.getGasGunNo(), + order.getTotalPrice()); } } if (highChildOrder.getGoodsType() == 4 || highChildOrder.getGoodsType() == 9) { diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java index 6e7eb7b4..6f52eb2b 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java @@ -12,10 +12,7 @@ import com.hai.entity.HighMerchantStore; import com.hai.enum_type.GasOilPriceStatusEnum; import com.hai.model.HighMerchantModel; import com.hai.model.HighMerchantStoreModel; -import com.hai.service.HighGasOilPriceOfficialService; -import com.hai.service.HighGasOilPriceService; -import com.hai.service.HighMerchantService; -import com.hai.service.HighMerchantStoreService; +import com.hai.service.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; @@ -42,6 +39,9 @@ public class HighGasSchedule { @Resource private HighGasOilPriceOfficialService gasOilPriceOfficialService; + @Resource + private HighGasService gasService; + @Scheduled(cron = "0 0 1 * * ?") //每日凌晨1点执行一次 public void certification() throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(39L); @@ -151,6 +151,11 @@ public class HighGasSchedule { } } + @Scheduled(cron = "0 1 0 * * ?") //每日凌晨12点01分执行一次 + public void getJiaHaoYouAllStation() throws Exception { + gasService.getJiaHaoYouAllStation(); + } + /* @Scheduled(cron = "0 30 7 * * ?") //每日7点1分执行一次 public void refreshPriceOfficial() throws Exception { gasOilPriceOfficialService.refreshPriceOfficial(); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java index e93dc92b..490736f5 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java @@ -749,6 +749,16 @@ public class HighOrderServiceImpl implements HighOrderService { if (orderPushObject != null && orderPushObject.getString("code").equals("200")) { highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); } + } else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { + + // 推送壳牌 + JSONObject syncPayment = shellGroupService.gasSyncPayment(order.getOrderNo(), + store.getStoreKey(), + order.getPayTime(), + highChildOrder.getGasPriceGun(), + highChildOrder.getGasOilNo(), + highChildOrder.getGasGunNo(), + order.getTotalPrice()); } } @@ -1054,6 +1064,16 @@ public class HighOrderServiceImpl implements HighOrderService { if (orderPushObject != null && orderPushObject.getString("code").equals("200")) { highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); } + } else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { + + // 推送壳牌 + JSONObject syncPayment = shellGroupService.gasSyncPayment(order.getOrderNo(), + store.getStoreKey(), + order.getPayTime(), + highChildOrder.getGasPriceGun(), + highChildOrder.getGasOilNo(), + highChildOrder.getGasGunNo(), + order.getTotalPrice()); } } diff --git a/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java index 481259c7..879f3c52 100644 --- a/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java @@ -128,6 +128,9 @@ public class GoodsOrderServiceImpl implements PayService { @Resource private HighGasChannelConfigService gasChannelConfigService; + @Resource + private ShellGroupService shellGroupService; + @Override @Transactional(propagation= Propagation.REQUIRES_NEW) public void paySuccess(Map map, String payType) throws Exception { @@ -336,6 +339,16 @@ public class GoodsOrderServiceImpl implements PayService { if (orderPushObject != null && orderPushObject.getString("code").equals("200")) { highChildOrder.setGasOrderNo(orderPushObject.getJSONObject("result").getString("orderNo")); } + } else if (store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber())) { + + // 推送壳牌 + JSONObject syncPayment = shellGroupService.gasSyncPayment(order.getOrderNo(), + store.getStoreKey(), + order.getPayTime(), + highChildOrder.getGasPriceGun(), + highChildOrder.getGasOilNo(), + highChildOrder.getGasGunNo(), + order.getTotalPrice()); } }