package com.example.jz.utils;
|
|
import java.util.Date;
|
|
public class IdUtils {
|
public static String getAduitId() {
|
String time = String.valueOf(new Date().getTime());
|
String txt = "1234567890";
|
int len = 13;
|
String pwd = "";
|
for (int i = 0; i < len; i++) {
|
pwd += txt.charAt((int) Math.floor(Math.random() * txt.length()));
|
}
|
String s = time + pwd;
|
return s;
|
}
|
|
public static void main(String[] args) {
|
System.out.println(getAduitId());
|
}
|
}
|