Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
de9a9722
Commit
de9a9722
authored
Sep 21, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
f39fae66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
DocAuditService.java
...join/amos/knowledgebase/face/service/DocAuditService.java
+4
-5
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/DocAuditService.java
View file @
de9a9722
package
com
.
yeejoin
.
amos
.
knowledgebase
.
face
.
service
;
package
com
.
yeejoin
.
amos
.
knowledgebase
.
face
.
service
;
import
java.util.ArrayList
;
import
java.text.SimpleDateFormat
;
import
java.util.Collection
;
import
java.util.*
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.concurrent.atomic.AtomicReference
;
...
@@ -255,7 +253,7 @@ public class DocAuditService {
...
@@ -255,7 +253,7 @@ public class DocAuditService {
List
<
ConstantCategoryModel
>
allCategoryModel
=
new
ArrayList
<>();
List
<
ConstantCategoryModel
>
allCategoryModel
=
new
ArrayList
<>();
if
(!
allPublishedDocIds
.
isEmpty
())
{
if
(!
allPublishedDocIds
.
isEmpty
())
{
while
(
index
<
size
)
{
while
(
index
<
size
)
{
int
num
=
Math
.
min
(
index
+
5
0
,
size
);
int
num
=
Math
.
min
(
index
+
20
0
,
size
);
List
<
Long
>
curDocIds
=
allPublishedDocIds
.
subList
(
index
,
index
+
num
);
List
<
Long
>
curDocIds
=
allPublishedDocIds
.
subList
(
index
,
index
+
num
);
index
+=
num
;
index
+=
num
;
List
<
KnowledgeDocContentModel
>
docContentModels
=
docLibraryService
.
efficientList
(
curDocIds
);
List
<
KnowledgeDocContentModel
>
docContentModels
=
docLibraryService
.
efficientList
(
curDocIds
);
...
@@ -275,6 +273,7 @@ public class DocAuditService {
...
@@ -275,6 +273,7 @@ public class DocAuditService {
// 推mq消息给规则服务
// 推mq消息给规则服务
try
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
topic
,
ClazzUtils
.
serializableObject
(
definitionModel
),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
topic
,
ClazzUtils
.
serializableObject
(
definitionModel
),
RuleConfig
.
DEFAULT_QOS
,
false
);
logger
.
info
(
"知识库服务同步文档至规则消息发送成功 ("
+
definitionModel
+
") "
+
new
SimpleDateFormat
(
"yyyy-MM-dd hh:mm:ss"
).
format
(
new
Date
(
System
.
currentTimeMillis
())));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
fatal
(
"同步文档至规则服务出错"
,
e
);
logger
.
fatal
(
"同步文档至规则服务出错"
,
e
);
}
}
...
...
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