Skip to content

Commit

Permalink
优化获取秒杀活动
Browse files Browse the repository at this point in the history
  • Loading branch information
LeiGaoRobot committed Jul 27, 2022
1 parent ed976e9 commit 40bf6d3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ private List<SeckillTimelineVO> getSeckillTimelineInfo() {
Arrays.sort(hoursSored);
for (int i = 0; i < hoursSored.length; i++) {
SeckillTimelineVO tempTimeline = new SeckillTimelineVO();
boolean hoursSoredHour = (hoursSored[i] >= hour || ((i + 1) < hoursSored.length && hoursSored[i + 1] > hour) || hoursSored.length == 1);
boolean hoursSoredHour = (hoursSored[i] >= hour || i + 1 == hoursSored.length);
if (hoursSoredHour) {
SimpleDateFormat format = new SimpleDateFormat(DatePattern.NORM_DATE_PATTERN);
String date = format.format(new Date());
Expand Down

0 comments on commit 40bf6d3

Please sign in to comment.