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
bbc90cc9
Commit
bbc90cc9
authored
3 years ago
by
张亚辉
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into dev
parents
7fde136c
2adf19c0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
9 deletions
+21
-9
ProductOrderApi.java
src/main/java/com/tanpu/fund/api/ProductOrderApi.java
+2
-2
ProductOrderController.java
...ava/com/tanpu/fund/controller/ProductOrderController.java
+1
-1
ProductOrderServiceImpl.java
.../com/tanpu/fund/service/impl/ProductOrderServiceImpl.java
+18
-6
No files found.
src/main/java/com/tanpu/fund/api/ProductOrderApi.java
View file @
bbc90cc9
...
...
@@ -30,7 +30,7 @@ public interface ProductOrderApi {
@ApiOperation
(
"查询基金分红信息"
)
@GetMapping
(
"/get/fund/bounsinfo"
)
CommonResp
<
List
<
FundBounsResp
>>
getFundBounsinfo
(
@ApiParam
(
"基金代码"
)
@RequestParam
(
"list"
)
List
<
String
>
list
,
@ApiParam
(
"
指定日期
"
)
@RequestParam
(
"date"
)
String
date
);
CommonResp
<
List
<
FundBounsResp
>>
getFundBounsinfo
(
@ApiParam
(
"基金代码"
)
@RequestParam
(
value
=
"list"
,
required
=
false
)
List
<
String
>
list
,
@ApiParam
(
"
分红除息日
"
)
@RequestParam
(
"date"
)
String
date
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/tanpu/fund/controller/ProductOrderController.java
View file @
bbc90cc9
...
...
@@ -44,7 +44,7 @@ public class ProductOrderController implements ProductOrderApi {
@Override
public
CommonResp
<
List
<
FundBounsResp
>>
getFundBounsinfo
(
List
<
String
>
list
,
String
date
)
{
if
(
CollectionUtils
.
isEmpty
(
list
)
||
StringUtils
.
isBlank
(
date
))
{
if
(
StringUtils
.
isBlank
(
date
))
{
return
CommonResp
.
error
(
CommonResp
.
PARAMETER_INVALID_STATUS_CODE
,
CommonResp
.
PARAMETER_INVALID_MESSAGE
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/tanpu/fund/service/impl/ProductOrderServiceImpl.java
View file @
bbc90cc9
...
...
@@ -132,13 +132,19 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
@Override
public
List
<
FundBounsResp
>
getFundBounsinfo
(
List
<
String
>
list
,
String
date
)
{
LambdaQueryWrapper
<
TxFundDistribution
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
TxFundDistribution:
:
getExDate
,
date
)
.
eq
(
TxFundDistribution:
:
getDeleteTag
,
BizEnums
.
DeleteTag
.
tag_init
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
queryWrapper
.
in
(
TxFundDistribution:
:
getFundCode
,
list
);
}
final
List
<
TxFundDistribution
>
distributionList
=
this
.
txFundDistributionMapper
.
selectList
(
queryWrapper
.
ge
(
TxFundDistribution:
:
getExDate
,
date
)
.
in
(
TxFundDistribution:
:
getFundCode
,
list
)
.
eq
(
TxFundDistribution:
:
getDeleteTag
,
BizEnums
.
DeleteTag
.
tag_init
));
.
selectList
(
queryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
distributionList
))
{
// 查询分红
权益
日内基金净值
// 查询分红
除息
日内基金净值
TxFundNavExample
fundNavExample
=
new
TxFundNavExample
();
fundNavExample
.
createCriteria
()
.
andFundIdIn
(
distributionList
.
stream
().
map
(
c
->
String
.
valueOf
(
c
.
getFundId
())).
collect
(
Collectors
.
toList
()))
...
...
@@ -148,6 +154,9 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
.
stream
().
collect
(
Collectors
.
groupingBy
(
TxFundNav:
:
getFundId
));
return
distributionList
.
stream
().
map
(
c
->
{
if
(!
txFundNavMap
.
containsKey
(
String
.
valueOf
(
c
.
getFundId
())))
{
return
null
;
}
final
FundBounsResp
build
=
FundBounsResp
.
builder
()
.
fundId
(
c
.
getFundId
())
.
fundCode
(
c
.
getFundCode
())
...
...
@@ -158,11 +167,14 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
final
TxFundNav
txFundNav
=
txFundNavMap
.
get
(
String
.
valueOf
(
c
.
getFundId
())).
stream
()
.
filter
(
nav
->
StringUtils
.
equals
(
String
.
valueOf
(
c
.
getFundId
()),
nav
.
getFundId
())
&&
c
.
getExDate
().
getTime
()
==
nav
.
getPriceDate
().
getTime
()).
findFirst
().
get
();
&&
c
.
getExDate
().
getTime
()
==
nav
.
getPriceDate
().
getTime
()).
findFirst
().
orElse
(
null
);
if
(
txFundNav
==
null
)
{
return
null
;
}
build
.
setFundNet
(
txFundNav
.
getNav
());
return
build
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
())
.
stream
().
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
())
;
}
return
new
ArrayList
<>(
0
);
...
...
This diff is collapsed.
Click to expand it.
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