|
|
@ -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, "未知的加油站"); |
|
|
|
} |
|
|
|
} |
|
|
|