Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
be5900a1
Commit
be5900a1
authored
Dec 17, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:限制文件个数
parent
aaf63cee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
KnowledgeRestImpl.java
...ava/cn/com/poc/knowledge/rest/impl/KnowledgeRestImpl.java
+9
-1
No files found.
src/main/java/cn/com/poc/knowledge/rest/impl/KnowledgeRestImpl.java
View file @
be5900a1
...
...
@@ -107,7 +107,15 @@ public class KnowledgeRestImpl implements KnowledgeRest {
Assert
.
notNull
(
dto
.
getKnowledgeInfoId
());
Assert
.
notNull
(
dto
.
getKdIds
());
Assert
.
notNull
(
dto
.
getSegmentationConfig
());
return
knowledgeService
.
trainKnowledge
(
dto
.
getKnowledgeInfoId
(),
dto
.
getKdIds
(),
dto
.
getSegmentationConfig
());
UserBaseEntity
userBaseEntity
=
BlContext
.
getCurrentUser
();
MemberEquityInfo
equityInfo
=
memberEquityService
.
getEquityInfo
(
userBaseEntity
.
getUserId
());
String
lock
=
userBaseEntity
.
getUserId
().
toString
().
intern
();
synchronized
(
lock
)
{
if
((
dto
.
getKdIds
().
size
()
+
equityInfo
.
getUsedKnowledgeNum
())
>
equityInfo
.
getKnowledgeNum
())
{
throw
new
I18nMessageException
(
"exception/create.num.limit"
);
}
return
knowledgeService
.
trainKnowledge
(
dto
.
getKnowledgeInfoId
(),
dto
.
getKdIds
(),
dto
.
getSegmentationConfig
());
}
}
@Override
...
...
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