青羊经侦大队-数据平台
baizonghao
2023-04-23 028bd9c7cccb1ba7569636c631fa3c83a16d3e48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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());
    }
}