Commit c9b9a18c by 徐光兴

fix 卖券订单创建兼容储值卡支付

parent b552280c
...@@ -365,19 +365,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService { ...@@ -365,19 +365,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
CreateOrderRequest createOrderRequest = (CreateOrderRequest) createOrderRequestResponse.getResult(); CreateOrderRequest createOrderRequest = (CreateOrderRequest) createOrderRequestResponse.getResult();
//标准化平台虚拟商品特价活动计算,不包含蜜雪APP买虚拟商品 //标准化平台虚拟商品特价活动计算,不包含蜜雪APP买虚拟商品
List<ActivityUpdateStockRequest.StockBeanDto> stockBeanDtos = calculationDiscount(partnerId, storeId, userLoginInfoDto.getMemberId(), productInfosDto.getData().getProducts().get(0), createOrderRequest); List<ActivityUpdateStockRequest.StockBeanDto> stockBeanDtos = calculationDiscount(partnerId, storeId, userLoginInfoDto.getMemberId(), productInfosDto.getData().getProducts().get(0), createOrderRequest);
//查询虚拟商品卖券支付配置中的分账门店信息
//如果需要分账查询支付配置中的分账门店信息,否则查询sdk
AssortmentOpenPlatformIappWxappStore wxAppStore = new AssortmentOpenPlatformIappWxappStore();
if(createOrderRequest.getIsSplitAccount() != null && createOrderRequest.getIsSplitAccount() == 1){
//11-虚拟卖券门店
wxAppStore = payService.getIappWxappStoreInfo(userLoginInfoDto.getWxAppId(),"11");
}else {
wxAppStore = assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(userLoginInfoDto.getWxAppId(),storeId);
}
if ((wxAppStore == null || wxAppStore.getClientCode() == null)) {
return ResponseUtil.error(ResponseCodeConstant.RESPONSE_ERROR_STR, "支付门店未配置");
}
createOrderRequest.setStoreId(storeId);
OrderBaseResp<OrderInfoReqs> orderInfoReqsBaseResponse = orderSdkService.createOrder(createOrderRequest, trackingNo); OrderBaseResp<OrderInfoReqs> orderInfoReqsBaseResponse = orderSdkService.createOrder(createOrderRequest, trackingNo);
CreateOrderResponse createOrderResponse = orderSdkAdapter.convent2NEWOrderInfoReqs(orderInfoReqsBaseResponse); CreateOrderResponse createOrderResponse = orderSdkAdapter.convent2NEWOrderInfoReqs(orderInfoReqsBaseResponse);
if (createOrderResponse == null || createOrderResponse.getErrcode() != 100) { if (createOrderResponse == null || createOrderResponse.getErrcode() != 100) {
...@@ -464,7 +452,23 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService { ...@@ -464,7 +452,23 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
orderExtInfoDto.setFromAppId(userLoginInfoDto.getWxAppId()); orderExtInfoDto.setFromAppId(userLoginInfoDto.getWxAppId());
orderExtInfoDto.setUnDistribution(requestVo.getUnDistribution()); orderExtInfoDto.setUnDistribution(requestVo.getUnDistribution());
createPrepayRequestDto.setOrderExtInfoDTO(orderExtInfoDto); createPrepayRequestDto.setOrderExtInfoDTO(orderExtInfoDto);
if (StringUtils.isNotBlank(requestVo.getCardCode())) {
return ResponseUtil.success(payService.createPrepayOrder(createPrepayRequestDto));
}
//查询虚拟商品卖券支付配置中的分账门店信息
//如果需要分账查询支付配置中的分账门店信息,否则查询sdk
AssortmentOpenPlatformIappWxappStore wxAppStore = new AssortmentOpenPlatformIappWxappStore();
if(createOrderRequest.getIsSplitAccount() != null && createOrderRequest.getIsSplitAccount() == 1){
//11-虚拟卖券门店
wxAppStore = payService.getIappWxappStoreInfo(userLoginInfoDto.getWxAppId(),"11");
}else {
wxAppStore = assortmentOpenPlatformIappWxappStoreManager.selectWxappStoreByWxAppIdAndStoreId(userLoginInfoDto.getWxAppId(),storeId);
}
if ((wxAppStore == null || wxAppStore.getClientCode() == null)) {
return ResponseUtil.error(ResponseCodeConstant.RESPONSE_ERROR_STR, "支付门店未配置");
}
createOrderRequest.setStoreId(storeId);
//创建卖券预支付 //创建卖券预支付
OrderInfoReqs result = orderInfoReqsBaseResponse.getResult(); OrderInfoReqs result = orderInfoReqsBaseResponse.getResult();
String orderCode = result.getOrderCode(); String orderCode = result.getOrderCode();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment