Package net.risesoft.api.utils
Class AutoIdUtil
- java.lang.Object
-
- net.risesoft.api.utils.AutoIdUtil
-
public class AutoIdUtil extends Object
随机id- Author:
- libo 2020年10月14日
-
-
Constructor Summary
Constructors Constructor Description AutoIdUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetRandomId(int length)返回一个随机idstatic StringgetRandomId26()static StringgetRandomId30()static StringgetRandomId36()static LonggetRandomLongId()static LonggetRandomLongId(int length)static LonggetRandomLongId20()static LonggetRandomLongId26()static LonggetRandomLongId36()
-
-
-
Method Detail
-
getRandomId
public static String getRandomId(int length)
返回一个随机id- Parameters:
length- 生成的长度 11+length- Returns:
-
getRandomLongId
public static Long getRandomLongId(int length)
-
getRandomLongId
public static Long getRandomLongId()
-
getRandomLongId20
public static Long getRandomLongId20()
-
getRandomLongId36
public static Long getRandomLongId36()
-
getRandomLongId26
public static Long getRandomLongId26()
-
getRandomId26
public static String getRandomId26()
-
getRandomId30
public static String getRandomId30()
-
getRandomId36
public static String getRandomId36()
-
-