😎修复租户从库配置错误
This commit is contained in:
parent
9898b8c8a0
commit
e469b70b92
@ -119,7 +119,7 @@ public class SysTenantService : IDynamicApiController, ITransient
|
||||
if (isExist) throw Oops.Oh(ErrorCodeEnum.D1301);
|
||||
|
||||
// 从库配置判断
|
||||
if (input.TenantType == TenantTypeEnum.Db && (string.IsNullOrWhiteSpace(input.SlaveConnections) || !JSON.IsValid(input.SlaveConnections, true)))
|
||||
if (input.TenantType == TenantTypeEnum.Db && !string.IsNullOrWhiteSpace(input.SlaveConnections) && !JSON.IsValid(input.SlaveConnections, true))
|
||||
throw Oops.Oh(ErrorCodeEnum.D1302);
|
||||
|
||||
switch (input.TenantType)
|
||||
@ -330,7 +330,7 @@ public class SysTenantService : IDynamicApiController, ITransient
|
||||
throw Oops.Oh(ErrorCodeEnum.D3004);
|
||||
}
|
||||
// 从库配置判断
|
||||
if (input.TenantType == TenantTypeEnum.Db && (string.IsNullOrWhiteSpace(input.SlaveConnections) || !JSON.IsValid(input.SlaveConnections, true)))
|
||||
if (input.TenantType == TenantTypeEnum.Db && !string.IsNullOrWhiteSpace(input.SlaveConnections) && !JSON.IsValid(input.SlaveConnections, true))
|
||||
throw Oops.Oh(ErrorCodeEnum.D1302);
|
||||
|
||||
await _sysTenantRep.AsUpdateable(input.Adapt<TenantOutput>()).IgnoreColumns(true).ExecuteCommandAsync();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user