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
490ff777
Commit
490ff777
authored
Feb 06, 2021
by
zp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of 47.100.44.39:zhoupeng/tamp_fund into dev
parents
b3202932
4c802a4b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
1 deletion
+57
-1
ProductApi.java
src/main/java/com/tanpu/fund/api/ProductApi.java
+9
-0
ProductController.java
...ain/java/com/tanpu/fund/controller/ProductController.java
+10
-0
ProductService.java
src/main/java/com/tanpu/fund/service/ProductService.java
+5
-0
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+33
-1
No files found.
src/main/java/com/tanpu/fund/api/ProductApi.java
View file @
490ff777
...
...
@@ -4,6 +4,7 @@ import com.tanpu.common.model.Page;
import
com.tanpu.common.model.Pageable
;
import
com.tanpu.common.model.product.req.ProductListReq
;
import
com.tanpu.common.model.product.resp.DynamicRetreatVO
;
import
com.tanpu.common.model.product.resp.FundInfoSimpleListResp
;
import
com.tanpu.common.model.product.resp.ProductInfoVO
;
import
com.tanpu.common.resp.CommonResp
;
import
com.tanpu.fund.api.model.req.NetReq
;
...
...
@@ -118,4 +119,12 @@ public interface ProductApi {
@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
<
FundInfoSimpleListResp
>>
simpleList
(
@RequestBody
List
<
String
>
idList
);
@ApiOperation
(
value
=
"根据Id查询私有产品基本信息"
)
@PostMapping
(
value
=
"/privateFundInfo/simpleList"
,
produces
=
{
"application/json"
})
CommonResp
<
List
<
FundInfoSimpleListResp
>>
privateSimpleList
(
@RequestBody
List
<
String
>
idList
);
}
src/main/java/com/tanpu/fund/controller/ProductController.java
View file @
490ff777
...
...
@@ -147,4 +147,14 @@ public class ProductController implements ProductApi {
public
CommonResp
<
List
<
ProductInfoVO
>>
getPrivateFundList
(
List
<
String
>
ids
)
{
return
CommonResp
.
success
(
this
.
productService
.
getPrivateFundList
(
ids
));
}
@Override
public
CommonResp
<
List
<
FundInfoSimpleListResp
>>
simpleList
(
List
<
String
>
idList
)
{
return
CommonResp
.
success
(
productService
.
getSimpleList
(
idList
));
}
@Override
public
CommonResp
<
List
<
FundInfoSimpleListResp
>>
privateSimpleList
(
List
<
String
>
idList
)
{
return
CommonResp
.
success
(
productService
.
getPrivateSimpleList
(
idList
));
}
}
src/main/java/com/tanpu/fund/service/ProductService.java
View file @
490ff777
...
...
@@ -4,6 +4,7 @@ import com.tanpu.common.model.Page;
import
com.tanpu.common.model.Pageable
;
import
com.tanpu.common.model.product.req.ProductListReq
;
import
com.tanpu.common.model.product.resp.DynamicRetreatVO
;
import
com.tanpu.common.model.product.resp.FundInfoSimpleListResp
;
import
com.tanpu.common.model.product.resp.ProductInfoVO
;
import
com.tanpu.fund.api.model.req.NetReq
;
import
com.tanpu.fund.api.model.req.ProductInfoReq
;
...
...
@@ -59,4 +60,8 @@ public interface ProductService {
List
<
RiskRatingVO
>
getPrivateFundRiskRating
(
String
id
);
List
<
ProductInfoVO
>
getPrivateFundList
(
List
<
String
>
ids
);
List
<
FundInfoSimpleListResp
>
getSimpleList
(
List
<
String
>
idList
);
List
<
FundInfoSimpleListResp
>
getPrivateSimpleList
(
List
<
String
>
idList
);
}
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
490ff777
...
...
@@ -10,8 +10,10 @@ import com.tanpu.common.model.Page;
import
com.tanpu.common.model.Pageable
;
import
com.tanpu.common.model.product.req.ProductListReq
;
import
com.tanpu.common.model.product.resp.DynamicRetreatVO
;
import
com.tanpu.common.model.product.resp.FundInfoSimpleListResp
;
import
com.tanpu.common.model.product.resp.Net
;
import
com.tanpu.common.model.product.resp.ProductInfoVO
;
import
com.tanpu.common.resp.CommonResp
;
import
com.tanpu.common.utils.BigDecimalUtil
;
import
com.tanpu.fund.api.model.FundInfoVO
;
import
com.tanpu.fund.api.model.req.NetReq
;
...
...
@@ -1411,7 +1413,7 @@ public class ProductServiceImpl implements ProductService, Constant {
if
(
CollectionUtils
.
isNotEmpty
(
fundInfoList
))
{
return
fundInfoList
.
stream
().
map
(
item
->
{
IfaImportedFundCount
importedFundCount
=
null
;
if
(
fundCountMap
.
containsKey
(
item
.
getId
()))
{
if
(
fundCountMap
!=
null
&&
fundCountMap
.
containsKey
(
item
.
getId
()))
{
importedFundCount
=
fundCountMap
.
get
(
item
.
getId
());
}
...
...
@@ -1431,6 +1433,36 @@ public class ProductServiceImpl implements ProductService, Constant {
return
new
ArrayList
<>();
}
@Override
public
List
<
FundInfoSimpleListResp
>
getSimpleList
(
List
<
String
>
idList
)
{
if
(
CollectionUtils
.
isEmpty
(
idList
))
{
return
Lists
.
newArrayListWithCapacity
(
0
);
}
FundInfoExample
example
=
new
FundInfoExample
();
example
.
createCriteria
().
andIdIn
(
idList
);
List
<
FundInfo
>
fundInfoList
=
fundInfoMapper
.
selectByExample
(
example
);
return
fundInfoList
.
stream
().
map
(
fundInfo
->
FundInfoSimpleListResp
.
builder
()
.
id
(
fundInfo
.
getId
())
.
fundName
(
fundInfo
.
getFundName
())
.
fundShortName
(
fundInfo
.
getFundShortName
())
.
build
()).
collect
(
Collectors
.
toList
());
}
@Override
public
List
<
FundInfoSimpleListResp
>
getPrivateSimpleList
(
List
<
String
>
idList
)
{
if
(
CollectionUtils
.
isEmpty
(
idList
))
{
return
Lists
.
newArrayListWithCapacity
(
0
);
}
IfaImportedFundInfoExample
example
=
new
IfaImportedFundInfoExample
();
example
.
createCriteria
().
andIdIn
(
idList
);
List
<
IfaImportedFundInfo
>
ifaImportedFundInfoList
=
ifaImportedFundInfoMapper
.
selectByExample
(
example
);
return
ifaImportedFundInfoList
.
stream
().
map
(
fundInfo
->
FundInfoSimpleListResp
.
builder
()
.
id
(
fundInfo
.
getId
())
.
fundName
(
fundInfo
.
getFundName
())
.
fundShortName
(
fundInfo
.
getFundName
())
.
build
())
.
collect
(
Collectors
.
toList
());
}
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