package com.galaxis.manatee.controller;

import com.galaxis.manatee.util.impl.SnowflakeIdGenerator;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zcj
 * @version 0.1
 * @date 2020/1/8 11:59 下午
 */
@RequestMapping("/utils")
@RestController
public class UtilsController {

    /**
     * 获取一个Id
     * @return  id
     */
    @GetMapping("/useGalaxisIdGenerator")
    public String useGalaxisIdGenerator(){
        return SnowflakeIdGenerator.getSnowflakeIdGenerator(1L).nextId().toString();
    }
}
