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
ccb60006
Commit
ccb60006
authored
Feb 26, 2021
by
zp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v1.2.0' of 47.100.44.39:zhoupeng/tamp_fund into v1.2.0
parents
13e85afc
a72d888d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
24 deletions
+13
-24
ProductApi.java
src/main/java/com/tanpu/fund/api/ProductApi.java
+0
-8
ProductController.java
...ain/java/com/tanpu/fund/controller/ProductController.java
+0
-11
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+13
-5
No files found.
src/main/java/com/tanpu/fund/api/ProductApi.java
View file @
ccb60006
...
...
@@ -30,10 +30,6 @@ public interface ProductApi {
@PostMapping
(
"/get/product/info"
)
CommonResp
<
Page
<
ProductInfoVO
>>
getProductInfo
(
@ApiParam
(
"筛选条件对象"
)
@RequestBody
ProductInfoReq
req
);
@ApiOperation
(
"根据条件获取非探普产品信息"
)
@PostMapping
(
"/not/tanpu/product/info"
)
CommonResp
<
Page
<
ProductInfoVO
>>
getNotTanpuProductInfo
(
@ApiParam
(
"筛选条件对象"
)
@RequestBody
ProductInfoReq
req
);
@ApiOperation
(
"获取产品详情"
)
@GetMapping
(
"/product/detail"
)
CommonResp
<
ProductInfoVO
>
getProductDetailInfo
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"id"
)
String
id
);
...
...
@@ -95,10 +91,6 @@ public interface ProductApi {
@PostMapping
(
"/get/product/list"
)
CommonResp
<
List
<
ProductInfoVO
>>
getProductInfolist
(
@ApiParam
(
"筛选条件对象"
)
@RequestBody
ProductListReq
req
);
@ApiOperation
(
"根据条件获取非探普产品信息"
)
@PostMapping
(
"/not/tanpu/product/list"
)
CommonResp
<
List
<
ProductInfoVO
>>
getNotTanpuProductInfolist
(
@ApiParam
(
"筛选条件对象"
)
@RequestBody
ProductListReq
req
);
@ApiOperation
(
"动态回撤"
)
@GetMapping
(
"/dynamic/retreat"
)
CommonResp
<
DynamicRetreatVO
>
getDynamicRetreatInfo
(
@RequestParam
(
"id"
)
String
id
);
...
...
src/main/java/com/tanpu/fund/controller/ProductController.java
View file @
ccb60006
...
...
@@ -38,11 +38,6 @@ public class ProductController implements ProductApi {
return
CommonResp
.
success
(
this
.
productService
.
getProductList
(
req
));
}
@Override
public
CommonResp
<
Page
<
ProductInfoVO
>>
getNotTanpuProductInfo
(
ProductInfoReq
req
)
{
return
CommonResp
.
success
(
this
.
productService
.
getNotTanpuProduct
(
req
));
}
@Override
public
CommonResp
<
ProductInfoVO
>
getProductDetailInfo
(
String
id
)
{
return
CommonResp
.
success
(
this
.
productService
.
getProductDetail
(
id
));
...
...
@@ -114,12 +109,6 @@ public class ProductController implements ProductApi {
return
CommonResp
.
success
(
productInfolist
);
}
@Override
public
CommonResp
<
List
<
ProductInfoVO
>>
getNotTanpuProductInfolist
(
ProductListReq
req
)
{
List
<
ProductInfoVO
>
notTanpuProductInfolist
=
this
.
productService
.
getNotTanpuProductInfolist
(
req
);
return
CommonResp
.
success
(
notTanpuProductInfolist
);
}
@Override
public
CommonResp
<
DynamicRetreatVO
>
getDynamicRetreatInfo
(
String
id
)
{
return
CommonResp
.
success
(
this
.
productService
.
getDynamicRetreat
(
id
));
...
...
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
ccb60006
...
...
@@ -119,7 +119,7 @@ public class ProductServiceImpl implements ProductService, Constant {
List
<
ProductInfoVO
>
vos
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
vos
=
getProductInfoVOS
(
fundCounts
,
list
);
vos
=
getProductInfoVOS
(
fundCounts
,
list
,
1
);
}
return
new
Page
<>(
req
.
getPage
(),
page
.
getTotal
(),
vos
);
...
...
@@ -201,6 +201,8 @@ public class ProductServiceImpl implements ProductService, Constant {
}
}
vo
.
setProductType
(
Constant
.
ONE_NUM
);
return
vo
;
}
...
...
@@ -238,6 +240,7 @@ public class ProductServiceImpl implements ProductService, Constant {
vo
.
setFundId
(
info
.
getId
());
// 最新净值
vo
.
setNet
(
getNewNet
(
info
.
getId
()));
vo
.
setProductType
(
Constant
.
ONE_NUM
);
vos
.
add
(
vo
);
});
...
...
@@ -996,7 +999,7 @@ public class ProductServiceImpl implements ProductService, Constant {
List
<
ProductInfoVO
>
vos
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
vos
=
getProductInfoVOS
(
fundCounts
,
list
);
vos
=
getProductInfoVOS
(
fundCounts
,
list
,
1
);
}
return
vos
;
...
...
@@ -1133,7 +1136,7 @@ public class ProductServiceImpl implements ProductService, Constant {
}).
collect
(
Collectors
.
toList
());
}
private
List
<
ProductInfoVO
>
getProductInfoVOS
(
List
<
FundCount
>
fundCounts
,
List
<
String
>
list
)
{
private
List
<
ProductInfoVO
>
getProductInfoVOS
(
List
<
FundCount
>
fundCounts
,
List
<
String
>
list
,
Integer
productType
)
{
FundInfoExample
example
=
new
FundInfoExample
();
example
.
createCriteria
().
andIdIn
(
list
).
andDeleteTagEqualTo
(
ZERO_NUM
);
...
...
@@ -1152,7 +1155,7 @@ public class ProductServiceImpl implements ProductService, Constant {
// 查询研报信息是否有研报
Map
<
String
,
Object
>
fundInfoReport
=
getFundReport
(
Lists
.
newArrayList
(
fundInfoMap
.
keySet
()));
return
fundCounts
.
stream
().
map
(
p
->
getProductInfoVO
(
fundInfoMap
,
rateMappingMap
,
p
,
fundInfoReport
.
keySet
()))
return
fundCounts
.
stream
().
map
(
p
->
getProductInfoVO
(
fundInfoMap
,
rateMappingMap
,
p
,
fundInfoReport
.
keySet
()
,
productType
))
.
collect
(
Collectors
.
toList
());
}
...
...
@@ -1163,9 +1166,10 @@ public class ProductServiceImpl implements ProductService, Constant {
private
ProductInfoVO
getProductInfoVO
(
Map
<
String
,
FundInfo
>
fundInfoMap
,
Map
<
String
,
FundRateMapping
>
rateMappingMap
,
FundCount
fundCount
,
Set
<
String
>
fundInfoReports
)
{
Set
<
String
>
fundInfoReports
,
Integer
productType
)
{
ProductInfoVO
vo
=
new
ProductInfoVO
();
BeanUtils
.
copyProperties
(
fundCount
,
vo
);
vo
.
setProductType
(
productType
);
vo
.
setRet1m
(
multiply100
(
fundCount
.
getRet1m
()));
vo
.
setRet1y
(
multiply100
(
fundCount
.
getRet1y
()));
String
fundId
=
fundCount
.
getFundId
();
...
...
@@ -1387,6 +1391,8 @@ public class ProductServiceImpl implements ProductService, Constant {
}
}
detailResp
.
setProductType
(
Constant
.
THREE_NUM
);
return
detailResp
;
}
...
...
@@ -1494,6 +1500,8 @@ public class ProductServiceImpl implements ProductService, Constant {
p
.
setNet
(
importedFundCount
==
null
?
null
:
Net
.
builder
().
netDate
(
importedFundCount
.
getPriceDate
().
getTime
())
.
netValue
(
BigDecimalUtil
.
toString
(
importedFundCount
.
getNetNav
(),
4
))
.
build
());
p
.
setProductType
(
Constant
.
THREE_NUM
);
return
p
;
}).
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