package com.younike.common.id;

public class IDUtils {
    public static Long workId = 0224l;
    private static IdWorker idWorker;

    public static IdWorker getIdWorkerInstance() {
        if (idWorker == null) {
            idWorker = new IdWorker(workId);
        }
        return idWorker;
    }

    public static String nextId() {
        return String.valueOf(IDUtils.getIdWorkerInstance().nextId());
    }

    public static Long nextLongId() {
        return IDUtils.getIdWorkerInstance().nextId();
    }
}
