package cn.superdesk.uniorder.config.sequence;

//import cn.superdesk.uniorder.common.sequence.SnowflakeGenerator;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: Java类作用描述
 * @Author: linjinyu
 * @CreateDate: 2021/3/15 上午11:39
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021/3/15 上午11:39
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Slf4j
@Configuration
public class SysGeneratorSequenceConfig {


//	@Bean
//	public SnowflakeGenerator snowflakeGenerator() {
//		SnowflakeGenerator snowflakeGenerator = new SnowflakeGenerator();
//		return snowflakeGenerator;
//	}


	@Bean
	public Snowflake snowflake() {
		Snowflake snowflake = IdUtil.getSnowflake(1, 1);
		return snowflake;
	}

}
