mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-11-03 13:51:44 +08:00
fix:命名统一调整
This commit is contained in:
@ -14,7 +14,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class MerchantWithdrawRequest implements Serializable {
|
public class SpWithdrawRequest implements Serializable {
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* 字段名:商户提现单号
|
* 字段名:商户提现单号
|
||||||
@ -14,7 +14,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class MerchantWithdrawResult implements Serializable {
|
public class SpWithdrawResult implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
@ -14,7 +14,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class EcommerceWithdrawRequest implements Serializable {
|
public class SubWithdrawRequest implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
@ -14,7 +14,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class EcommerceWithdrawResult implements Serializable {
|
public class SubWithdrawResult implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
@ -271,7 +271,7 @@ public interface EcommerceService {
|
|||||||
* @return 返回数据 return withdraw result
|
* @return 返回数据 return withdraw result
|
||||||
* @throws WxPayException the wx pay exception
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
EcommerceWithdrawResult withdraw(EcommerceWithdrawRequest request) throws WxPayException;
|
SubWithdrawResult subWithdraw(SubWithdrawRequest request) throws WxPayException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
@ -283,5 +283,5 @@ public interface EcommerceService {
|
|||||||
* @return 返回数据 return withdraw result
|
* @return 返回数据 return withdraw result
|
||||||
* @throws WxPayException the wx pay exception
|
* @throws WxPayException the wx pay exception
|
||||||
*/
|
*/
|
||||||
MerchantWithdrawResult withdraw(MerchantWithdrawRequest request) throws WxPayException;
|
SpWithdrawResult spWithdraw(SpWithdrawRequest request) throws WxPayException;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -203,17 +203,17 @@ public class EcommerceServiceImpl implements EcommerceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 url = String.format("%s/v3/ecommerce/fund/withdraw", this.payService.getPayBaseUrl());
|
||||||
String response = this.payService.postV3(url, GSON.toJson(request));
|
String response = this.payService.postV3(url, GSON.toJson(request));
|
||||||
return GSON.fromJson(response, EcommerceWithdrawResult.class);
|
return GSON.fromJson(response, SubWithdrawResult.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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 url = String.format("%s/v3/merchant/fund/withdraw", this.payService.getPayBaseUrl());
|
||||||
String response = this.payService.postV3(url, GSON.toJson(request));
|
String response = this.payService.postV3(url, GSON.toJson(request));
|
||||||
return GSON.fromJson(response, MerchantWithdrawResult.class);
|
return GSON.fromJson(response, SpWithdrawResult.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -59,8 +59,20 @@ public class EcommerceServiceImplTest {
|
|||||||
//商户订单号
|
//商户订单号
|
||||||
request.setOutTradeNo("");
|
request.setOutTradeNo("");
|
||||||
//微信订单号
|
//微信订单号
|
||||||
request.setTransactionId("4200000703202009180239466769");
|
request.setTransactionId("");
|
||||||
PartnerTransactionsResult result = wxPayService.getEcommerceService().queryPartnerTransactions(request);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user