fhx
2023-10-08 dca24adb8ee2fcde5e59c6eaf28555d6cc451496
src/main/java/com/hx/util/DateUtil.java
@@ -816,16 +816,19 @@
    /**
     * 获取某天结束秒数
     * @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;
    }
    /**
@@ -834,7 +837,7 @@
     * @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;
        }