mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
支付时间取订单支付记录中的值
This commit is contained in:
@@ -1012,4 +1012,21 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
return null; // 或者返回一个默认值
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回多个Date参数中不为null并且时间最大的Date
|
||||
*
|
||||
* @param dates 多个Date类型的参数
|
||||
* @return 参数列表中不为null且时间最大的Date对象
|
||||
*/
|
||||
public static Date getMaxDate(Date... dates) {
|
||||
Date maxDate = null;
|
||||
for (Date date : dates) {
|
||||
if (date != null && (maxDate == null || date.after(maxDate))) {
|
||||
maxDate = date;
|
||||
}
|
||||
}
|
||||
return maxDate;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user