mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-13 21:33:41 +08:00
factor: 商家券修改API的请求方法改为Patch
This commit is contained in:
@@ -431,7 +431,7 @@ public enum WechatPayV3Type {
|
||||
*
|
||||
* @since 1.0.4.RELEASES
|
||||
*/
|
||||
MARKETING_BUSI_FAVOR_UPDATE(HttpMethod.POST, "%s/v3/marketing/busifavor/stocks/{stock_id}"),
|
||||
MARKETING_BUSI_FAVOR_UPDATE(HttpMethod.PATCH, "%s/v3/marketing/busifavor/stocks/{stock_id}"),
|
||||
/**
|
||||
* 申请退券API.
|
||||
*
|
||||
|
||||
@@ -202,6 +202,21 @@ public abstract class AbstractApi {
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建Post请求对象.
|
||||
*
|
||||
* @param uri the uri
|
||||
* @param params the params
|
||||
* @return the request entity
|
||||
*/
|
||||
protected RequestEntity<?> Patch(URI uri, Object params) {
|
||||
try {
|
||||
return RequestEntity.patch(uri).header("Pay-TenantId", tenantId)
|
||||
.body(mapper.writeValueAsString(params));
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new PayException("wechat app pay json failed");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 对账单内容下载,非流文件。
|
||||
*
|
||||
|
||||
@@ -384,7 +384,7 @@ public class WechatMarketingBusiFavorApi extends AbstractApi {
|
||||
.expand(updateParams.getStockId())
|
||||
.toUri();
|
||||
updateParams.setStockId(null);
|
||||
return Post(uri, updateParams);
|
||||
return Patch(uri, updateParams);
|
||||
})
|
||||
.consumer(wechatResponseEntity::convert)
|
||||
.request();
|
||||
|
||||
Reference in New Issue
Block a user