feat(note): 增加私密笔记功能
- 在 MarkdownFile 表中添加 is_private 字段,用于标记笔记是否私密- 修改 MarkdownController 中的 getMarkdownContent 方法,增加对私密笔记的处理逻辑 - 更新 MarkdownFileService 接口和 MarkdownFileServiceImpl 实现类,支持根据认证状态获取笔记内容 - 优化未认证用户访问私密笔记时的处理,只显示标题不显示内容
This commit is contained in:
@@ -17,9 +17,10 @@ public interface MarkdownFileService extends IService<MarkdownFile> {
|
||||
/**
|
||||
* 根据ID获取Markdown文件
|
||||
* @param id 文件ID
|
||||
* @param isAuthenticated 是否已认证
|
||||
* @return Markdown文件对象
|
||||
*/
|
||||
MarkdownFile getMarkdownById(Long id);
|
||||
MarkdownFile getMarkdownById(Long id, boolean isAuthenticated);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user