🎨 #3154 【微信支付】修复按日下载提现异常文件接口响应异常
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.github.binarywang.wxpay.service;
|
package com.github.binarywang.wxpay.service;
|
||||||
|
|
||||||
import com.github.binarywang.wxpay.bean.marketing.payroll.*;
|
import com.github.binarywang.wxpay.bean.marketing.payroll.*;
|
||||||
|
import com.github.binarywang.wxpay.bean.result.WxPayApplyBillV3Result;
|
||||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -98,6 +99,6 @@ public interface PayrollService {
|
|||||||
* @return 返回数据
|
* @return 返回数据
|
||||||
* @throws WxPayException the wx pay exception
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
PreOrderWithAuthResult merchantFundWithdrawBillType(String billType, String billDate) throws WxPayException;
|
WxPayApplyBillV3Result merchantFundWithdrawBillType(String billType, String billDate, String tarType) throws WxPayException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.github.binarywang.wxpay.service.impl;
|
package com.github.binarywang.wxpay.service.impl;
|
||||||
|
|
||||||
import com.github.binarywang.wxpay.bean.marketing.payroll.*;
|
import com.github.binarywang.wxpay.bean.marketing.payroll.*;
|
||||||
|
import com.github.binarywang.wxpay.bean.result.WxPayApplyBillV3Result;
|
||||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||||
import com.github.binarywang.wxpay.service.PayrollService;
|
import com.github.binarywang.wxpay.service.PayrollService;
|
||||||
import com.github.binarywang.wxpay.service.WxPayService;
|
import com.github.binarywang.wxpay.service.WxPayService;
|
||||||
@@ -182,11 +183,14 @@ public class PayrollServiceImpl implements PayrollService {
|
|||||||
* @throws WxPayException the wx pay exception
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PreOrderWithAuthResult merchantFundWithdrawBillType(String billType, String billDate) throws WxPayException {
|
public WxPayApplyBillV3Result merchantFundWithdrawBillType(String billType, String billDate, String tarType) throws WxPayException {
|
||||||
String url = String.format("%s/v3/merchant/fund/withdraw/bill-type/%s", payService.getPayBaseUrl(), billType);
|
String url = String.format("%s/v3/merchant/fund/withdraw/bill-type/%s", payService.getPayBaseUrl(), billType);
|
||||||
String query = String.format("?bill_date=%s", billDate);
|
String query = String.format("?bill_date=%s", billDate);
|
||||||
|
if (StringUtils.isNotBlank(tarType)) {
|
||||||
|
query += String.format("&tar_type=%s", tarType);
|
||||||
|
}
|
||||||
String response = payService.getV3(url + query);
|
String response = payService.getV3(url + query);
|
||||||
return GSON.fromJson(response, PreOrderWithAuthResult.class);
|
return GSON.fromJson(response, WxPayApplyBillV3Result.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.github.binarywang.wxpay.service.impl;
|
|||||||
import com.github.binarywang.wxpay.bean.marketing.payroll.*;
|
import com.github.binarywang.wxpay.bean.marketing.payroll.*;
|
||||||
import com.github.binarywang.wxpay.bean.marketing.transfer.PartnerTransferRequest;
|
import com.github.binarywang.wxpay.bean.marketing.transfer.PartnerTransferRequest;
|
||||||
import com.github.binarywang.wxpay.bean.marketing.transfer.PartnerTransferResult;
|
import com.github.binarywang.wxpay.bean.marketing.transfer.PartnerTransferResult;
|
||||||
|
import com.github.binarywang.wxpay.bean.result.WxPayApplyBillV3Result;
|
||||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||||
import com.github.binarywang.wxpay.service.WxPayService;
|
import com.github.binarywang.wxpay.service.WxPayService;
|
||||||
import com.github.binarywang.wxpay.testbase.ApiTestModule;
|
import com.github.binarywang.wxpay.testbase.ApiTestModule;
|
||||||
@@ -120,9 +121,8 @@ public class PayrollServiceImplTest {
|
|||||||
public void merchantFundWithdrawBillType() throws WxPayException {
|
public void merchantFundWithdrawBillType() throws WxPayException {
|
||||||
String billType = "NO_SUCC";
|
String billType = "NO_SUCC";
|
||||||
String billDate = "2019-08-17";
|
String billDate = "2019-08-17";
|
||||||
PreOrderWithAuthResult preOrderWithAuthResult = wxPayService.getPayrollService().merchantFundWithdrawBillType(billType, billDate);
|
WxPayApplyBillV3Result result = wxPayService.getPayrollService().merchantFundWithdrawBillType(billType, billDate, null);
|
||||||
log.info(preOrderWithAuthResult.toString());
|
log.info(result.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user