fix all接口移除权限控制
This commit is contained in:
@@ -55,15 +55,12 @@ public class BusinessPlaceService : IBusinessPlaceService
|
|||||||
|
|
||||||
public async Task<List<BusinessPlaceListResponse>> GetOpenedListAsync(Guid? placeCode = null, string tenant = null)
|
public async Task<List<BusinessPlaceListResponse>> GetOpenedListAsync(Guid? placeCode = null, string tenant = null)
|
||||||
{
|
{
|
||||||
var myCodes = await GetMyBusinessPlaceCodesAsync();
|
|
||||||
|
|
||||||
var list = await _dbContext.Queryable<BusinessPlaceEntity>()
|
var list = await _dbContext.Queryable<BusinessPlaceEntity>()
|
||||||
.LeftJoin<BusinessPlaceShiftRelationshipEntity>((x, ps) => x.Code == ps.PlaceCode)
|
.LeftJoin<BusinessPlaceShiftRelationshipEntity>((x, ps) => x.Code == ps.PlaceCode)
|
||||||
.LeftJoin<BusinessShiftEntity>((x, ps, s) => s.Code == ps.ShiftCode)
|
.LeftJoin<BusinessShiftEntity>((x, ps, s) => s.Code == ps.ShiftCode)
|
||||||
.Where(x => x.Status == CanteenBusinessPlaceStatusEnumType.Opened)
|
.Where(x => x.Status == CanteenBusinessPlaceStatusEnumType.Opened)
|
||||||
.WhereIF(placeCode.HasValue, x => x.Code == placeCode)
|
.WhereIF(placeCode.HasValue, x => x.Code == placeCode)
|
||||||
.WhereIF(tenant.IsPresent(), x => x.TenantId == tenant)
|
.WhereIF(tenant.IsPresent(), x => x.TenantId == tenant)
|
||||||
.Where(x => myCodes.Contains(x.Code))
|
|
||||||
.Select((x, ps, s) => new BusinessPlaceListResponse
|
.Select((x, ps, s) => new BusinessPlaceListResponse
|
||||||
{
|
{
|
||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
|
|||||||
Reference in New Issue
Block a user