mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-15 03:25:06 +08:00
优化支付通知的逻辑,解决并发的问题。
同时,收到支付结果时,立马回调业务,避免延迟
This commit is contained in:
@ -6,6 +6,8 @@ import java.util.Date;
|
||||
|
||||
/**
|
||||
* 时间工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public class DateUtils {
|
||||
|
||||
@ -14,6 +16,11 @@ public class DateUtils {
|
||||
*/
|
||||
public static final String TIME_ZONE_DEFAULT = "GMT+8";
|
||||
|
||||
/**
|
||||
* 秒转换成毫秒
|
||||
*/
|
||||
public static final long SECOND_MILLIS = 1000;
|
||||
|
||||
public static final String FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
public static Date addTime(Duration duration) {
|
||||
@ -74,4 +81,12 @@ public class DateUtils {
|
||||
return a.compareTo(b) > 0 ? a : b;
|
||||
}
|
||||
|
||||
public static boolean beforeNow(Date date) {
|
||||
return date.getTime() < System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static boolean afterNow(Date date) {
|
||||
return date.getTime() >= System.currentTimeMillis();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user