This commit is contained in:
柳文翔 2024-03-02 16:58:58 +08:00
parent 569f566fe2
commit 131bf85708
3 changed files with 4 additions and 4 deletions

View File

@ -190,7 +190,7 @@ public class TrackTemplateService : ApplicationService, ITransientDependency
/// <param name="input"></param>
/// <returns></returns>
[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);
}

View File

@ -39,5 +39,5 @@ public interface ITrackTemplateRepository : IBasicRepository<TrackTemplateEntity
Task<bool> UpdateContentRangeAsync(List<TrackTemplateContentEntity> updateObjs);
Task<List<DropdownListDataDto>> GetContentDropDownListAsync(GetTrackTemplateContentDropDownListVO input);
Task<UnifyPageResultDto<DropdownListDataDto>> GetContentDropDownListAsync(GetTrackTemplateContentDropDownListVO input);
}

View File

@ -164,7 +164,7 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
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>()
.InnerJoin<TrackContentEntity>((templateContent, trackContent) => templateContent.TrackContentId == trackContent.Id)
@ -177,6 +177,6 @@ public class TrackTemplateRepository : BasicRepository<TrackTemplateEntity>, ITr
Key = trackContent.Code + "-" + trackContent.Content
})
.Distinct()
.ToListAsync();
.ToPagedListAsync(input.PageIndex, input.PageSize);
}
}