fix:命名统一调整

This commit is contained in:
曾浩 2020-09-21 10:51:22 +08:00
parent 00bc9656b6
commit 203790064d
7 changed files with 24 additions and 12 deletions

View File

@ -14,7 +14,7 @@ import java.io.Serializable;
*/
@Data
@NoArgsConstructor
public class MerchantWithdrawRequest implements Serializable {
public class SpWithdrawRequest implements Serializable {
/**
* <pre>
* 字段名商户提现单号

View File

@ -14,7 +14,7 @@ import java.io.Serializable;
*/
@Data
@NoArgsConstructor
public class MerchantWithdrawResult implements Serializable {
public class SpWithdrawResult implements Serializable {
/**
* <pre>

View File

@ -14,7 +14,7 @@ import java.io.Serializable;
*/
@Data
@NoArgsConstructor
public class EcommerceWithdrawRequest implements Serializable {
public class SubWithdrawRequest implements Serializable {
/**
* <pre>

View File

@ -14,7 +14,7 @@ import java.io.Serializable;
*/
@Data
@NoArgsConstructor
public class EcommerceWithdrawResult implements Serializable {
public class SubWithdrawResult implements Serializable {
/**
* <pre>

View File

@ -271,7 +271,7 @@ public interface EcommerceService {
* @return 返回数据 return withdraw result
* @throws WxPayException the wx pay exception
*/
EcommerceWithdrawResult withdraw(EcommerceWithdrawRequest request) throws WxPayException;
SubWithdrawResult subWithdraw(SubWithdrawRequest request) throws WxPayException;
/**
* <pre>
@ -283,5 +283,5 @@ public interface EcommerceService {
* @return 返回数据 return withdraw result
* @throws WxPayException the wx pay exception
*/
MerchantWithdrawResult withdraw(MerchantWithdrawRequest request) throws WxPayException;
SpWithdrawResult spWithdraw(SpWithdrawRequest request) throws WxPayException;
}

View File

@ -203,17 +203,17 @@ public class EcommerceServiceImpl implements EcommerceService {
}
@Override
public EcommerceWithdrawResult withdraw(EcommerceWithdrawRequest request) throws WxPayException {
public SubWithdrawResult subWithdraw(SubWithdrawRequest request) throws WxPayException {
String url = String.format("%s/v3/ecommerce/fund/withdraw", this.payService.getPayBaseUrl());
String response = this.payService.postV3(url, GSON.toJson(request));
return GSON.fromJson(response, EcommerceWithdrawResult.class);
return GSON.fromJson(response, SubWithdrawResult.class);
}
@Override
public MerchantWithdrawResult withdraw(MerchantWithdrawRequest request) throws WxPayException {
public SpWithdrawResult spWithdraw(SpWithdrawRequest request) throws WxPayException {
String url = String.format("%s/v3/merchant/fund/withdraw", this.payService.getPayBaseUrl());
String response = this.payService.postV3(url, GSON.toJson(request));
return GSON.fromJson(response, MerchantWithdrawResult.class);
return GSON.fromJson(response, SpWithdrawResult.class);
}
/**

View File

@ -59,8 +59,20 @@ public class EcommerceServiceImplTest {
//商户订单号
request.setOutTradeNo("");
//微信订单号
request.setTransactionId("4200000703202009180239466769");
PartnerTransactionsResult result = wxPayService.getEcommerceService().queryPartnerTransactions(request);
request.setTransactionId("");
wxPayService.getEcommerceService().queryPartnerTransactions(request);
}
@Test
public void testSubNowBalance() throws WxPayException {
String subMchid = "";
wxPayService.getEcommerceService().subNowBalance(subMchid);
}
@Test
public void testSubDayEndBalance() throws WxPayException {
String subMchid = "";
String date = "";
wxPayService.getEcommerceService().subDayEndBalance(subMchid,date);
}
}