|
|
@@ -1,4 +1,4 @@
|
|
|
-namespace Admin.NET.Core.Service;
|
|
|
+namespace Admin.NET.Core.Service;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 系统机构服务
|
|
|
@@ -45,10 +45,9 @@ public class SysOrgService : IDynamicApiController, ITransient
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(input.Name) || !string.IsNullOrWhiteSpace(input.Code) || input.Id > 0)
|
|
|
{
|
|
|
- return await iSugarQueryable
|
|
|
+ iSugarQueryable = iSugarQueryable
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name))
|
|
|
- .WhereIF(!string.IsNullOrWhiteSpace(input.Code), u => u.Code.Contains(input.Code))
|
|
|
- .ToListAsync();
|
|
|
+ .WhereIF(!string.IsNullOrWhiteSpace(input.Code), u => u.Code.Contains(input.Code));
|
|
|
}
|
|
|
return await iSugarQueryable.ToTreeAsync(u => u.Children, u => u.Pid, input.Id > 0 ? input.Id : 0);
|
|
|
}
|