循环活动结束时间,前端展示

master_otnew
grimm 2024-03-05 16:32:32 +08:00
parent 2adb0938be
commit 4fcebd8359
1 changed files with 8 additions and 7 deletions

View File

@ -621,13 +621,14 @@ public class ActivityLogic implements IEventHandler{
startTime = (int)(activityState.getValue().getCreatTime()/1000);
endTime = startTime+604800;
}
// else if (sGlobalActivity.getTime() == ActivityType.OPEN_TYPE_CYCLE){
// long now = TimeUtils.now();
// long cycleTime = sGlobalActivity.getCycleMinute() * TimeUtils.ONE_MINUTE;
// long latelyStarTime = TimeUtils.getLatelyTime(startTime * 1000L, now, cycleTime);
// startTime = (int) (latelyStarTime/1000);
// endTime = (int) ((latelyStarTime + cycleTime + TimeUtils.DAY * gapTime)/1000);
// }
else if (sGlobalActivity.getTime() == ActivityType.OPEN_TYPE_CYCLE){
long now = TimeUtils.now();
int intervalTime = endTime - startTime;
long cycleTime = sGlobalActivity.getCycleMinute() * TimeUtils.ONE_MINUTE;
long latelyStarTime = TimeUtils.getLatelyTime(startTime * 1000L, now, cycleTime);
startTime = (int) (latelyStarTime/1000);
endTime = (int) ((latelyStarTime + intervalTime + TimeUtils.DAY * gapTime)/1000);
}
else{
endTime = endTime + (int) (TimeUtils.DAY * gapTime / 1000);
}