记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
323e1079
Commit
323e1079
authored
Sep 18, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交chime社交相关
parent
b75d2eba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
ChimePerformanceServiceImpl.java
...rvice/chime/service/impl/ChimePerformanceServiceImpl.java
+7
-5
TestDataUtils.java
.../java/com/liquidnet/service/chime/test/TestDataUtils.java
+1
-2
No files found.
liquidnet-bus-service/liquidnet-service-chime/liquidnet-service-chime-impl/src/main/java/com/liquidnet/service/chime/service/impl/ChimePerformanceServiceImpl.java
View file @
323e1079
...
@@ -57,21 +57,23 @@ public class ChimePerformanceServiceImpl implements IChimePerformanceService {
...
@@ -57,21 +57,23 @@ public class ChimePerformanceServiceImpl implements IChimePerformanceService {
if
(
StringUtil
.
isNotEmpty
(
reqDto
.
getSex
())){
if
(
StringUtil
.
isNotEmpty
(
reqDto
.
getSex
())){
criteria
=
criteria
.
and
(
"sex"
).
is
(
reqDto
.
getSex
());
criteria
=
criteria
.
and
(
"sex"
).
is
(
reqDto
.
getSex
());
}
}
Query
query
=
Query
.
query
(
criteria
);
query
.
fields
().
include
(
"_id"
);
Pageable
pageableCount
=
PageRequest
.
of
(
1
,
1000
);
// get 5 profiles on a page
Query
queryCount
=
Query
.
query
(
criteria
);
queryCount
.
fields
().
include
(
"_id"
);
queryCount
.
with
(
pageableCount
);
// 排序
// 排序
// 查询总数
// 查询总数
long
startTime
=
System
.
currentTimeMillis
();
long
startTime
=
System
.
currentTimeMillis
();
// int count = (int) mongoTemplate.count(query, ChimeUserInfoVo.class, ChimeUserInfoVo.class.getSimpleName());
int
count
=
(
int
)
mongoTemplate
.
count
(
queryCount
,
ChimeUserInfoVo
.
class
,
ChimeUserInfoVo
.
class
.
getSimpleName
());
int
count
=
1000
;
long
endTime
=
System
.
currentTimeMillis
();
long
endTime
=
System
.
currentTimeMillis
();
log
.
info
(
"查询标签数据 count:{} 耗时:{}ms"
,
count
,
endTime
-
startTime
);
log
.
info
(
"查询标签数据 count:{} 耗时:{}ms"
,
count
,
endTime
-
startTime
);
// 每页五个
// 每页五个
Pageable
pageable
=
PageRequest
.
of
(
pageNum
,
pageSize
);
// get 5 profiles on a page
Pageable
pageable
=
PageRequest
.
of
(
pageNum
,
pageSize
);
// get 5 profiles on a page
query
=
Query
.
query
(
criteria
);
Query
query
=
Query
.
query
(
criteria
);
query
.
with
(
pageable
);
query
.
with
(
pageable
);
startTime
=
System
.
currentTimeMillis
();
startTime
=
System
.
currentTimeMillis
();
...
...
liquidnet-bus-service/liquidnet-service-chime/liquidnet-service-chime-impl/src/test/java/com/liquidnet/service/chime/test/TestDataUtils.java
View file @
323e1079
...
@@ -223,8 +223,7 @@ public class TestDataUtils {
...
@@ -223,8 +223,7 @@ public class TestDataUtils {
reqDto
.
setOrderItem
(
null
);
reqDto
.
setOrderItem
(
null
);
reqDto
.
setOrderSc
(
null
);
reqDto
.
setOrderSc
(
null
);
reqDto
.
setSex
(
"男"
);
reqDto
.
setSex
(
"男"
);
reqDto
.
setTags
(
"Tags8,tags9,tags2"
);
reqDto
.
setTags
(
"tags1"
);
// PageInfo<ChimeUserInfoDto> pageInfo = chimePerformanceService.getUserListByCon(reqDto);
NewPageResult
<
ChimeUserInfoDto
>
pageInfo
=
chimePerformanceService
.
getUserListByCon
(
reqDto
);
NewPageResult
<
ChimeUserInfoDto
>
pageInfo
=
chimePerformanceService
.
getUserListByCon
(
reqDto
);
long
endTime
=
System
.
currentTimeMillis
();
long
endTime
=
System
.
currentTimeMillis
();
log
.
info
(
"耗时:{}ms"
,
endTime
-
startTime
);
log
.
info
(
"耗时:{}ms"
,
endTime
-
startTime
);
...
...
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