All Downloads are FREE. Search and download functionalities are using the official Maven repository.

club.gclmit.chaos.service.impl.IDGeneratorServiceImpl Maven / Gradle / Ivy

The newest version!
package club.gclmit.chaos.service.impl;

import club.gclmit.chaos.enums.IDGeneratorType;
import club.gclmit.chaos.enums.IDGenerator;
import club.gclmit.chaos.executor.IDGeneratorExecutor;
import club.gclmit.chaos.executor.SnowflakeDistributeId;
import club.gclmit.chaos.service.IDGeneratorService;
import org.springframework.stereotype.Service;

/**
 * 

* ID 生成器服务 *

* * @author: gclm * @date: 2019-10-22 20:59:00 * @version: V1.0 * @since JDK1.8 */ @Service public class IDGeneratorServiceImpl implements IDGeneratorService { /** *

* idGeneratorByLong:根据选择生成器类型,生成唯一ID *

* * @author 孤城落寞 * @param: type 证书类型 * @date 2019/10/22 21:16 * @return: java.lang.Long * @throws */ @Override public Long getLongId(IDGeneratorType type) { return IDGeneratorExecutor.getLongId(type); } /** *

* idGeneratorByString: 根据选择生成器类型,生成唯一ID *

* * @author 孤城落寞 * @param: type 证书类型 * @date 2019/10/22 21:15 * @return: java.lang.String * @throws */ @Override public String getStringId(IDGeneratorType type) { return IDGeneratorExecutor.getStringId(type); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy