Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
shun peng
/
lufa-ai
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
848f60a3
authored
Jul 29, 2026
by
pengshun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改知识库大小限制在个人知识库
parent
2a8229c8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
3 deletions
+3
-3
ruoyi-vue-pro-master-jdk17/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/knowledge/AiKnowledgeDocumentServiceImpl.java
+2
-2
ruoyi-vue-pro-master-jdk17/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java
+1
-1
ruoyi-vue-pro-master-jdk17/yudao-server/.DS_Store
+0
-0
yudao-ui-admin-vue3/.DS_Store
+0
-0
No files found.
ruoyi-vue-pro-master-jdk17/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/knowledge/AiKnowledgeDocumentServiceImpl.java
View file @
848f60a3
...
...
@@ -71,7 +71,7 @@ public class AiKnowledgeDocumentServiceImpl implements AiKnowledgeDocumentServic
throw
exception
(
KNOWLEDGE_REPEAT_FILE
);
}
// 1. 校验参数
knowledgeService
.
validateKnowledgeExists
(
createReqVO
.
getKnowledgeId
());
AiKnowledgeDO
knowledge
=
knowledgeService
.
validateKnowledgeExists
(
createReqVO
.
getKnowledgeId
());
String
content
=
createReqVO
.
getContent
();
Integer
cotentLength
=
null
;
if
(!
Objects
.
equals
(
createReqVO
.
getUrl
(),
""
)
&&
createReqVO
.
getUrl
()
!=
null
){
...
...
@@ -80,7 +80,7 @@ public class AiKnowledgeDocumentServiceImpl implements AiKnowledgeDocumentServic
AdminUserDO
user
=
userService
.
getUser
(
getLoginUserId
());
long
usedSize
=
getKnowledgeSize
(
user
.
getId
())
+
cotentLength
;
if
(
usedSize
>
user
.
getKbSize
()){
if
(
usedSize
>
user
.
getKbSize
()
&&
Objects
.
equals
(
knowledge
.
getEmbeddingModel
(),
"owner_kb"
)
){
throw
exception
(
KNOWLEDGE_NO_SPACE
);
}
}
...
...
ruoyi-vue-pro-master-jdk17/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/FileController.java
View file @
848f60a3
...
...
@@ -151,7 +151,7 @@ public class FileController {
// 1. 使用第三方库读取 .doc 数据流 (此处以 Spire.Doc 为例)
// com.spire.doc.Document document = new com.spire.doc.Document();
Document
document
=
new
Document
();
document
.
loadFromStream
(
is
,
com
.
spire
.
doc
.
FileFormat
.
Doc
);
document
.
loadFromStream
(
is
,
com
.
spire
.
doc
.
FileFormat
.
Auto
);
// 2. 将数据流保存为 .docx 格式到内存输出流
// FileFormat.Docx_2013 是较稳定的兼容格式
...
...
ruoyi-vue-pro-master-jdk17/yudao-server/.DS_Store
View file @
848f60a3
No preview for this file type
yudao-ui-admin-vue3/.DS_Store
View file @
848f60a3
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment