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
006dc1a5
Commit
006dc1a5
authored
Nov 29, 2021
by
张亚辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分红处理
parent
dcc9bbad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
ProductOrderServiceImpl.java
.../com/tanpu/fund/service/impl/ProductOrderServiceImpl.java
+6
-5
application-test.properties
src/main/resources/application-test.properties
+2
-2
No files found.
src/main/java/com/tanpu/fund/service/impl/ProductOrderServiceImpl.java
View file @
006dc1a5
...
@@ -133,15 +133,16 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
...
@@ -133,15 +133,16 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
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
<>();
final
List
<
TxFundDistribution
>
distributionList
=
this
.
txFundDistributionMapper
final
List
<
TxFundDistribution
>
distributionList
=
this
.
txFundDistributionMapper
.
selectList
(
queryWrapper
.
ge
(
TxFundDistribution:
:
getRegisterDate
,
date
)
.
selectList
(
queryWrapper
.
ge
(
TxFundDistribution:
:
getExDate
,
date
)
.
in
(
TxFundDistribution:
:
getFundCode
,
list
).
eq
(
TxFundDistribution:
:
getDeleteTag
,
BizEnums
.
DeleteTag
.
tag_init
));
.
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
()))
.
andPriceDateIn
(
distributionList
.
stream
().
map
(
TxFundDistribution:
:
get
Register
Date
).
collect
(
Collectors
.
toList
()))
.
andPriceDateIn
(
distributionList
.
stream
().
map
(
TxFundDistribution:
:
get
Ex
Date
).
collect
(
Collectors
.
toList
()))
.
andDeleteTagEqualTo
(
BizEnums
.
DeleteTag
.
tag_init
);
.
andDeleteTagEqualTo
(
BizEnums
.
DeleteTag
.
tag_init
);
final
Map
<
String
,
List
<
TxFundNav
>>
txFundNavMap
=
this
.
txFundNavMapper
.
selectByExample
(
fundNavExample
)
final
Map
<
String
,
List
<
TxFundNav
>>
txFundNavMap
=
this
.
txFundNavMapper
.
selectByExample
(
fundNavExample
)
.
stream
().
collect
(
Collectors
.
groupingBy
(
TxFundNav:
:
getFundId
));
.
stream
().
collect
(
Collectors
.
groupingBy
(
TxFundNav:
:
getFundId
));
...
@@ -150,14 +151,14 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
...
@@ -150,14 +151,14 @@ public class ProductOrderServiceImpl implements ProductOrderService, Constant {
final
FundBounsResp
build
=
FundBounsResp
.
builder
()
final
FundBounsResp
build
=
FundBounsResp
.
builder
()
.
fundId
(
c
.
getFundId
())
.
fundId
(
c
.
getFundId
())
.
fundCode
(
c
.
getFundCode
())
.
fundCode
(
c
.
getFundCode
())
.
registerDate
(
c
.
getRegister
Date
())
.
exDate
(
c
.
getEx
Date
())
.
distributeDate
(
c
.
getDistributeDate
())
.
distributeDate
(
c
.
getDistributeDate
())
.
distribution
(
c
.
getDistribution
())
.
distribution
(
c
.
getDistribution
())
.
build
();
.
build
();
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
.
get
Register
Date
().
getTime
()
==
nav
.
getPriceDate
().
getTime
()).
findFirst
().
get
();
&&
c
.
get
Ex
Date
().
getTime
()
==
nav
.
getPriceDate
().
getTime
()).
findFirst
().
get
();
build
.
setFundNet
(
txFundNav
.
getNav
());
build
.
setFundNet
(
txFundNav
.
getNav
());
return
build
;
return
build
;
...
...
src/main/resources/application-test.properties
View file @
006dc1a5
...
@@ -10,8 +10,8 @@ management.endpoints.web.base-path = /myhealth
...
@@ -10,8 +10,8 @@ management.endpoints.web.base-path = /myhealth
management.endpoint.health.enabled
=
true
management.endpoint.health.enabled
=
true
management.endpoint.health.show-details
=
always
management.endpoint.health.show-details
=
always
spring.datasource.url
=
jdbc:mysql://
rm-uf6r22t3d798q4kmkao.mysql
.rds.aliyuncs.com:3306/tamp_fund?autoReconnect=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false
spring.datasource.url
=
jdbc:mysql://
tamper.mysql.polardb
.rds.aliyuncs.com:3306/tamp_fund?autoReconnect=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false
spring.datasource.username
=
tamp
_admin
spring.datasource.username
=
tamp
spring.datasource.password
=
@imeng123
spring.datasource.password
=
@imeng123
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
...
...
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