diff --git a/Code/src/MineTec.ProManager.Application/Commd/OutputBase.cs b/Code/src/MineTec.ProManager.Application/Commd/OutputBase.cs new file mode 100644 index 0000000..27bbc75 --- /dev/null +++ b/Code/src/MineTec.ProManager.Application/Commd/OutputBase.cs @@ -0,0 +1,15 @@ +using Abp.Application.Services.Dto; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MineTec.ProManager.Commd +{ + public class OutputBase + { + public int code { get; set; } + public string msg { get; set; } + public int count { get; set; } + + } +} diff --git a/Code/src/MineTec.ProManager.Application/UserInfo/Dto/UserInfoOutput.cs b/Code/src/MineTec.ProManager.Application/UserInfo/Dto/UserInfoOutput.cs new file mode 100644 index 0000000..7488035 --- /dev/null +++ b/Code/src/MineTec.ProManager.Application/UserInfo/Dto/UserInfoOutput.cs @@ -0,0 +1,12 @@ +using MineTec.ProManager.Commd; +using System; +using System.Collections.Generic; +using System.Text; + +namespace MineTec.ProManager.UserInfo.Dto +{ + public class UserInfoOutput:OutputBase + { + public List data { get; set; } + } +} diff --git a/Code/src/MineTec.ProManager.Application/UserInfo/IUserInfoAppService.cs b/Code/src/MineTec.ProManager.Application/UserInfo/IUserInfoAppService.cs index 2fb7bfa..a7e3ab1 100644 --- a/Code/src/MineTec.ProManager.Application/UserInfo/IUserInfoAppService.cs +++ b/Code/src/MineTec.ProManager.Application/UserInfo/IUserInfoAppService.cs @@ -12,5 +12,7 @@ namespace MineTec.ProManager.UserInfo CreateUpdateUserInfoDto, //用于创建用户 CreateUpdateUserInfoDto> //用于更新用户信息 { + + } } diff --git a/Code/src/MineTec.ProManager.Application/UserInfo/UserInfoAppService.cs b/Code/src/MineTec.ProManager.Application/UserInfo/UserInfoAppService.cs index 86d9ad1..4f2c860 100644 --- a/Code/src/MineTec.ProManager.Application/UserInfo/UserInfoAppService.cs +++ b/Code/src/MineTec.ProManager.Application/UserInfo/UserInfoAppService.cs @@ -2,6 +2,7 @@ using Abp.Application.Services.Dto; using Abp.Collections.Extensions; using Abp.Domain.Repositories; +using MineTec.ProManager.Commd; using MineTec.ProManager.UserInfo.Dto; using System; using System.Collections.Generic; @@ -39,16 +40,19 @@ namespace MineTec.ProManager.UserInfo } - public async Task> GetAllUsers(GetAllUsers input) + public async Task GetAllUsers(GetAllUsers input) { + + var result = new UserInfoOutput(); var query = base.CreateFilteredQuery(input).WhereIf(!string.IsNullOrEmpty(input.Account), t => t.Account.Contains(input.Account)).WhereIf(!string.IsNullOrEmpty(input.UserName), t => t.UserName.Contains(input.UserName)); var usercount = query.Count(); var userlist = query.ToList(); - return new PagedResultDto() - { - TotalCount = usercount, - Items = ObjectMapper.Map>(userlist) - }; + var list = ObjectMapper.Map>(userlist); + result.code = 0; + result.count = usercount; + result.data = list; + + return new UserInfoOutput { code = 0, msg = "", count = usercount, data = list }; } } } \ No newline at end of file