From 0a2c42c27f8e3487c5b22c79cd71e6e1c3a05005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= <454313500@qq.com> Date: Fri, 22 Dec 2023 16:05:35 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=AE=8C=E5=96=84bbs=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dtos/BbsUser/BbsUserGetOutputDto.cs | 13 +++++++++++++ .../Dtos/Comment/CommentGetListOutputDto.cs | 5 +++-- .../Dtos/Comment/CommentGetOutputDto.cs | 3 ++- .../Services/CommentService.cs | 2 ++ 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserGetOutputDto.cs diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserGetOutputDto.cs new file mode 100644 index 00000000..b0167102 --- /dev/null +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/BbsUser/BbsUserGetOutputDto.cs @@ -0,0 +1,13 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Yi.Framework.Rbac.Application.Contracts.Dtos.User; + +namespace Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser +{ + public class BbsUserGetOutputDto: UserGetOutputDto + { + } +} diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListOutputDto.cs index 84054303..a61de041 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetListOutputDto.cs @@ -1,4 +1,5 @@ using Volo.Abp.Application.Dtos; +using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser; using Yi.Framework.Rbac.Application.Contracts.Dtos.User; namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment @@ -29,12 +30,12 @@ namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment /// /// 用户,评论人用户信息 /// - public UserGetOutputDto CreateUser { get; set; } + public BbsUserGetOutputDto CreateUser { get; set; } /// /// 被评论的用户信息 /// - public UserGetOutputDto CommentedUser { get; set; } + public BbsUserGetOutputDto CommentedUser { get; set; } /// diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetOutputDto.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetOutputDto.cs index cf4550b1..cd348c86 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetOutputDto.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application.Contracts/Dtos/Comment/CommentGetOutputDto.cs @@ -1,4 +1,5 @@ using Volo.Abp.Application.Dtos; +using Yi.Framework.Bbs.Application.Contracts.Dtos.BbsUser; using Yi.Framework.Rbac.Application.Contracts.Dtos.User; namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment @@ -19,7 +20,7 @@ namespace Yi.Framework.Bbs.Application.Contracts.Dtos.Comment /// 用户id联表为用户对象 /// - public UserGetOutputDto User { get; set; } + public BbsUserGetOutputDto User { get; set; } /// /// 根节点的评论id /// diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/CommentService.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/CommentService.cs index 6c94b749..534141db 100644 --- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/CommentService.cs +++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Application/Services/CommentService.cs @@ -90,6 +90,8 @@ namespace Yi.Framework.Bbs.Application.Services //鑾峰彇鍏ㄩ噺涓婚璇勮锛 鍏堣幏鍙栭《绾х殑锛屽皢鍏朵粬瀛愮粍鍚堝埌椤剁骇涓嬶紝褰㈡垚涓涓簩缁,鍏堣浆鎴恉to List items = await MapToGetListOutputDtosAsync(outPut); + //鏈鍚庡皢鐢ㄦ埛淇℃伅杩涜琛ュ叏鍗冲彲 + return new PagedResultDto(entities.Count(), items); }