feat: 完成add-module功能

This commit is contained in:
橙子
2024-06-08 21:51:45 +08:00
parent b69267d94f
commit c23ff654ed
11 changed files with 101 additions and 53 deletions

View File

@@ -18,6 +18,6 @@ namespace Yi.Framework.Bbs.Domain.Shared.Consts
public const string AgreeNotice = "您的主题[{0}]被[{1}]用户点赞!得到一致认可,发现宝藏内容!";
public const string CommentNotice = "您的主题[{0}]被[{1}]用户评论!评论内容:[{2}]。。。";
public const string CommentNotice = "您的主题[{0}]被[{1}]用户评论!评论内容:[{2}]";
}
}

View File

@@ -50,8 +50,8 @@ namespace Yi.Framework.Bbs.Domain.EventHandlers
var commentUser = await _userRepository.GetFirstAsync(x => x.Id == commentEntity.CreatorId);
//截取10个长度
var content = commentEntity.Content.Length >= 10 ? commentEntity.Content.Substring(0, 10) : commentEntity.Content;
//截取30个长度
var content = commentEntity.Content.Length >= 30 ? commentEntity.Content.Substring(0, 30)+"..." : commentEntity.Content;
//通知主题作者,有人评论
await _localEventBus.PublishAsync(new BbsNoticeEventArgs(disucssDto.DiscussId, string.Format(DiscussConst.CommentNotice, disucssDto.DiscussTitle, commentUser.UserName, content)), false);
}

View File

@@ -24,7 +24,7 @@ namespace Yi.Framework.Rbac.Domain.Entities
UserName = userName;
EncryPassword.Password = password;
Phone = phone;
Nick = nick;
Nick = nick+"-"+userName;
BuildPassword();
}