|
|
@ -121,7 +121,7 @@ public class SerialNumberServiceImpl implements SerialNumberService { |
|
|
|
} else if(encodedRule.getPattern().toLowerCase().indexOf("y") > 0) { |
|
|
|
midnight = LocalDateTime.now().plusYears(1).plusMonths(1).plusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(1); |
|
|
|
} |
|
|
|
long millSeconds = ChronoUnit.SECONDS.between(LocalDateTime.now(), midnight); |
|
|
|
long millSeconds = midnight == null ? 0 : ChronoUnit.SECONDS.between(LocalDateTime.now(), midnight); |
|
|
|
StringBuilder code = new StringBuilder(); |
|
|
|
Long increment = redisCache.incr(encodedRule.getRuleCode() + pattern, millSeconds); |
|
|
|
code.append(encodedRule.getPrefix()); |
|
|
|