
package com.tmerclub.cloud.common.leaf.service;

import com.tmerclub.cloud.common.leaf.IDGen;
import com.tmerclub.cloud.common.leaf.common.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author left
 */
@Service("SegmentService")
public class SegmentService {

    @Autowired
    private IDGen idGen;

    public Result getId(String key, int length) {
        return idGen.get(key, length);
    }

}
