From dc9b75e9d49020b73fc7724b66f4212406e33e56 Mon Sep 17 00:00:00 2001 From: duxlei Date: Thu, 3 Aug 2023 11:49:08 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E5=99=A8Id=E4=BD=8D=E6=95=B0=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=E4=BF=AE=E6=94=B9=20=E7=BB=8F=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=EF=BC=8C=E8=AF=A5=E5=AE=9E=E7=8E=B0=E6=9C=BA=E5=99=A8Id?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E4=B8=BA0~9=EF=BC=8C=E5=BD=93=E8=B6=85?= =?UTF-8?q?=E8=BF=879=E6=97=B6=E4=BC=9A=E8=BF=9B=E4=BD=8D=E5=88=B0?= =?UTF-8?q?=E3=80=90=E6=AF=AB=E7=A7=92=E5=86=85=E7=9A=84=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=87=AA=E5=A2=9E=E3=80=91=E4=BD=8D=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: duxlei --- .../com/mybatisflex/core/keygen/impl/FlexIDKeyGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/keygen/impl/FlexIDKeyGenerator.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/keygen/impl/FlexIDKeyGenerator.java index bfa3fb23..1c3effca 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/keygen/impl/FlexIDKeyGenerator.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/keygen/impl/FlexIDKeyGenerator.java @@ -33,7 +33,7 @@ import java.util.concurrent.ThreadLocalRandom; * 1、每台机器允许最大的并发量为 10w/s。 * 2、出现时间回拨,重启机器时,在时间回拨未恢复的情况下,可能出现 id 重复。 *

- * ID组成:时间(7+)| 毫秒内的时间自增 (00~99:2)| 机器ID(01 ~ 99:2)| 随机数(000~999:3)用于分库分表时,通过 id 取模,保证分布均衡。 + * ID组成:时间(7+)| 毫秒内的时间自增 (00~99:2)| 机器ID(0 ~ 9:1)| 随机数(000~999:3)用于分库分表时,通过 id 取模,保证分布均衡。 */ public class FlexIDKeyGenerator implements IKeyGenerator {