Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_fund
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周鹏
tamp_fund
Commits
7f656595
Commit
7f656595
authored
Feb 18, 2022
by
钱坤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相似基金查询废弃分页查询,直接用topN
parent
a9b18f31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+3
-2
No files found.
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
7f656595
...
@@ -1724,11 +1724,12 @@ public class ProductServiceImpl implements ProductService, Constant {
...
@@ -1724,11 +1724,12 @@ public class ProductServiceImpl implements ProductService, Constant {
//查询同类基金
//查询同类基金
FundInfo
fundInfo
=
fundInfoMapper
.
selectByPrimaryKey
(
fundId
);
FundInfo
fundInfo
=
fundInfoMapper
.
selectByPrimaryKey
(
fundId
);
PageMethod
.
startPage
(
1
,
10
);
// 使用分页查询会先count再limit查询,浪费资源,这里取top 10即可,所以直接limit 10好了
// PageMethod.startPage(1, 10);
FundCountExample
example
=
new
FundCountExample
();
FundCountExample
example
=
new
FundCountExample
();
example
.
createCriteria
().
andSubstrategyEqualTo
(
fundInfo
.
getSubstrategy
()).
andIdNotEqualTo
(
fundId
)
example
.
createCriteria
().
andSubstrategyEqualTo
(
fundInfo
.
getSubstrategy
()).
andIdNotEqualTo
(
fundId
)
.
andDataSourcesEqualTo
(
Constant
.
ONE_NUM
).
andDeleteTagEqualTo
(
BizEnums
.
DeleteTag
.
tag_init
);
.
andDataSourcesEqualTo
(
Constant
.
ONE_NUM
).
andDeleteTagEqualTo
(
BizEnums
.
DeleteTag
.
tag_init
);
example
.
setOrderByClause
(
"ret_1y desc"
);
example
.
setOrderByClause
(
"ret_1y desc
limit 10
"
);
List
<
FundCount
>
fundCounts
=
fundCountMapper
.
selectByExample
(
example
);
List
<
FundCount
>
fundCounts
=
fundCountMapper
.
selectByExample
(
example
);
...
...
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