😎优化新增租户时Id判断

This commit is contained in:
zuohuaijun 2025-09-01 00:16:23 +08:00
parent dc558bee04
commit 093f4b0220

View File

@ -132,7 +132,8 @@ public class SysTenantService : IDynamicApiController, ITransient
throw Oops.Oh(ErrorCodeEnum.D1302);
// 以租户Id作为库标识
input.Id = YitIdHelper.NextId();
if (input.Id < 1)
input.Id = YitIdHelper.NextId();
input.ConfigId = input.Id.ToString();
var tenant = input.Adapt<TenantOutput>();