mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-13 21:33:41 +08:00
refactor: Update pathParams
This commit is contained in:
@@ -140,13 +140,13 @@ public class WechatBatchTransferApi extends AbstractApi {
|
||||
WechatResponseEntity<ObjectNode> wechatResponseEntity = new WechatResponseEntity<>();
|
||||
this.client().withType(WechatPayV3Type.BATCH_TRANSFER_DETAIL_WECHAT, queryBatchTransferDetailParams)
|
||||
.function((type, params) -> {
|
||||
Map<String, String> queryParams = new HashMap<>(2);
|
||||
queryParams.put("batch_id", params.getBatchIdOrOutBatchNo());
|
||||
queryParams.put("detail_id", params.getDetailIdOrOutDetailNo());
|
||||
Map<String, String> pathParams = new HashMap<>(2);
|
||||
pathParams.put("batch_id", params.getBatchIdOrOutBatchNo());
|
||||
pathParams.put("detail_id", params.getDetailIdOrOutDetailNo());
|
||||
|
||||
URI uri = UriComponentsBuilder.fromHttpUrl(type.uri(WeChatServer.CHINA))
|
||||
.build()
|
||||
.expand(queryParams)
|
||||
.expand(pathParams)
|
||||
.toUri();
|
||||
return Get(uri);
|
||||
})
|
||||
@@ -195,13 +195,13 @@ public class WechatBatchTransferApi extends AbstractApi {
|
||||
WechatResponseEntity<ObjectNode> wechatResponseEntity = new WechatResponseEntity<>();
|
||||
this.client().withType(WechatPayV3Type.BATCH_TRANSFER_DETAIL_MCH, queryBatchTransferDetailParams)
|
||||
.function((type, params) -> {
|
||||
Map<String, String> queryParams = new HashMap<>(2);
|
||||
queryParams.put("batch_id", params.getBatchIdOrOutBatchNo());
|
||||
queryParams.put("detail_id", params.getDetailIdOrOutDetailNo());
|
||||
Map<String, String> pathParams = new HashMap<>(2);
|
||||
pathParams.put("batch_id", params.getBatchIdOrOutBatchNo());
|
||||
pathParams.put("detail_id", params.getDetailIdOrOutDetailNo());
|
||||
|
||||
URI uri = UriComponentsBuilder.fromHttpUrl(type.uri(WeChatServer.CHINA))
|
||||
.build()
|
||||
.expand(queryParams)
|
||||
.expand(pathParams)
|
||||
.toUri();
|
||||
return Get(uri);
|
||||
})
|
||||
|
||||
@@ -65,14 +65,14 @@ public class WechatPayScoreApi extends AbstractApi {
|
||||
.function((wechatPayV3Type, userServiceStateParams) -> {
|
||||
WechatPayProperties.V3 v3 = this.wechatMetaBean().getV3();
|
||||
|
||||
Map<String, String> expandParams = new HashMap<>(3);
|
||||
expandParams.put("appid", v3.getAppId());
|
||||
expandParams.put("service_id", params.getServiceId());
|
||||
expandParams.put("openid", params.getOpenId());
|
||||
Map<String, String> pathParams = new HashMap<>(3);
|
||||
pathParams.put("appid", v3.getAppId());
|
||||
pathParams.put("service_id", params.getServiceId());
|
||||
pathParams.put("openid", params.getOpenId());
|
||||
|
||||
URI uri = UriComponentsBuilder.fromHttpUrl(wechatPayV3Type.uri(WeChatServer.CHINA))
|
||||
.build()
|
||||
.expand(expandParams)
|
||||
.expand(pathParams)
|
||||
.toUri();
|
||||
return Get(uri);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user