Browse Source

修改Job列表返回结构

master
mahao 1 year ago
parent
commit
71edc7805e
  1. 17
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs

17
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs

@ -3,8 +3,10 @@ using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Uow; using Volo.Abp.Uow;
using Win.Sfs.SettleAccount.MaterialRelationships;
namespace Win.Sfs.SettleAccount.Entities.TaskJobs; namespace Win.Sfs.SettleAccount.Entities.TaskJobs;
@ -24,13 +26,24 @@ public class JobAppService: ApplicationService
/// </summary> /// </summary>
/// <remarks> /// <remarks>
[HttpPost] [HttpPost]
[Route("list")] [Route("listold")]
[UnitOfWork(false)] [UnitOfWork(false)]
public virtual async Task<List<JobDto>> GetListAsync(JobRequestDto input) public virtual async Task<List<JobDto>> GetListOldAsync(JobRequestDto input)
{ {
return await _service.GetListAsync(input); return await _service.GetListAsync(input);
} }
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
[HttpPost]
[Route("list")]
[UnitOfWork(false)]
public virtual async Task<PagedResultDto<JobDto>> GetListAsync(JobRequestDto input)
{
var lists = await _service.GetListAsync(input);
return new PagedResultDto<JobDto>(lists.Count, lists);
}
[HttpGet] [HttpGet]
[Route("{id}")] [Route("{id}")]

Loading…
Cancel
Save