Merge pull request '分页' (#37) from S01-轨迹中台 into dev
Reviewed-on: http://192.168.80.50:3000/Dotnet/SJZY.Track.Api/pulls/37
This commit is contained in:
commit
b629aa6eaf
@ -190,7 +190,7 @@ public class TrackTemplateService : ApplicationService, ITransientDependency
|
|||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("GetContentDropDownList")]
|
[HttpPost("GetContentDropDownList")]
|
||||||
public async Task<List<DropdownListDataDto>> GetContentDropDownListAsync([FromBody] GetTrackTemplateContentDropDownListVO input)
|
public async Task<UnifyPageResultDto<DropdownListDataDto>> GetContentDropDownListAsync([FromBody] GetTrackTemplateContentDropDownListVO input)
|
||||||
{
|
{
|
||||||
return await _trackTemplateRepository.GetContentDropDownListAsync(input);
|
return await _trackTemplateRepository.GetContentDropDownListAsync(input);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,5 +39,5 @@ public interface ITrackTemplateRepository : IBasicRepository<TrackTemplateEntity
|
|||||||
|
|
||||||
Task<bool> UpdateContentRangeAsync(List<TrackTemplateContentEntity> updateObjs);
|
Task<bool> UpdateContentRangeAsync(List<TrackTemplateContentEntity> updateObjs);
|
||||||
|
|
||||||
Task<List<DropdownListDataDto>> GetContentDropDownListAsync(GetTrackTemplateContentDropDownListVO input);
|
Task<UnifyPageResultDto<DropdownListDataDto>> GetContentDropDownListAsync(GetTrackTemplateContentDropDownListVO input);
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
return await Context.Updateable(updateObjs).ExecuteCommandHasChangeAsync();
|
return await Context.Updateable(updateObjs).ExecuteCommandHasChangeAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<List<DropdownListDataDto>> GetContentDropDownListAsync(GetTrackTemplateContentDropDownListVO input)
|
public async Task<UnifyPageResultDto<DropdownListDataDto>> GetContentDropDownListAsync(GetTrackTemplateContentDropDownListVO input)
|
||||||
{
|
{
|
||||||
return await Context.Queryable<TrackTemplateContentEntity>()
|
return await Context.Queryable<TrackTemplateContentEntity>()
|
||||||
.InnerJoin<TrackContentEntity>((templateContent, trackContent) => templateContent.TrackContentId == trackContent.Id)
|
.InnerJoin<TrackContentEntity>((templateContent, trackContent) => templateContent.TrackContentId == trackContent.Id)
|
||||||
@ -177,6 +177,6 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
|
|||||||
Key = trackContent.Code + "-" + trackContent.Content
|
Key = trackContent.Code + "-" + trackContent.Content
|
||||||
})
|
})
|
||||||
.Distinct()
|
.Distinct()
|
||||||
.ToListAsync();
|
.ToPagedListAsync(input.PageIndex, input.PageSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user