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
Dec 16, 2021
by
张亚辉
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into dev
parents
7fde136c
2adf19c0
Hide 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 {
...
@@ -30,7 +30,7 @@ public interface ProductOrderApi {
@ApiOperation
(
"查询基金分红信息"
)
@ApiOperation
(
"查询基金分红信息"
)
@GetMapping
(
"/get/fund/bounsinfo"
)
@GetMapping
(
"/get/fund/bounsinfo"
)
CommonResp
<
List
<
FundBounsResp
>>
getFundBounsinfo
(
@ApiParam
(
"基金代码"
)
@RequestParam
(
"list"
)
List
<
String
>
list
,
CommonResp
<
List
<
FundBounsResp
>>
getFundBounsinfo
(
@ApiParam
(
"基金代码"
)
@RequestParam
(
value
=
"list"
,
required
=
false
)
List
<
String
>
list
,
@ApiParam
(
"
指定日期
"
)
@RequestParam
(
"date"
)
String
date
);
@ApiParam
(
"
分红除息日
"
)
@RequestParam
(
"date"
)
String
date
);
}
}
src/main/java/com/tanpu/fund/controller/ProductOrderController.java
View file @
bbc90cc9
...
@@ -44,7 +44,7 @@ public class ProductOrderController implements ProductOrderApi {
...
@@ -44,7 +44,7 @@ public class ProductOrderController implements ProductOrderApi {
@Override
@Override
public
CommonResp
<
List
<
FundBounsResp
>>
getFundBounsinfo
(
List
<
String
>
list
,
String
date
)
{
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
);
return
CommonResp
.
error
(
CommonResp
.
PARAMETER_INVALID_STATUS_CODE
,
CommonResp
.
PARAMETER_INVALID_MESSAGE
);
}
}
...
...
src/main/java/com/tanpu/fund/service/impl/ProductOrderServiceImpl.java
View file @
bbc90cc9
...
@@ -132,13 +132,19 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
...
@@ -132,13 +132,19 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
@Override
@Override
public
List
<
FundBounsResp
>
getFundBounsinfo
(
List
<
String
>
list
,
String
date
)
{
public
List
<
FundBounsResp
>
getFundBounsinfo
(
List
<
String
>
list
,
String
date
)
{
LambdaQueryWrapper
<
TxFundDistribution
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
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
final
List
<
TxFundDistribution
>
distributionList
=
this
.
txFundDistributionMapper
.
selectList
(
queryWrapper
.
ge
(
TxFundDistribution:
:
getExDate
,
date
)
.
selectList
(
queryWrapper
);
.
in
(
TxFundDistribution:
:
getFundCode
,
list
)
.
eq
(
TxFundDistribution:
:
getDeleteTag
,
BizEnums
.
DeleteTag
.
tag_init
));
if
(
CollectionUtils
.
isNotEmpty
(
distributionList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
distributionList
))
{
// 查询分红
权益
日内基金净值
// 查询分红
除息
日内基金净值
TxFundNavExample
fundNavExample
=
new
TxFundNavExample
();
TxFundNavExample
fundNavExample
=
new
TxFundNavExample
();
fundNavExample
.
createCriteria
()
fundNavExample
.
createCriteria
()
.
andFundIdIn
(
distributionList
.
stream
().
map
(
c
->
String
.
valueOf
(
c
.
getFundId
())).
collect
(
Collectors
.
toList
()))
.
andFundIdIn
(
distributionList
.
stream
().
map
(
c
->
String
.
valueOf
(
c
.
getFundId
())).
collect
(
Collectors
.
toList
()))
...
@@ -148,6 +154,9 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
...
@@ -148,6 +154,9 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
.
stream
().
collect
(
Collectors
.
groupingBy
(
TxFundNav:
:
getFundId
));
.
stream
().
collect
(
Collectors
.
groupingBy
(
TxFundNav:
:
getFundId
));
return
distributionList
.
stream
().
map
(
c
->
{
return
distributionList
.
stream
().
map
(
c
->
{
if
(!
txFundNavMap
.
containsKey
(
String
.
valueOf
(
c
.
getFundId
())))
{
return
null
;
}
final
FundBounsResp
build
=
FundBounsResp
.
builder
()
final
FundBounsResp
build
=
FundBounsResp
.
builder
()
.
fundId
(
c
.
getFundId
())
.
fundId
(
c
.
getFundId
())
.
fundCode
(
c
.
getFundCode
())
.
fundCode
(
c
.
getFundCode
())
...
@@ -158,11 +167,14 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
...
@@ -158,11 +167,14 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
final
TxFundNav
txFundNav
=
txFundNavMap
.
get
(
String
.
valueOf
(
c
.
getFundId
())).
stream
()
final
TxFundNav
txFundNav
=
txFundNavMap
.
get
(
String
.
valueOf
(
c
.
getFundId
())).
stream
()
.
filter
(
nav
->
StringUtils
.
equals
(
String
.
valueOf
(
c
.
getFundId
()),
nav
.
getFundId
())
.
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
());
build
.
setFundNet
(
txFundNav
.
getNav
());
return
build
;
return
build
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
())
.
stream
().
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
())
;
}
}
return
new
ArrayList
<>(
0
);
return
new
ArrayList
<>(
0
);
...
...
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