类 AutoIdUtil
- java.lang.Object
-
- net.risesoft.api.utils.AutoIdUtil
-
public class AutoIdUtil extends Object
随机id- 作者:
- libo 2020年10月14日
-
-
构造器概要
构造器 构造器 说明 AutoIdUtil()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static StringgetRandomId(int length)返回一个随机idstatic StringgetRandomId26()static StringgetRandomId30()static StringgetRandomId36()static LonggetRandomLongId()static LonggetRandomLongId(int length)static LonggetRandomLongId20()static LonggetRandomLongId26()static LonggetRandomLongId36()
-
-
-
方法详细资料
-
getRandomId
public static String getRandomId(int length)
返回一个随机id- 参数:
length- 生成的长度 11+length- 返回:
-
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()
-
-