Commit 35bfda9f by 段启岩

用户昵称自动生成

parent 0f729c81
...@@ -58,7 +58,7 @@ public class UserNickGenerator implements Generator<String> { ...@@ -58,7 +58,7 @@ public class UserNickGenerator implements Generator<String> {
int year = localDateTime.getYear(); int year = localDateTime.getYear();
year = year % 10; year = year % 10;
int month = localDateTime.getMonthValue(); int month = localDateTime.getMonthValue();
int day = localDateTime.getMonthValue(); int day = localDateTime.getDayOfMonth();
String datePrefix = String.format("%d%d%d", year, month, day); String datePrefix = String.format("%d%d%d", year, month, day);
datePrefix.replaceAll("0", ""); datePrefix.replaceAll("0", "");
int count = getAndIncreaseNickCount(datePrefix); int count = getAndIncreaseNickCount(datePrefix);
......
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