You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
578 B
24 lines
578 B
package com.yxt.goods;
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
import org.junit.Test;
|
|
|
|
import java.util.UUID;
|
|
|
|
public class GoodsApplicationTest {
|
|
|
|
@Test
|
|
public void test() {
|
|
System.out.println(IdUtil.nanoId());
|
|
System.out.println(IdUtil.getSnowflakeNextId());
|
|
|
|
UUID uuid = UUID.randomUUID();
|
|
String uniqueID = uuid.toString().replaceAll("-", "").substring(0, 16).replaceAll("\\D", "");
|
|
System.out.println(uniqueID);
|
|
}
|
|
}
|
|
|
|
//do3KW8XIUSyu4vg_zTXdm
|
|
// 1727231267909320704
|
|
//uw0AotdmQTlIxKlA2V8_O
|
|
// 1727231437887668224
|
|
|