diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/DiscussConst.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/DiscussConst.cs
index 29103247..f0a7d249 100644
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/DiscussConst.cs
+++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain.Shared/Consts/DiscussConst.cs
@@ -9,7 +9,6 @@ namespace Yi.Framework.Bbs.Domain.Shared.Consts
///
/// 常量定义
///
-
public class DiscussConst
{
public const string No_Exist = "传入的主题id不存在";
@@ -18,32 +17,20 @@ namespace Yi.Framework.Bbs.Domain.Shared.Consts
public const string AgreeNotice = """
""";
+
public const string CommentNotice = """
-
- """;
- public const string CommentNoticeToReply= """
-
- """;
+
+
🍖 您的主题 [{0}] 有 [{1}] 用户评论!
+
+ """;
+
+ public const string CommentNoticeToReply = """
+
+
🍖 您在主题 [{0}] 的评论有 [{1}] 用户回复!
+
+ """;
}
-}
+}
\ No newline at end of file
diff --git a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/EventHandlers/CommentCreatedEventHandler.cs b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/EventHandlers/CommentCreatedEventHandler.cs
index b37a15de..0c5f63c3 100644
--- a/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/EventHandlers/CommentCreatedEventHandler.cs
+++ b/Yi.Abp.Net8/module/bbs/Yi.Framework.Bbs.Domain/EventHandlers/CommentCreatedEventHandler.cs
@@ -54,9 +54,15 @@ namespace Yi.Framework.Bbs.Domain.EventHandlers
var content = commentEntity.Content.Length >= 30 ? commentEntity.Content.Substring(0, 30)+"..." : commentEntity.Content;
//通知主题作者,有人评论
await _localEventBus.PublishAsync(new BbsNoticeEventArgs(disucssDto.DiscussUserId, string.Format(DiscussConst.CommentNotice, disucssDto.DiscussTitle, commentUser.UserName, content,commentEntity.DiscussId)), false);
- //通知回复者,有人评论
- await _localEventBus.PublishAsync(new BbsNoticeEventArgs(commentEntity.ParentId, string.Format(DiscussConst.CommentNoticeToReply, disucssDto.DiscussTitle, commentUser.UserName, content,commentEntity.DiscussId)), false);
+ //如果为空,表示根路径,没有回复者
+ if (commentEntity.ParentId != Guid.Empty)
+ {
+ //通知回复者,有人评论
+ await _localEventBus.PublishAsync(new BbsNoticeEventArgs(commentEntity.ParentId, string.Format(DiscussConst.CommentNoticeToReply, disucssDto.DiscussTitle, commentUser.UserName, content,commentEntity.DiscussId)), false);
+
+ }
+
}
}
}
diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/FileService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/FileService.cs
index 56487a81..f0287ad9 100644
--- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/FileService.cs
+++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/FileService.cs
@@ -37,6 +37,12 @@ namespace Yi.Framework.Rbac.Application.Services
{
var path = await GetReturnPathAsync(code, isThumbnail);
+ if (!File.Exists(path))
+ {
+ throw new UserFriendlyException("文件不存在",code:"404");
+ }
+
+
var steam = await File.ReadAllBytesAsync(path);
//考虑从路径中获取
diff --git a/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj b/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj
index e116a610..f50d8a24 100644
--- a/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj
+++ b/Yi.Abp.Net8/src/Yi.Abp.Web/Yi.Abp.Web.csproj
@@ -37,6 +37,9 @@
Always
+
+ Always
+
diff --git a/Yi.Bbs.Vue3/src/views/home/Index.vue b/Yi.Bbs.Vue3/src/views/home/Index.vue
index c4535796..59db4649 100644
--- a/Yi.Bbs.Vue3/src/views/home/Index.vue
+++ b/Yi.Bbs.Vue3/src/views/home/Index.vue
@@ -82,9 +82,9 @@
你好,很高兴今天又遇到你呀~
-
+
-
+
{{item.name}}
@@ -176,8 +176,8 @@