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

master_otnew
grimm 2024-03-05 16:28:34 +08:00
parent a3eae1a429
commit 2adb0938be
1 changed files with 7 additions and 7 deletions

View File

@ -621,13 +621,13 @@ 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();
// 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{
endTime = endTime + (int) (TimeUtils.DAY * gapTime / 1000);
}