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
cba329f9
Commit
cba329f9
authored
Feb 24, 2021
by
张亚辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基金详情
parent
88db936d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
14 deletions
+18
-14
ProductApi.java
src/main/java/com/tanpu/fund/api/ProductApi.java
+1
-1
ProductController.java
...ain/java/com/tanpu/fund/controller/ProductController.java
+1
-1
ProductService.java
src/main/java/com/tanpu/fund/service/ProductService.java
+1
-1
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+15
-11
No files found.
src/main/java/com/tanpu/fund/api/ProductApi.java
View file @
cba329f9
...
...
@@ -103,7 +103,7 @@ public interface ProductApi {
@ApiOperation
(
"私有基金详情"
)
@GetMapping
(
"/privatefund/detail"
)
CommonResp
<
Pr
ivateFundDetailResp
>
getPrivateDetail
(
@RequestParam
(
"id"
)
String
id
);
CommonResp
<
Pr
oductInfoVO
>
getPrivateDetail
(
@RequestParam
(
"id"
)
String
id
);
@ApiOperation
(
"私有基金历史业绩"
)
@GetMapping
(
"/privatefund/historyprofit"
)
...
...
src/main/java/com/tanpu/fund/controller/ProductController.java
View file @
cba329f9
...
...
@@ -119,7 +119,7 @@ public class ProductController implements ProductApi {
}
@Override
public
CommonResp
<
Pr
ivateFundDetailResp
>
getPrivateDetail
(
String
id
)
{
public
CommonResp
<
Pr
oductInfoVO
>
getPrivateDetail
(
String
id
)
{
if
(
StringUtils
.
isEmpty
(
id
))
{
return
CommonResp
.
error
(
CommonResp
.
PARAMETER_INVALID_STATUS_CODE
,
CommonResp
.
PARAMETER_INVALID_MESSAGE
);
}
...
...
src/main/java/com/tanpu/fund/service/ProductService.java
View file @
cba329f9
...
...
@@ -51,7 +51,7 @@ public interface ProductService {
DynamicRetreatVO
getDynamicRetreat
(
String
id
);
Pr
ivateFundDetailResp
getPrivateDetail
(
String
id
);
Pr
oductInfoVO
getPrivateDetail
(
String
id
);
List
<
TrackRecordVO
>
getHistoryprofit
(
String
id
);
...
...
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
cba329f9
...
...
@@ -178,9 +178,6 @@ public class ProductServiceImpl implements ProductService, Constant {
vo
.
setManagerName
(
fundManagerVO
.
getManagerName
());
}
//TODO zhoupeng 查询基金是否加自选 isCheck
// vo.setIsCheck();
return
vo
;
}
...
...
@@ -1333,7 +1330,7 @@ public class ProductServiceImpl implements ProductService, Constant {
}
@Override
public
Pr
ivateFundDetailResp
getPrivateDetail
(
String
id
)
{
public
Pr
oductInfoVO
getPrivateDetail
(
String
id
)
{
IfaImportedFundInfo
fundInfo
=
ifaImportedFundInfoMapper
.
selectByPrimaryKey
(
id
);
//查询收益率
...
...
@@ -1341,18 +1338,27 @@ public class ProductServiceImpl implements ProductService, Constant {
example
.
createCriteria
().
andFundIdEqualTo
(
id
).
andDeleteTagEqualTo
(
BizEnums
.
DeleteTag
.
tag_init
);
List
<
IfaImportedFundCount
>
fundCountList
=
ifaImportedFundCountMapper
.
selectByExample
(
example
);
Pr
ivateFundDetailResp
detailResp
=
PrivateFundDetailResp
.
builder
()
.
fundId
(
fundInfo
.
getId
())
.
fundName
(
fundInfo
.
getFundName
())
.
registerNumber
(
fundInfo
.
getRegisterNumber
())
.
build
(
);
Pr
oductInfoVO
detailResp
=
new
ProductInfoVO
();
detailResp
.
setFundId
(
fundInfo
.
getId
());
detailResp
.
setFundName
(
fundInfo
.
getFundName
());
detailResp
.
setProductName
(
fundInfo
.
getFundName
());
detailResp
.
setRegisterNumber
(
fundInfo
.
getRegisterNumber
()
);
if
(
CollectionUtils
.
isNotEmpty
(
fundCountList
))
{
detailResp
.
setNear1YearProfit
(
BigDecimalUtil
.
toString
(
fundCountList
.
get
(
0
).
getRet1y
(),
2
));
detailResp
.
setRet1y
(
BigDecimalUtil
.
toString
(
fundCountList
.
get
(
0
).
getRet1y
(),
2
));
detailResp
.
setNet
(
Net
.
builder
().
netDate
(
fundCountList
.
get
(
0
).
getPriceDate
().
getTime
())
.
netValue
(
BigDecimalUtil
.
toString
(
fundCountList
.
get
(
0
).
getNetNav
())).
build
());
}
detailResp
.
setInceptionDate
(
fundInfo
.
getInceptionDate
()
!=
null
?
fundInfo
.
getInceptionDate
().
getTime
()
:
null
);
List
<
FundManagerVO
>
fundManagerVOList
=
this
.
getFundManager
(
id
);
if
(
CollectionUtils
.
isNotEmpty
(
fundManagerVOList
))
{
FundManagerVO
fundManagerVO
=
fundManagerVOList
.
get
(
0
);
detailResp
.
setManagerId
(
fundManagerVO
.
getManagerId
());
detailResp
.
setManagerName
(
fundManagerVO
.
getManagerName
());
}
return
detailResp
;
}
...
...
@@ -1517,12 +1523,10 @@ public class ProductServiceImpl implements ProductService, Constant {
infoExample
.
createCriteria
().
andIdIn
(
fundIdList
);
Map
<
String
,
String
>
fundMap
=
fundInfoMapper
.
selectByExample
(
infoExample
).
stream
().
collect
(
Collectors
.
toMap
(
FundInfo:
:
getId
,
FundInfo:
:
getFundShortName
));
//TODO zhoupeng 查询基金是否加自选 isCheck
return
fundCounts
.
stream
().
map
(
item
->
FundSameResp
.
builder
()
.
fundId
(
item
.
getFundId
())
.
fundName
(
fundMap
.
get
(
item
.
getFundId
()))
.
ret1y
(
BigDecimalUtil
.
toString
(
item
.
getRet1y
(),
2
))
// .isCheck()
.
build
()).
collect
(
Collectors
.
toList
());
}
...
...
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