Commit 63cf9379 authored by yanzg's avatar yanzg

执行时间

parent bbbf34b7
......@@ -100,7 +100,7 @@ public class PlanInfo<T> {
* @param hour N小时
* @return 下次执行间隔时间
*/
public int getNextDayHourMillSecond(int day, int hour) {
public long getNextDayHourMillSecond(int day, int hour) {
return getNextDayHourMillSecond(day, (double) hour);
}
......@@ -111,9 +111,9 @@ public class PlanInfo<T> {
* @param hour N小时
* @return 下次执行间隔时间
*/
public int getNextDayHourMillSecond(int day, double hour) {
public long getNextDayHourMillSecond(int day, double hour) {
if (this.getTime() == 0) {
return 60;
return 60L;
}
// 上次执行时间
Date prevTime = new Date(this.getTime());
......@@ -122,8 +122,7 @@ public class PlanInfo<T> {
Date nextDay = DateHelper.addDay(DateHelper.getDateTime(prevToday), day);
Date nextDayHour = DateHelper.addMinute(nextDay, (int) (hour * 60));
// 下次执行时间
long dedTime = Math.max(0, nextDayHour.getTime() - this.getTime());
return (int) dedTime;
return Math.max(0, nextDayHour.getTime() - this.getTime());
}
public long getId() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment