package com.tzld.piaoquan.growth.common.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public abstract class DistributedIdGenerator {
    /**
     * 生成一个
     *
     * @return
     */
    public static String generate() {
        StringBuilder builder = new StringBuilder();
        builder.append(new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()));
        builder.append(new Random().nextInt(899999) + 100000);
        return builder.toString();
    }

    public static void main(String[] args) {
        System.out.println(generate());
    }
}
