Commit 7b44f219 by 查志伟

暴露查询虚拟门店接口

parent 28327a74
...@@ -103,4 +103,13 @@ public class ExposureOrderController { ...@@ -103,4 +103,13 @@ public class ExposureOrderController {
return ResponseUtil.success(exposureOrderService.getMallPayConfig(req)); return ResponseUtil.success(exposureOrderService.getMallPayConfig(req));
} }
/**
* 查询支付虚拟门店配置
*/
@ApiAnnotation(logMessage = "查询支付虚拟门店配置")
@PostMapping("/getVirtualStore")
public BaseResponse<String> getVirtualStore(@Validated @LogParams @RequestBody GetVirtualStoreRequest req) {
return ResponseUtil.success(exposureOrderService.getVirtualStore(req.getAppId(), req.getType()));
}
} }
package cn.freemud.entities.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @version V1.0
* @Title: GetMallPayConfigVo
* @Package cn.freemud.entities.vo
* @Description:
* @author: ping.wu
* @date: 22-5-24 下午5:51
* @Copyright: 2022 www.freemud.cn Inc. All rights reserved.
*/
@Data
public class GetVirtualStoreRequest {
@NotBlank(message = "商户号不能为空")
private String partnerId;
@NotBlank(message = "小程序id不能为空")
private String appId;
/**
* @see cn.freemud.enums.AggregationTypeEnum
*/
@NotBlank
private String type;
}
...@@ -14,7 +14,7 @@ public enum AggregationTypeEnum { ...@@ -14,7 +14,7 @@ public enum AggregationTypeEnum {
*/ */
TYPE_6("6","会员卡支付门店"), TYPE_6("6","会员卡支付门店"),
/** /**
* 微商城支付门店 * 微商城支付门店(FM商城)
*/ */
TYPE_7("7","微商城支付门店"), TYPE_7("7","微商城支付门店"),
/** /**
......
...@@ -72,4 +72,15 @@ public class ExposureOrderService { ...@@ -72,4 +72,15 @@ public class ExposureOrderService {
vo.setStoreId(wxAppStore.getStoreId()); vo.setStoreId(wxAppStore.getStoreId());
return vo; return vo;
} }
/**
* 查询支付虚拟门店配置
* @param appId 小程序应用appId
* @param type 虚拟门店类型 {@link AggregationTypeEnum}
* @return 虚拟门店号
*/
public String getVirtualStore(String appId, String type) {
AssortmentOpenPlatformIappWxappStore wxAppStore = payService.getIappWxappStoreInfo(appId, type);
return wxAppStore == null ? "" : wxAppStore.getStoreId();
}
} }
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