fix 查询优化
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Dlhis.Canteen.Setting.Request;
|
||||
using Dlhis.Canteen.Setting.Response;
|
||||
using Dlhis.Canteen.Setting.Services;
|
||||
using Dlhis.Entity.Canteen.Enums;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@@ -87,9 +87,8 @@ public class CanteenSettingService : ICanteenSettingService
|
||||
var settings = await _context.Queryable<CanteenSettingEntity>()
|
||||
.Where(x => x.Enable)
|
||||
.Where(x => x.TenantId == tenantId)
|
||||
.Where(x =>
|
||||
(x.UniqueType == CanteenSettingUnqiueEnumType.Person && x.UniqueValue == userNo)
|
||||
|| x.UniqueType == CanteenSettingUnqiueEnumType.Tenant)
|
||||
.Where(x => (x.UniqueType == CanteenSettingUnqiueEnumType.Person && x.UniqueValue == userNo)
|
||||
|| x.UniqueType == CanteenSettingUnqiueEnumType.Tenant)
|
||||
.ToListAsync();
|
||||
|
||||
//从基地 -> 个人,确保下面循环做到覆盖,并且以个人配置为主
|
||||
|
||||
Reference in New Issue
Block a user