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
128a579d
Commit
128a579d
authored
Oct 27, 2023
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(knowledgebase): 知识库列表接口增加查询条件
parent
bd8b0548
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
DocLibraryService.java
...in/amos/knowledgebase/face/service/DocLibraryService.java
+8
-2
KnowledgeDocContentMapper.xml
...e/src/main/resources/mapper/KnowledgeDocContentMapper.xml
+13
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/DocLibraryService.java
View file @
128a579d
...
...
@@ -164,7 +164,7 @@ public class DocLibraryService {
Page
page
=
new
Page
();
int
total
=
docContentService
.
getBaseMapper
().
queryDocBaseInfoTotal
(
paramsMap
);
page
.
setTotal
(
total
);
if
(
total
>
0
&&
total
>
offset
)
{
if
(
total
>
0
)
{
List
<
Map
<
String
,
Object
>>
list
=
docContentService
.
getBaseMapper
().
queryDocBaseInfoList
(
paramsMap
);
list
.
stream
().
map
(
x
->
{
x
.
put
(
"createTime"
,
x
.
get
(
"createTime"
).
toString
().
replace
(
"T"
,
" "
));
...
...
@@ -283,7 +283,13 @@ public class DocLibraryService {
commonFiltersMap
.
put
(
"directoryIdList"
,
directoryIdList
);
}
if
(!
ValidationUtil
.
isEmpty
(
docTitle
))
{
commonFiltersMap
.
put
(
"docTitle"
,
docTitle
);
if
(
docTitle
.
contains
(
";"
))
{
String
[]
vars
=
docTitle
.
split
(
";"
);
Set
<
String
>
docTitleLike
=
new
HashSet
<>(
Arrays
.
asList
(
vars
));
commonFiltersMap
.
put
(
"docTitleLike"
,
docTitleLike
);
}
else
{
commonFiltersMap
.
put
(
"docTitle"
,
docTitle
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
docStatus
))
{
commonFiltersMap
.
put
(
"docStatus"
,
docStatus
);
...
...
amos-boot-system-knowledgebase/src/main/resources/mapper/KnowledgeDocContentMapper.xml
View file @
128a579d
...
...
@@ -118,6 +118,12 @@
<if
test=
"commonFilters.docTitle != null and commonFilters.docTitle.length > 0"
>
AND DOC_TITLE LIKE CONCAT("%", #{commonFilters.docTitle}, "%")
</if>
<if
test=
"commonFilters.docTitleLike != null and commonFilters.docTitleLike.size > 0"
>
AND
<foreach
collection=
"commonFilters.docTitleLike"
item=
"docTitle"
open=
"("
close=
")"
separator=
"or"
>
DOC_TITLE LIKE CONCAT("%", #{docTitle}, "%")
</foreach>
</if>
<if
test=
"commonFilters.docStatus != null and commonFilters.docStatus.length > 0"
>
AND DOC_STATUS = #{commonFilters.docStatus}
</if>
...
...
@@ -201,6 +207,12 @@
<if
test=
"commonFilters.docTitle != null and commonFilters.docTitle.length > 0"
>
AND DOC_TITLE LIKE CONCAT("%", #{commonFilters.docTitle}, "%")
</if>
<if
test=
"commonFilters.docTitleLike != null and commonFilters.docTitleLike.size > 0"
>
AND
<foreach
collection=
"commonFilters.docTitleLike"
item=
"docTitle"
open=
"("
close=
")"
separator=
"or"
>
DOC_TITLE LIKE CONCAT("%", #{docTitle}, "%")
</foreach>
</if>
<if
test=
"commonFilters.docStatus != null and commonFilters.docStatus.length > 0"
>
AND DOC_STATUS = #{commonFilters.docStatus}
</if>
...
...
@@ -248,7 +260,7 @@
</if>
</where>
</select>
<select
id=
"getAllPublishedDocIds"
resultType=
"long"
>
SELECT SEQUENCE_NBR FROM knowledge_doc_content WHERE DOC_STATUS = "PUBLISHED"
</select>
...
...
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