package com.ruoyi.demo.utils;

import java.util.UUID;

public class UuidUtil {

    public static String UUID() {
        return UUID.randomUUID().toString().replace("-", "");
    }

    public static String getUUID() {
        return getUUID(10);
    }

    // 获得指定数量的UUID
    public static String getUUID(int number) {
        if (number < 1) {
            return null;
        }

        return UUID().substring(0,number);
    }

}
