feat(biji-houdaun): 支持 Markdown 文件上传、预览、编辑和创建
- 新增 Markdown 文件预览功能 - 更新 Markdown 文件创建和编辑接口,使用 Long 类型的 ID - 优化图片上传接口,支持 Long 类型的用户 ID 和 Markdown ID - 重构 MarkdownFileService接口,增加获取 Markdown 文件的方法 - 修改 MarkdownFileServiceImpl 实现类,支持新的 Markdown 文件操作
This commit is contained in:
@@ -14,7 +14,7 @@ public interface MarkdownFileService extends IService<MarkdownFile> {
|
||||
* @param content 文件内容
|
||||
* @return 创建的文件对象
|
||||
*/
|
||||
MarkdownFile createMarkdownFile(Integer userId, String title, String fileName, String content);
|
||||
MarkdownFile createMarkdownFile(Long userId, String title, String fileName, String content);
|
||||
|
||||
/**
|
||||
* 更新Markdown内容
|
||||
@@ -22,12 +22,19 @@ public interface MarkdownFileService extends IService<MarkdownFile> {
|
||||
* @param content 新内容
|
||||
* @return 更新后的文件对象
|
||||
*/
|
||||
MarkdownFile updateMarkdownContent(Integer id, String content);
|
||||
MarkdownFile updateMarkdownContent(Long id, String content);
|
||||
|
||||
/**
|
||||
* 根据ID获取Markdown文件
|
||||
* @param id 文件ID
|
||||
* @return Markdown文件对象
|
||||
*/
|
||||
MarkdownFile getMarkdownById(Long id);
|
||||
|
||||
/**
|
||||
* 获取用户的所有Markdown文件
|
||||
* @param userId 用户ID
|
||||
* @return 文件列表
|
||||
*/
|
||||
List<MarkdownFile> getUserFiles(Integer userId);
|
||||
}
|
||||
List<MarkdownFile> getUserFiles(Long userId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user