enhance: 订单失效时间现在需要以java时间格式LocalDateTime传入

#66
This commit is contained in:
Fang
2022-10-05 13:17:06 +08:00
parent 9b4193a4f9
commit 05a3e83e3e
3 changed files with 9 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ package cn.felord.payment.wechat.enumeration;
/**
* 超级管理员类型
*
* @since
* @since 1.0.14.RELEASE
*/
public enum ContactType {
/**
@@ -31,7 +31,7 @@ public enum ContactType {
LEGAL,
/**
* 经办人
*
* <p>
* 经商户授权办理微信支付业务的人员
*/
SUPER

View File

@@ -94,8 +94,7 @@ public abstract class AbstractApi {
* @param mapper the mapper
*/
private void applyObjectMapper(ObjectMapper mapper) {
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE
)
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
// empty string error
.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true)

View File

@@ -17,8 +17,11 @@
package cn.felord.payment.wechat.v3.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @author felord.cn
* @since 1.0.8.RELEASE
@@ -37,9 +40,10 @@ public abstract class AbstractPayParams {
*/
private String outTradeNo;
/**
* 订单失效时间 YYYY-MM-DDTHH:mm:ss+TIMEZONE
* 订单失效时间 rfc 3339 YYYY-MM-DDTHH:mm:ss+TIMEZONE
*/
private String timeExpire;
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssXXX", timezone = "GMT+8")
private LocalDateTime timeExpire;
/**
* 附加数据在查询API和支付通知中原样返回可作为自定义参数使用
*/