Commit 31bbed7c by ping.wu

订单宝购买储值卡支付虚拟门店,订单宝暂无appid

parent c2fc4bc7
...@@ -128,7 +128,7 @@ public class ExposureOrderController { ...@@ -128,7 +128,7 @@ public class ExposureOrderController {
@ApiAnnotation(logMessage = "查询支付虚拟门店配置") @ApiAnnotation(logMessage = "查询支付虚拟门店配置")
@PostMapping("/getVirtualStore") @PostMapping("/getVirtualStore")
public BaseResponse<String> getVirtualStore(@Validated @LogParams @RequestBody GetVirtualStoreRequest req) { public BaseResponse<String> getVirtualStore(@Validated @LogParams @RequestBody GetVirtualStoreRequest req) {
return ResponseUtil.success(exposureOrderService.getVirtualStore(req.getAppId(), req.getType())); return ResponseUtil.success(exposureOrderService.getVirtualStore(req.getPartnerId(),req.getAppId(), req.getType()));
} }
/** /**
......
...@@ -33,7 +33,7 @@ public enum AggregationTypeEnum { ...@@ -33,7 +33,7 @@ public enum AggregationTypeEnum {
* 虚拟卖券分账支付门店 * 虚拟卖券分账支付门店
*/ */
TYPE_11("11","虚拟卖券分账支付门店"), TYPE_11("11","虚拟卖券分账支付门店"),
TYPE_12("12",""), TYPE_12("12","储值卡支付门店"),
/** /**
* 视频号卖券支付门店 * 视频号卖券支付门店
*/ */
......
...@@ -95,7 +95,12 @@ public class ExposureOrderService { ...@@ -95,7 +95,12 @@ public class ExposureOrderService {
* @param type 虚拟门店类型 {@link AggregationTypeEnum} * @param type 虚拟门店类型 {@link AggregationTypeEnum}
* @return 虚拟门店号 * @return 虚拟门店号
*/ */
public String getVirtualStore(String appId, String type) { public String getVirtualStore(String partnerId,String appId, String type) {
//订单宝购买储值卡支付虚拟门店,订单宝暂无appid
if(type.equals("12") && appId.equals("12")){
AssortmentOpenPlatformIappWxappStore virtualStore = payService.getVirtualStore(partnerId, type);
return virtualStore == null ? "" : virtualStore.getStoreId();
}
AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(appId, type); AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(appId, type);
return wxAppStore == null ? "" : wxAppStore.getStoreId(); return wxAppStore == null ? "" : wxAppStore.getStoreId();
} }
......
...@@ -1251,6 +1251,17 @@ public class PayServiceImpl { ...@@ -1251,6 +1251,17 @@ public class PayServiceImpl {
return wxAppStore; return wxAppStore;
} }
public AssortmentOpenPlatformIappWxappStore getVirtualStore(String partnerId, String aggregationType) {
AssortmentOpenPlatformIappWxappStore wxappStore = new AssortmentOpenPlatformIappWxappStore();
wxappStore.setPartnerId(partnerId);
wxappStore.setAggregationType(aggregationType);
List<AssortmentOpenPlatformIappWxappStore> virtualStoreList = assortmentOpenPlatformIappWxappStoreManager.queryList(wxappStore);
if(CollectionUtils.isEmpty(virtualStoreList)){
return null;
}
return virtualStoreList.get(virtualStoreList.size()-1);
}
public UnifiedOrderRequestDto convert2UnifiedOrderRequestDto(UnifiedOrderCom com) { public UnifiedOrderRequestDto convert2UnifiedOrderRequestDto(UnifiedOrderCom com) {
......
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