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

Commit b67dfab2 authored by 张国柄's avatar 张国柄

fix.bug:领取会员卡卡号位数问题;

parent 78961c80
......@@ -826,8 +826,10 @@ public class AdamRdmService {
public String generateMemberUniqueSerialNumber(String mobile) {
LocalDateTime now = LocalDateTime.now();
String snT = String.format("%s%sMS%s", now.getYear(), now.getMonthValue(), mobile.substring(7)).substring(2);
String sn = snT.replace("MS", String.valueOf(now.getLong(ChronoField.MILLI_OF_SECOND)));
// String snT = String.format("%s%sMS%s", now.getYear(), now.getMonthValue(), mobile.substring(7)).substring(2);
// String sn = snT.replace("MS", String.valueOf(now.getLong(ChronoField.MILLI_OF_SECOND)));
String snT = String.format("%s%sMS%s", now.getYear(), now.getMonthValue(), org.apache.commons.lang3.StringUtils.right(mobile, 4)).substring(2);
String sn = snT.replace("MS", org.apache.commons.lang3.StringUtils.leftPad(String.valueOf(LocalDateTime.now().getLong(ChronoField.MILLI_OF_SECOND)), 3, "0"));
Object o = redisUtil.get(AdamRedisConst.SERIAL_NUMBER_MEMBER.concat(sn));
while (null != o) {
String nano = String.valueOf(System.nanoTime());
......
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