From 6d991ef0005038a5117ed0608f5c667d0d23b09d Mon Sep 17 00:00:00 2001 From: walon Date: Sat, 16 Apr 2022 15:52:28 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8Dtable=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=BA=86mode=3Dmap=EF=BC=8C=E4=BD=86index=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=EF=BC=8C=E6=8A=9B=E5=87=BAkey=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E4=B8=BA=E5=A4=9A=E4=B8=AA=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Luban.Job.Cfg/Source/Defs/CfgDefLoader.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Luban.Job.Cfg/Source/Defs/CfgDefLoader.cs b/src/Luban.Job.Cfg/Source/Defs/CfgDefLoader.cs index 47682d6..e45f369 100644 --- a/src/Luban.Job.Cfg/Source/Defs/CfgDefLoader.cs +++ b/src/Luban.Job.Cfg/Source/Defs/CfgDefLoader.cs @@ -204,9 +204,9 @@ namespace Luban.Job.Cfg.Defs } case "map": { - if ((string.IsNullOrWhiteSpace(indexStr) || indexs.Length != 1)) + if (!string.IsNullOrWhiteSpace(indexStr) && indexs.Length > 1) { - throw new Exception($"定义文件:'{defineFile}' table:'{tableName}' 是单键表,index:'{indexStr}'不能包含多个key"); + throw new Exception($"定义文件:'{defineFile}' table:'{tableName}' 是单主键表,index:'{indexStr}'不能包含多个key"); } mode = ETableMode.MAP; break;