😎优化雪花Id内存处理判断

This commit is contained in:
zuohuaijun 2024-12-23 00:12:45 +08:00
parent e01e1989d4
commit ec1baf2ecd

View File

@ -22,7 +22,7 @@ public static class SqlSugarSetup
{
// 注册雪花Id
var snowIdOpt = App.GetConfig<SnowIdOptions>("SnowId", true);
if (App.GetConfig<CacheOptions>("Cache", true).CacheType == "Memory")
if (App.GetConfig<CacheOptions>("Cache", true).CacheType == CacheTypeEnum.Memory.ToString())
{
YitIdHelper.SetIdGenerator(snowIdOpt);
SnowFlakeSingle.WorkId = snowIdOpt.WorkerId;