记得上下班打卡 | git大法好,push需谨慎

Commit 0503d537 authored by 张国柄's avatar 张国柄

~API:加入会员序列号设置过期;

parent 206ee445
......@@ -17,7 +17,10 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.temporal.ChronoField;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalAdjusters;
import java.time.temporal.TemporalField;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -832,7 +835,8 @@ public class AdamRdmService {
sn = snT.replace("MS", nano.substring(nano.length() - 3));
o = redisUtil.get(AdamRedisConst.SERIAL_NUMBER_MEMBER.concat(sn));
}
redisUtil.set(sn, 1);
LocalDateTime lastDayTime = now.with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
redisUtil.set(sn, 1, ChronoUnit.SECONDS.between(now, lastDayTime));
return sn;
}
......
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