package com.template.common.utils;

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

public class UUIDUtil {

    public static long generateID(){

        Random r = new Random();
        long numbers = 1000000000L + (long)(r.nextDouble() * 999999999L);

        return numbers;
    }

    public static String getNewDate(){
        Date nowDate = new Date();// 取当前时间
        SimpleDateFormat dateFormat = new SimpleDateFormat(
                "yyyy-MM-dd HH:mm:ss"); // 转换时间格式
        String date = dateFormat.format(nowDate);
        return date;
    }

}
