| | |
| | | |
| | | /** |
| | | * 获取某天结束秒数 |
| | | * @param startTime |
| | | * @param dateTime 日期 |
| | | * @param lateSecond 延迟秒数 |
| | | * @return |
| | | */ |
| | | public long todayEndSecond(Date startTime) { |
| | | if(startTime == null){ |
| | | startTime = new Date(); |
| | | public static long todayEndSecond(Date dateTime, Long lateSecond) { |
| | | if(dateTime == null){ |
| | | dateTime = new Date(); |
| | | } |
| | | Date endTime = DateUtil.dayToEndDate(startTime); |
| | | //多加10秒 |
| | | return differSecond(startTime, endTime) + 10L; |
| | | if(lateSecond == null){ |
| | | lateSecond = 0L; |
| | | } |
| | | Date endTime = DateUtil.dayToEndDate(dateTime); |
| | | return differSecond(dateTime, endTime) + lateSecond; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param endTime 结束时间 |
| | | * @return |
| | | */ |
| | | public long differSecond(Date startTime, Date endTime) { |
| | | public static long differSecond(Date startTime, Date endTime) { |
| | | if(startTime == null || endTime == null){ |
| | | return 0L; |
| | | } |