12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using ZhonTai.Admin.Core.Consts;
- using ZhonTai.Admin.Services.User;
- using ZhonTai.DynamicApi.Attributes;
- using ZhonTai.DynamicApi;
- using Microsoft.AspNetCore.Mvc;
- using ZhonTai.Admin.Core.Dto;
- using ZhonTai.Admin.Domain.Role;
- using ZhonTai.Admin.Domain.User;
- using ZhonTai.Admin.Services.User.Dto;
- using ZhonTai.Admin.Domain.UserRole;
- using ZhonTai.Admin.Domain.Project;
- using ZhonTai.Admin.Services.Project.Dto;
- namespace ZhonTai.Admin.Services.Project
- {
-
-
-
- [Order(10)]
- [DynamicApi(Area = AdminConsts.AreaName)]
- public partial class ProjectService : BaseService, IProjectService, IDynamicApi
- {
- private IProjectRepository _projectRepository => LazyGetRequiredService<IProjectRepository>();
- public ProjectService()
- {
- }
-
-
-
-
-
- [HttpPost]
- public async Task<PageOutput<ProjectGetPageOutput>> GetPageAsync(PageInput<ProjectGetPageInput> input)
- {
- var list = await _projectRepository.Select
- .Count(out var total)
- .OrderByDescending(true, a => a.Id)
- .Page(input.CurrentPage, input.PageSize)
- .ToListAsync(a => new ProjectGetPageOutput { name = a.name });
-
-
-
-
-
-
-
-
-
-
-
-
-
- var data = new PageOutput<ProjectGetPageOutput>()
- {
- List = Mapper.Map<List<ProjectGetPageOutput>>(list),
- Total = total
- };
- return data;
- }
- }
- }
|