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
f354a8ea
Commit
f354a8ea
authored
Apr 21, 2021
by
张亚辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
无净值基金推荐
parent
cf692241
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
30 deletions
+33
-30
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+33
-30
No files found.
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
f354a8ea
...
...
@@ -1677,32 +1677,35 @@ public class ProductServiceImpl implements ProductService, Constant {
PageMethod
.
startPage
(
1
,
10
);
List
<
IfaImportedFundInfo
>
importedFundInfoList
=
ifaImportedFundInfoMapper
.
selectByExample
(
example
);
List
<
String
>
fundIdList
=
importedFundInfoList
.
stream
().
map
(
IfaImportedFundInfo:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
importedFundInfoList
))
{
List
<
String
>
fundIdList
=
importedFundInfoList
.
stream
().
map
(
IfaImportedFundInfo:
:
getId
).
collect
(
Collectors
.
toList
());
IfaImportedFundCountExample
countExample
=
new
IfaImportedFundCountExample
();
countExample
.
createCriteria
().
andFundIdIn
(
fundIdList
).
andDeleteTagEqualTo
(
BizEnums
.
DeleteTag
.
tag_init
);
List
<
IfaImportedFundCount
>
importedFundCountList
=
ifaImportedFundCountMapper
.
selectByExample
(
countExample
);
IfaImportedFundCountExample
countExample
=
new
IfaImportedFundCountExample
();
countExample
.
createCriteria
().
andFundIdIn
(
fundIdList
).
andDeleteTagEqualTo
(
BizEnums
.
DeleteTag
.
tag_init
);
List
<
IfaImportedFundCount
>
importedFundCountList
=
ifaImportedFundCountMapper
.
selectByExample
(
countExample
);
Map
<
String
,
IfaImportedFundCount
>
fundCountMap
;
if
(
CollectionUtils
.
isNotEmpty
(
importedFundCountList
))
{
fundCountMap
=
importedFundCountList
.
stream
().
collect
(
Collectors
.
toMap
(
IfaImportedFundCount:
:
getFundId
,
c
->
c
));
}
else
{
fundCountMap
=
null
;
}
Map
<
String
,
IfaImportedFundCount
>
fundCountMap
;
if
(
CollectionUtils
.
isNotEmpty
(
importedFundCountList
))
{
fundCountMap
=
importedFundCountList
.
stream
().
collect
(
Collectors
.
toMap
(
IfaImportedFundCount:
:
getFundId
,
c
->
c
));
}
else
{
fundCountMap
=
null
;
}
List
<
String
>
checkFundIdList
=
feignClientForDiagnose
.
getFundCollectInfo
(
fundIdList
).
getAttributes
();
List
<
String
>
checkFundIdList
=
feignClientForDiagnose
.
getFundCollectInfo
(
fundIdList
).
getAttributes
();
importedFundInfoList
.
forEach
(
item
->
{
FundSameResp
p
=
FundSameResp
.
builder
()
.
fundId
(
item
.
getId
())
.
fundName
(
item
.
getFundName
())
.
isCheck
(
CollectionUtils
.
isNotEmpty
(
checkFundIdList
)
?
(
checkFundIdList
.
contains
(
item
.
getId
())
?
1
:
0
)
:
0
)
.
build
();
return
importedFundInfoList
.
stream
().
map
(
item
->
{
FundSameResp
p
=
FundSameResp
.
builder
()
.
fundId
(
item
.
getId
())
.
fundName
(
item
.
getFundName
())
.
isCheck
(
CollectionUtils
.
isNotEmpty
(
checkFundIdList
)
?
(
checkFundIdList
.
contains
(
item
.
getId
())
?
1
:
0
)
:
0
)
.
build
();
if
(
fundCountMap
!=
null
&&
fundCountMap
.
containsKey
(
item
.
getId
()))
{
p
.
setRet1y
(
BigDecimalUtil
.
toString
(
fundCountMap
.
get
(
item
.
getId
()).
getRet1y
(),
2
));
}
});
if
(
fundCountMap
!=
null
&&
fundCountMap
.
containsKey
(
item
.
getId
()))
{
p
.
setRet1y
(
BigDecimalUtil
.
toString
(
fundCountMap
.
get
(
item
.
getId
()).
getRet1y
(),
2
));
}
return
p
;
}).
collect
(
Collectors
.
toList
());
}
return
new
ArrayList
<>(
0
);
}
...
...
@@ -2415,16 +2418,16 @@ public class ProductServiceImpl implements ProductService, Constant {
PageMethod
.
startPage
(
1
,
10
);
List
<
IfaImportedNonavFund
>
importedFundInfoList
=
ifaImportedNonavFundMapper
.
selectByExample
(
example
);
List
<
String
>
fundIdList
=
importedFundInfoList
.
stream
().
map
(
IfaImportedNonavFund:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
checkFundIdList
=
feignClientForDiagnose
.
getFundCollectInfo
(
fundIdList
).
getAttributes
();
if
(
CollectionUtils
.
isNotEmpty
(
importedFundInfoList
))
{
List
<
String
>
fundIdList
=
importedFundInfoList
.
stream
().
map
(
IfaImportedNonavFund:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
checkFundIdList
=
feignClientForDiagnose
.
getFundCollectInfo
(
fundIdList
).
getAttributes
();
importedFundInfoList
.
forEach
(
item
->
{
FundSameResp
p
=
FundSameResp
.
builder
()
.
fundId
(
item
.
getId
())
.
fundName
(
item
.
getFundName
())
.
isCheck
(
CollectionUtils
.
isNotEmpty
(
checkFundIdList
)
?
(
checkFundIdList
.
contains
(
item
.
getId
())
?
1
:
0
)
:
0
)
.
build
();
});
return
importedFundInfoList
.
stream
().
map
(
item
->
FundSameResp
.
builder
()
.
fundId
(
item
.
getId
())
.
fundName
(
item
.
getFundName
())
.
isCheck
(
CollectionUtils
.
isNotEmpty
(
checkFundIdList
)
?
(
checkFundIdList
.
contains
(
item
.
getId
())
?
1
:
0
)
:
0
)
.
build
()).
collect
(
Collectors
.
toList
());
}
return
new
ArrayList
<>(
0
);
}
...
...
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