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
b34e5457
Commit
b34e5457
authored
Oct 29, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.使用登记分页太慢问题处理
parent
ece8f24a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+0
-0
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+1
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+24
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
b34e5457
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
b34e5457
...
...
@@ -114,7 +114,7 @@ public class JgUseRegistrationController extends BaseController {
Page
<
Map
<
String
,
Object
>>
list
=
jgUseRegistrationServiceImpl
.
getList
(
dto
,
sort
,
page
,
dto
.
getRoleIds
());
list
.
getRecords
().
forEach
(
x
->
{
x
.
put
(
"companyType"
,
info
.
getCompany
().
getCompanyType
());
x
.
put
(
"regType
Desc
"
,
"1"
.
equals
(
x
.
get
(
"regType"
))
?
"历史登记"
:
"新增登记"
);
x
.
put
(
"regType"
,
"1"
.
equals
(
x
.
get
(
"regType"
))
?
"历史登记"
:
"新增登记"
);
});
return
ResponseHelper
.
buildResponse
(
list
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
b34e5457
...
...
@@ -2011,6 +2011,30 @@ public class CommonServiceImpl implements ICommonService {
return
optionalSortMap
.
orElse
(
null
);
}
/**
* 排序字段不转下滑线 排序 :页面列表排序功能支持,将 "字段,ascend" 或 "字段,descend" 转化为对应JSONObject
*
* @param sort "字段,ascend" 或 "字段,descend"
* @return JSONObject
*/
public
SortVo
sortFieldConversionNoToUnderline
(
String
sort
)
{
Optional
<
String
>
optionalSort
=
Optional
.
ofNullable
(
sort
);
Optional
<
SortVo
>
optionalSortMap
=
optionalSort
.
filter
(
s
->
!
s
.
isEmpty
())
.
map
(
s
->
{
String
[]
sortParts
=
s
.
split
(
","
);
if
(
sortParts
.
length
==
2
)
{
String
field
=
sortParts
[
0
];
String
sortSituation
=
sortParts
[
1
].
contains
(
"asc"
)
?
"ASC"
:
"DESC"
;
return
SortVo
.
builder
()
.
field
(
field
)
.
sortType
(
sortSituation
)
.
build
();
}
return
null
;
});
return
optionalSortMap
.
orElse
(
null
);
}
@Override
public
void
fightUseFlagGenerate
(
UseFlagParamDto
useFlagParamDto
,
HttpServletResponse
response
)
{
Objects
.
requireNonNull
(
useFlagParamDto
,
"参数不能为空"
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
View file @
b34e5457
...
...
@@ -275,7 +275,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
String
sort
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversion
(
sort
);
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversion
NoToUnderline
(
sort
);
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
);
}
...
...
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