[fix] 修复table设置了mode=map,但index为空时,抛出key不能为多个错误的bug

main
walon 2022-04-16 15:52:28 +08:00
parent 3f2b2c71eb
commit 6d991ef000
1 changed files with 2 additions and 2 deletions

View File

@ -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;