package com.docus.server.collection.util;

import com.docus.infrastructure.redis.service.IdService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;

@Data
public class IdUtil {
    /**
     * 得到一个标准的  8-4-4-4-12 UUID
     * @return 标准的 8-4-4-4-12 UUID
     */
    public  static String standardUUID(){
        ThreadLocalRandom random = ThreadLocalRandom.current();
        return (new UUID(random.nextLong(), random.nextLong())).toString();
    }

}
