package com.hzya.frame.uuid;

import java.util.UUID;

/**
 * @Content 返回UUIDlang类型
 * @Author gjh
 * @Date 2018/11/1 11:32
 * @Version 1.0
 */
public class UUIDLong {
    public static long longUUID() {
        return UUID.randomUUID().getMostSignificantBits();
    }

    public static long absLongUUID() {
        while (true) {
            long r = longUUID();
            if (r > 5379549617455104L) {
                return r;
            }
        }
    }
    public static String absLongUUIDStr() {
        return String.valueOf(absLongUUID());
    }
}
