查找审批模板增加租户过滤

dev
嵇文龙 2 months ago
parent 3789e1429b
commit a020581ee6

@ -1,5 +1,4 @@
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Flow.Entity;
@ -64,8 +63,9 @@ namespace DS.WMS.Core
/// <returns></returns>
protected internal async Task<FlowTemplateTenant> FindTemplateAsync(TaskBaseTypeEnum auditType)
{
long tid = long.Parse(User.TenantId);
return await Db.Queryable<FlowTemplateTenant>().OrderByDescending(x => x.CreateTime).Take(1)
.FirstAsync(x => x.Status == StatusEnum.Enable && x.AuditType == auditType);
.FirstAsync(x => x.TenantId == tid && x.Status == StatusEnum.Enable && x.AuditType == auditType);
}
}
}

Loading…
Cancel
Save