Snoflaske set workId

This commit is contained in:
sunkaixuna
2021-08-04 12:16:37 +08:00
parent 190227cb0b
commit 45f74349de

View File

@@ -9,9 +9,10 @@ namespace SqlSugar
public sealed class SnowFlakeSingle
{
public static readonly SnowFlakeSingle instance = new SnowFlakeSingle();
public static int WorkId = 1;
private SnowFlakeSingle()
{
worker = new DistributedSystem.Snowflake.IdWorker(1, 1);
worker = new DistributedSystem.Snowflake.IdWorker(WorkId, 1);
}
static SnowFlakeSingle() { }
public static SnowFlakeSingle Instance