jiangqs
2023-08-06 431dde90aa20f7652092fc0bfa9e6a1a28b06b9f
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/util/WechatPayUtils.java
@@ -20,12 +20,13 @@
@Component
@AllArgsConstructor
public class WechatPayUtils {
    private final WxPayService wxService;
    /**
     * 电商二级商户进件(提交申请单)
     */
    public void ecommerceApply(ShopAuthentication shopAuthentication, String applyNumber, Shop shop) throws WxPayException {
    public ApplymentsResult ecommerceApply(ShopAuthentication shopAuthentication, String applyNumber, Shop shop) throws WxPayException {
        EcommerceService ecommerceService = wxService.getEcommerceService();
        ApplymentsRequest request = new ApplymentsRequest();
        //生成提交类
@@ -105,18 +106,18 @@
        request.setBusinessAdditionPics(shopAuthentication.getBaPics());
        request.setBusinessAdditionDesc(shopAuthentication.getBaDesc());
        ApplymentsResult result = ecommerceService.createApply(request);
        return ecommerceService.createApply(request);
    }
    /**
     * 通过查询申请状态API查询二级商户入驻申请结果
     * @param applyNumber 业务申请编号
     * @param applymentId 微信支付申请单号
     * @return 申请状态
     * @throws WxPayException
     */
    public ApplymentsStatusResult queryApplyStatusByOutRequestNo(String applyNumber) throws WxPayException {
        return wxService.getEcommerceService().queryApplyStatusByOutRequestNo(applyNumber);
    public ApplymentsStatusResult queryApplyStatusByApplymentId(String applymentId) throws WxPayException {
        return wxService.getEcommerceService().queryApplyStatusByApplymentId(applymentId);
    }
}