mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-14 05:43:46 +08:00
解决冲突
This commit is contained in:
@@ -24,6 +24,7 @@
|
|||||||
- [payment-spring-boot GitHub文档](https://notfound403.github.io/payment-spring-boot)
|
- [payment-spring-boot GitHub文档](https://notfound403.github.io/payment-spring-boot)
|
||||||
- [payment-spring-boot Gitee文档](https://felord.gitee.io/payment-spring-boot)
|
- [payment-spring-boot Gitee文档](https://felord.gitee.io/payment-spring-boot)
|
||||||
|
|
||||||
|
|
||||||
## 目前已经实现所有服务商和直连商户接口
|
## 目前已经实现所有服务商和直连商户接口
|
||||||
|
|
||||||
- 实现微信支付多商户
|
- 实现微信支付多商户
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class WechatBatchTransferApi extends AbstractApi {
|
|||||||
List<CreateBatchTransferParams.TransferDetailListItem> encrypted = transferDetailList.stream()
|
List<CreateBatchTransferParams.TransferDetailListItem> encrypted = transferDetailList.stream()
|
||||||
.peek(transferDetailListItem -> {
|
.peek(transferDetailListItem -> {
|
||||||
String userName = transferDetailListItem.getUserName();
|
String userName = transferDetailListItem.getUserName();
|
||||||
if (StringUtils.hasText(userName)){
|
if (StringUtils.hasText(userName)) {
|
||||||
String encryptedUserName = signatureProvider.encryptRequestMessage(userName, x509Certificate);
|
String encryptedUserName = signatureProvider.encryptRequestMessage(userName, x509Certificate);
|
||||||
transferDetailListItem.setUserName(encryptedUserName);
|
transferDetailListItem.setUserName(encryptedUserName);
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,20 @@ public class WechatBatchTransferApi extends AbstractApi {
|
|||||||
public WechatResponseEntity<ObjectNode> queryBatchByBatchId(QueryBatchTransferParams queryBatchTransferParams) {
|
public WechatResponseEntity<ObjectNode> queryBatchByBatchId(QueryBatchTransferParams queryBatchTransferParams) {
|
||||||
WechatResponseEntity<ObjectNode> wechatResponseEntity = new WechatResponseEntity<>();
|
WechatResponseEntity<ObjectNode> wechatResponseEntity = new WechatResponseEntity<>();
|
||||||
this.client().withType(WechatPayV3Type.BATCH_TRANSFER_BATCH_ID, queryBatchTransferParams)
|
this.client().withType(WechatPayV3Type.BATCH_TRANSFER_BATCH_ID, queryBatchTransferParams)
|
||||||
.function(this::apply)
|
.function((type, params) -> {
|
||||||
|
MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
|
||||||
|
queryParams.add("need_query_detail", params.getNeedQueryDetail().toString());
|
||||||
|
queryParams.add("offset", params.getOffset().toString());
|
||||||
|
queryParams.add("limit", params.getLimit().toString());
|
||||||
|
queryParams.add("detail_status", params.getDetailStatus().name());
|
||||||
|
|
||||||
|
URI uri = UriComponentsBuilder.fromHttpUrl(type.uri(WeChatServer.CHINA))
|
||||||
|
.queryParams(queryParams)
|
||||||
|
.build()
|
||||||
|
.expand(params.getCode())
|
||||||
|
.toUri();
|
||||||
|
return Get(uri);
|
||||||
|
})
|
||||||
.consumer(wechatResponseEntity::convert)
|
.consumer(wechatResponseEntity::convert)
|
||||||
.request();
|
.request();
|
||||||
return wechatResponseEntity;
|
return wechatResponseEntity;
|
||||||
@@ -391,19 +404,4 @@ public class WechatBatchTransferApi extends AbstractApi {
|
|||||||
.request();
|
.request();
|
||||||
return wechatResponseEntity;
|
return wechatResponseEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
private RequestEntity<?> apply(WechatPayV3Type type, QueryBatchTransferParams params) {
|
|
||||||
MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
|
|
||||||
queryParams.add("need_query_detail", params.getNeedQueryDetail().toString());
|
|
||||||
queryParams.add("offset", params.getOffset().toString());
|
|
||||||
queryParams.add("limit", params.getLimit().toString());
|
|
||||||
queryParams.add("detail_status", params.getDetailStatus().name());
|
|
||||||
|
|
||||||
URI uri = UriComponentsBuilder.fromHttpUrl(type.uri(WeChatServer.CHINA))
|
|
||||||
.queryParams(queryParams)
|
|
||||||
.build()
|
|
||||||
.expand(params.getCode())
|
|
||||||
.toUri();
|
|
||||||
return Get(uri);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user