Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
middleware-automatic
Overview
Overview
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
shenjunjie
middleware-automatic
Commits
662961d7
Commit
662961d7
authored
Jun 12, 2023
by
liuyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'release'
2023年06/12 模板搜索 分页bug修复 See merge request
!78
parents
5001581e
e2038c0a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
middleware-automatic-center-server/src/main/java/com/zhiwei/middleware/automatic/server/service/impl/TemplateTitleServiceImpl.java
+5
-9
No files found.
middleware-automatic-center-server/src/main/java/com/zhiwei/middleware/automatic/server/service/impl/TemplateTitleServiceImpl.java
View file @
662961d7
...
@@ -54,10 +54,9 @@ public class TemplateTitleServiceImpl implements TemplateTitleService {
...
@@ -54,10 +54,9 @@ public class TemplateTitleServiceImpl implements TemplateTitleService {
List
<
Map
<
String
,
Object
>>
res
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
res
=
new
ArrayList
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
// 分页起始节点大于总模板数
// 分页起始节点大于总模板数
if
(
limit
>
templateTitleVoMap
.
size
())
{
// if (limit > templateTitleVoMap.size()) {
return
resultMap
;
// return resultMap;
}
// }
int
i
=
0
;
for
(
String
key
:
templateTitleVoMap
.
keySet
())
{
for
(
String
key
:
templateTitleVoMap
.
keySet
())
{
TemplateTitleVo
templateTitleVo
=
templateTitleVoMap
.
get
(
key
);
TemplateTitleVo
templateTitleVo
=
templateTitleVoMap
.
get
(
key
);
long
createTime
=
templateTitleVo
.
getCreateTime
().
getTime
();
long
createTime
=
templateTitleVo
.
getCreateTime
().
getTime
();
...
@@ -75,11 +74,6 @@ public class TemplateTitleServiceImpl implements TemplateTitleService {
...
@@ -75,11 +74,6 @@ public class TemplateTitleServiceImpl implements TemplateTitleService {
if
(!
StringUtils
.
isEmpty
(
searchInfo
)
&&
!
key
.
contains
(
searchInfo
))
{
if
(!
StringUtils
.
isEmpty
(
searchInfo
)
&&
!
key
.
contains
(
searchInfo
))
{
continue
;
continue
;
}
}
i
++;
// // 分页过滤
// if (limit >= i) {
// continue;
// }
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"templateTitle"
,
key
);
map
.
put
(
"templateTitle"
,
key
);
map
.
put
(
"project"
,
project
);
map
.
put
(
"project"
,
project
);
...
@@ -95,6 +89,8 @@ public class TemplateTitleServiceImpl implements TemplateTitleService {
...
@@ -95,6 +89,8 @@ public class TemplateTitleServiceImpl implements TemplateTitleService {
}
}
Tools
.
sortByField
(
res
,
orderField
,
isAsc
);
Tools
.
sortByField
(
res
,
orderField
,
isAsc
);
resultMap
.
put
(
"count"
,
templateTitleVoMap
.
size
());
resultMap
.
put
(
"count"
,
templateTitleVoMap
.
size
());
// 分页判断
limit
=
limit
>
res
.
size
()
?
0
:
limit
;
resultMap
.
put
(
"list"
,
res
.
subList
(
limit
,
Math
.
min
((
limit
+
size
),
res
.
size
())));
resultMap
.
put
(
"list"
,
res
.
subList
(
limit
,
Math
.
min
((
limit
+
size
),
res
.
size
())));
return
resultMap
;
return
resultMap
;
}
}
...
...
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