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
fc041c2d
Commit
fc041c2d
authored
Feb 24, 2021
by
张亚辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基金详情
parent
cba329f9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
17 deletions
+61
-17
ProductApi.java
src/main/java/com/tanpu/fund/api/ProductApi.java
+15
-9
ProductController.java
...ain/java/com/tanpu/fund/controller/ProductController.java
+7
-0
ProductService.java
src/main/java/com/tanpu/fund/service/ProductService.java
+2
-0
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+37
-8
No files found.
src/main/java/com/tanpu/fund/api/ProductApi.java
View file @
fc041c2d
...
...
@@ -101,33 +101,39 @@ public interface ProductApi {
@GetMapping
(
"/dynamic/retreat"
)
CommonResp
<
DynamicRetreatVO
>
getDynamicRetreatInfo
(
@RequestParam
(
"id"
)
String
id
);
@ApiOperation
(
"私有基金详情"
)
//**********************************************************私有基金start**********************************************************
@ApiOperation
(
"私有基金详情 - 私有基金"
)
@GetMapping
(
"/privatefund/detail"
)
CommonResp
<
ProductInfoVO
>
getPrivateDetail
(
@RequestParam
(
"id"
)
String
id
);
@ApiOperation
(
"私有基金历史业绩"
)
@ApiOperation
(
"私有基金历史业绩
- 私有基金
"
)
@GetMapping
(
"/privatefund/historyprofit"
)
CommonResp
<
List
<
TrackRecordVO
>>
getHistoryprofit
(
@RequestParam
(
"id"
)
String
id
);
@ApiOperation
(
"历史净值"
)
@ApiOperation
(
"历史净值
- 私有基金
"
)
@GetMapping
(
"/privatefund/track/net"
)
CommonResp
<
Page
<
TrackNetVO
>>
getPrivateFundTrackNetListInfo
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"id"
)
String
id
,
@ApiParam
(
"分页对象"
)
Pageable
page
);
@ApiOperation
(
"风险评估"
)
@ApiOperation
(
"风险评估
- 私有基金
"
)
@GetMapping
(
"/privatefund/get/risk/rating"
)
CommonResp
<
List
<
RiskRatingVO
>>
getPrivateFundRiskRatingInfo
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"id"
)
String
id
);
@ApiOperation
(
"获取私募产品"
)
@ApiOperation
(
"获取私募产品
- 私有基金
"
)
@GetMapping
(
"/privatefund/list"
)
CommonResp
<
List
<
ProductInfoVO
>>
getPrivateFundList
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"ids"
)
List
<
String
>
ids
);
@ApiOperation
(
value
=
"根据Id查询私募产品基本信息
"
)
@
PostMapping
(
value
=
"/fundInfo/simpleList"
,
produces
=
{
"application/json"
}
)
CommonResp
<
List
<
Fund
InfoSimpleListResp
>>
simpleList
(
@RequestBody
List
<
String
>
idList
);
@ApiOperation
(
"推荐基金 - 私有基金
"
)
@
GetMapping
(
"/privatefund/list"
)
CommonResp
<
List
<
Fund
SameResp
>>
getRemmendPrivateFundList
(
);
@ApiOperation
(
value
=
"根据Id查询私有产品基本信息"
)
@ApiOperation
(
value
=
"根据Id查询私有产品基本信息
- 私有基金
"
)
@PostMapping
(
value
=
"/privateFundInfo/simpleList"
,
produces
=
{
"application/json"
})
CommonResp
<
List
<
FundInfoSimpleListResp
>>
privateSimpleList
(
@RequestBody
List
<
String
>
idList
);
//**********************************************************私有基金 end**********************************************************
@ApiOperation
(
value
=
"根据Id查询私募产品基本信息"
)
@PostMapping
(
value
=
"/fundInfo/simpleList"
,
produces
=
{
"application/json"
})
CommonResp
<
List
<
FundInfoSimpleListResp
>>
simpleList
(
@RequestBody
List
<
String
>
idList
);
@ApiOperation
(
"对比指数"
)
@GetMapping
(
"/fund/indexes"
)
...
...
src/main/java/com/tanpu/fund/controller/ProductController.java
View file @
fc041c2d
package
com
.
tanpu
.
fund
.
controller
;
import
com.tanpu.common.auth.mapping.TanpuInterfaceLoginAuth
;
import
com.tanpu.common.model.Page
;
import
com.tanpu.common.model.Pageable
;
import
com.tanpu.common.model.product.req.NetReq
;
...
...
@@ -155,6 +156,12 @@ public class ProductController implements ProductApi {
return
CommonResp
.
success
(
this
.
productService
.
getPrivateFundList
(
ids
));
}
@TanpuInterfaceLoginAuth
@Override
public
CommonResp
<
List
<
FundSameResp
>>
getRemmendPrivateFundList
()
{
return
CommonResp
.
success
(
this
.
productService
.
getRemmendPrivateFundList
());
}
@Override
public
CommonResp
<
List
<
FundInfoSimpleListResp
>>
simpleList
(
List
<
String
>
idList
)
{
return
CommonResp
.
success
(
productService
.
getSimpleList
(
idList
));
...
...
src/main/java/com/tanpu/fund/service/ProductService.java
View file @
fc041c2d
...
...
@@ -66,4 +66,6 @@ public interface ProductService {
List
<
FundInfoSimpleListResp
>
getPrivateSimpleList
(
List
<
String
>
idList
);
List
<
FundSameResp
>
querySamefund
(
String
fundId
);
List
<
FundSameResp
>
getRemmendPrivateFundList
();
}
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
fc041c2d
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DatePattern;
import
cn.hutool.core.date.DateUtil
;
import
com.github.pagehelper.page.PageMethod
;
import
com.google.common.collect.Lists
;
import
com.tanpu.common.auth.UserInfoThreadLocalHolder
;
import
com.tanpu.common.enums.BizEnums
;
import
com.tanpu.common.enums.Constant
;
import
com.tanpu.common.model.Page
;
...
...
@@ -1347,18 +1348,11 @@ public class ProductServiceImpl implements ProductService, Constant {
if
(
CollectionUtils
.
isNotEmpty
(
fundCountList
))
{
detailResp
.
setNear1YearProfit
(
BigDecimalUtil
.
toString
(
fundCountList
.
get
(
0
).
getRet1y
(),
2
));
detailResp
.
setRet1y
(
BigDecimalUtil
.
toString
(
fundCountList
.
get
(
0
).
getRet1y
(),
2
));
detailResp
.
setRetYtd
(
BigDecimalUtil
.
toString
(
fundCountList
.
get
(
0
).
getRetYtd
(),
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
;
}
...
...
@@ -1533,6 +1527,41 @@ public class ProductServiceImpl implements ProductService, Constant {
return
null
;
}
@Override
public
List
<
FundSameResp
>
getRemmendPrivateFundList
()
{
IfaImportedFundInfoExample
example
=
new
IfaImportedFundInfoExample
();
example
.
createCriteria
().
andIfaIdEqualTo
(
UserInfoThreadLocalHolder
.
getserInfo
().
getId
()).
andDeleteTagEqualTo
(
BizEnums
.
DeleteTag
.
tag_init
);
List
<
IfaImportedFundInfo
>
importedFundInfoList
=
ifaImportedFundInfoMapper
.
selectByExample
(
example
);
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
);
Map
<
String
,
IfaImportedFundCount
>
fundCountMap
;
if
(
CollectionUtils
.
isNotEmpty
(
importedFundCountList
))
{
fundCountMap
=
importedFundCountList
.
stream
().
collect
(
Collectors
.
toMap
(
IfaImportedFundCount:
:
getFundId
,
c
->
c
));
}
else
{
fundCountMap
=
null
;
}
importedFundInfoList
.
stream
().
map
(
item
->
{
FundSameResp
p
=
FundSameResp
.
builder
()
.
fundId
(
item
.
getId
())
.
fundName
(
item
.
getFundName
())
.
build
();
if
(
fundCountMap
!=
null
&&
fundCountMap
.
containsKey
(
item
.
getId
()))
{
p
.
setRet1y
(
BigDecimalUtil
.
toString
(
fundCountMap
.
get
(
item
.
getId
()).
getRet1y
(),
2
));
}
return
p
;
}).
collect
(
Collectors
.
toList
());
return
null
;
}
private
ArrayList
<
TrackRecordVO
>
getPrivateFundTrackRecordVOS
(
IfaImportedFundCount
fundCount
)
{
return
Lists
.
newArrayList
(
new
TrackRecordVO
(
"近三个月"
,
multiply100
(
fundCount
.
getRet3m
()),
multiply100
(
fundCount
.
getRet3mBm1
())),
...
...
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