mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-10 06:46:04 +08:00
fix(alipay): 主应用透传关单时间给子应用 + 清理 NormalPayParam 冗余 @JsonFormat
AlipayPayService 补 setExpireTime(payParam.getExpiredTime()), 与微信通道对齐; NormalPayParam 移除被全局 DaxpayOffsetDateTimeDeserializer 覆盖的 @JsonFormat 并补注释说明。
This commit is contained in:
@@ -54,6 +54,8 @@ public class AlipayPayService {
|
||||
req.setOpenId(payParam.getOpenId());
|
||||
// 通道通知地址: 始终使用平台生成的回调地址(支付宝→平台), 不使用 payParam.notifyUrl(语义为平台→商户)
|
||||
req.setNotifyUrl(this.buildNotifyUrl(order));
|
||||
// 关单时间透传, 子应用据此向支付宝设置 time_expire
|
||||
req.setExpireTime(payParam.getExpiredTime());
|
||||
req.setCredential(credential);
|
||||
|
||||
// 调用子应用
|
||||
|
||||
@@ -4,7 +4,6 @@ import cn.daxpay.open.platform.core.enums.pay.channel.ProductEnum;
|
||||
import cn.daxpay.open.platform.core.enums.pay.channel.PayMethodEnum;
|
||||
import cn.daxpay.open.payment.unipay.param.MerchantPaymentCommonParam;
|
||||
import jakarta.validation.Valid;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.*;
|
||||
@@ -119,8 +118,9 @@ public class NormalPayParam extends MerchantPaymentCommonParam {
|
||||
// ===== 时间 =====
|
||||
|
||||
/// 过期时间(北京时间,格式 yyyy-MM-dd HH:mm:ss,空则默认 30 分钟)
|
||||
/// 注: 实际反序列化由全局 DaxpayOffsetDateTimeDeserializer 处理(按 Asia/Shanghai 解析后转 UTC),
|
||||
/// 此处不标 @JsonFormat 以免误导(注解会被全局反序列化器覆盖)
|
||||
@Schema(description = "过期时间(北京时间,yyyy-MM-dd HH:mm:ss)")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private OffsetDateTime expiredTime;
|
||||
|
||||
// ===== 终端信息(线下场景选填)=====
|
||||
|
||||
Reference in New Issue
Block a user