dev-discount
胡锐 2 years ago
parent 8b99b14929
commit e52365c058
  1. 16
      hai-service/src/main/java/com/hai/order/service/impl/OrderPayBeforeServiceImpl.java
  2. 2
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java

@ -1,13 +1,12 @@
package com.hai.order.service.impl; package com.hai.order.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;
import com.hai.config.WxOrderConfig; import com.hai.config.WxOrderConfig;
import com.hai.entity.HighChildOrder; import com.hai.entity.*;
import com.hai.entity.HighGasChannelConfig;
import com.hai.entity.HighMerchantTripartitePlatform;
import com.hai.entity.HighOrder;
import com.hai.enum_type.GasChannel; import com.hai.enum_type.GasChannel;
import com.hai.enum_type.GasChannelPayPlatformType; import com.hai.enum_type.GasChannelPayPlatformType;
import com.hai.enum_type.MerchantStoreSourceType; import com.hai.enum_type.MerchantStoreSourceType;
@ -19,6 +18,8 @@ import com.hai.service.HighGasService;
import com.hai.service.HighMerchantStoreService; import com.hai.service.HighMerchantStoreService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/** /**
* @className: payOrderCheckImpl * @className: payOrderCheckImpl
* @author: HuRui * @author: HuRui
@ -27,17 +28,18 @@ import org.springframework.stereotype.Service;
@Service("orderPayBeforeService") @Service("orderPayBeforeService")
public class OrderPayBeforeServiceImpl implements OrderPayBeforeService { public class OrderPayBeforeServiceImpl implements OrderPayBeforeService {
@Resource
private HighMerchantStoreService merchantStoreService; private HighMerchantStoreService merchantStoreService;
@Resource
private HighGasService gasService; private HighGasService gasService;
@Resource
private HighGasChannelConfigService gasChannelConfigService; private HighGasChannelConfigService gasChannelConfigService;
@Override @Override
public void payOrderCheck(HighOrder order) { public void payOrderCheck(HighOrder order) {
if (order.getProductType().equals(OrderProductType.PRODUCT_TYPE6.getNumber())) { if (order.getProductType().equals(OrderProductType.PRODUCT_TYPE6.getNumber())) {
// 查询油站 // 查询油站
HighMerchantStoreModel store = merchantStoreService.getMerchantStoreById(order.getHighChildOrderList().get(0).getGoodsId()); HighMerchantStore store = merchantStoreService.getDetailById(order.getHighChildOrderList().get(0).getGoodsId());
if (store == null) { if (store == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的加油站"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的加油站");
} }

@ -421,7 +421,7 @@ public class OrderServiceImpl implements OrderService {
} else if (orderData.getOrderStatus().equals(OrderStatus.STATUS2.getNumber())) { } else if (orderData.getOrderStatus().equals(OrderStatus.STATUS2.getNumber())) {
// 支付校验 // 支付校验
orderPayBeforeService.payOrderCheck(orderData); orderPayBeforeService.payOrderCheck(order);
// 处理业务 // 处理业务
return paySuccessService.orderPaySuccessHandle(orderData.getOrderNo(), OrderPayType.PAY_TYPE3, null, new BigDecimal("0"), null); return paySuccessService.orderPaySuccessHandle(orderData.getOrderNo(), OrderPayType.PAY_TYPE3, null, new BigDecimal("0"), null);
} }

Loading…
Cancel
Save