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
eb99aa0e
Commit
eb99aa0e
authored
Mar 04, 2021
by
zp
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/v1.2.0' into dev
parents
d27b8c97
3d07337d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
17 deletions
+26
-17
ProductPrivateServiceImpl.java
...om/tanpu/fund/service/impl/ProductPrivateServiceImpl.java
+6
-2
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+17
-12
application-dev.properties
src/main/resources/application-dev.properties
+3
-3
No files found.
src/main/java/com/tanpu/fund/service/impl/ProductPrivateServiceImpl.java
View file @
eb99aa0e
...
...
@@ -172,6 +172,8 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
List
<
String
>
fundIds
=
managerMappings
.
stream
().
map
(
FundManagerMapping:
:
getFundId
).
distinct
()
.
collect
(
Collectors
.
toList
());
fundIds
.
add
(
id
);
FundCountExample
example2
=
new
FundCountExample
();
example2
.
createCriteria
()
.
andFundIdIn
(
fundIds
)
...
...
@@ -236,14 +238,15 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
vo
.
setInceptionDate
(
LongUtil
.
timeLong
(
fundInfo
.
getInceptionDate
()));
}
// 设置代表基金id 其他基金信息
getDelegateById
(
i
.
getId
(),
map
,
infoMap
,
fundCountMap
,
vo
);
getDelegateById
(
i
.
getId
(),
map
,
infoMap
,
fundCountMap
,
vo
,
isCheckSet
);
}
return
vo
;
}).
collect
(
Collectors
.
toList
());
}
private
void
getDelegateById
(
String
personalId
,
Map
<
String
,
List
<
FundManagerMapping
>>
map
,
Map
<
String
,
FundInfo
>
infoMap
,
Map
<
String
,
FundCount
>
fundCountMap
,
FundManagerVO
vo
)
{
Map
<
String
,
FundInfo
>
infoMap
,
Map
<
String
,
FundCount
>
fundCountMap
,
FundManagerVO
vo
,
Set
<
String
>
isCheckSet
)
{
if
(
CollectionUtils
.
isNotEmpty
(
map
.
get
(
personalId
)))
{
List
<
FundManagerMapping
>
mappings
=
map
.
get
(
personalId
);
...
...
@@ -266,6 +269,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
vo
.
setFundInfoVOS
(
list
.
stream
().
map
(
l
->
{
FundInfoVO
infoVO
=
new
FundInfoVO
();
String
fundId
=
l
.
getFundId
();
infoVO
.
setIsCheck
(
isCheckSet
.
contains
(
fundId
)
?
1
:
0
);
infoVO
.
setFundId
(
fundId
);
if
(
infoMap
.
get
(
fundId
)
!=
null
)
{
FundInfo
fundInfo
=
infoMap
.
get
(
fundId
);
...
...
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
eb99aa0e
...
...
@@ -580,10 +580,10 @@ public class ProductServiceImpl implements ProductService, Constant {
private
FundCountExample
getFundCountExample
(
NetReq
req
)
{
FundCountExample
example
=
new
FundCountExample
();
FundCountExample
.
Criteria
criteria
=
example
.
createCriteria
()
FundCountExample
.
Criteria
criteria
=
example
.
createCriteria
()
;
// .andStatusEqualTo(ONE_NUM).andDataSourcesEqualTo(ONE_NUM)
// .andDeleteTagEqualTo(ZERO_NUM)
.
andSubstrategyNotEqualTo
(
ProductEnums
.
FundSubStrategyEnum
.
COMBINATION
.
subStrategy
);
//
.andSubstrategyNotEqualTo(ProductEnums.FundSubStrategyEnum.COMBINATION.subStrategy);
if
(
CollectionUtils
.
isNotEmpty
(
req
.
getList
()))
{
criteria
.
andSubstrategyIn
(
req
.
getList
().
stream
().
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
()));
...
...
@@ -1010,12 +1010,12 @@ public class ProductServiceImpl implements ProductService, Constant {
// 策略集合
List
<
FundCount
>
fundCounts
=
this
.
fundCountMapper
.
selectByExample
(
reqFilterResult
(
req
));
List
<
String
>
list
=
fundCounts
.
stream
().
map
(
FundCount:
:
getFundId
).
collect
(
Collectors
.
toList
());
//
List<String> list = fundCounts.stream().map(FundCount::getFundId).collect(Collectors.toList());
List
<
ProductInfoVO
>
vos
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
vos
=
getProductInfoVOS
(
fundCounts
,
list
,
1
);
if
(
CollectionUtils
.
isNotEmpty
(
req
.
getFundIds
()
))
{
vos
=
getProductInfoVOS
(
fundCounts
,
req
.
getFundIds
()
,
1
);
}
return
vos
;
...
...
@@ -1155,9 +1155,11 @@ public class ProductServiceImpl implements ProductService, Constant {
private
List
<
ProductInfoVO
>
getProductInfoVOS
(
List
<
FundCount
>
fundCounts
,
List
<
String
>
list
,
Integer
productType
)
{
FundInfoExample
example
=
new
FundInfoExample
();
example
.
createCriteria
().
andIdIn
(
list
).
andDeleteTagEqualTo
(
ZERO_NUM
);
example
.
setOrderByClause
(
"create_time desc"
);
List
<
FundInfo
>
fundInfos
=
this
.
fundInfoMapper
.
selectByExample
(
example
);
Map
<
String
,
FundInfo
>
fundInfoMap
=
fundInfos
.
stream
().
collect
(
Collectors
.
toMap
(
FundInfo:
:
getId
,
f
->
f
));
// Map<String, FundInfo> fundInfoMap = fundInfos.stream().collect(Collectors.toMap(FundInfo::getId, f -> f));
Map
<
String
,
FundCount
>
fundCountMap
=
fundCounts
.
stream
().
collect
(
Collectors
.
toMap
(
FundCount:
:
getFundId
,
f
->
f
));
// 指数indexId
/*List<String> ls = fundInfos.stream().filter(f -> StringUtils.isNotEmpty(f.getPrimaryBenchmarkId()))
...
...
@@ -1171,7 +1173,7 @@ public class ProductServiceImpl implements ProductService, Constant {
// 查询研报信息是否有研报
// Map<String, Object> fundInfoReport = getFundReport(Lists.newArrayList(fundInfoMap.keySet()));
return
fund
Counts
.
stream
().
map
(
p
->
getProductInfoVO
(
fundInfo
Map
,
rateMappingMap
,
p
,
null
,
productType
))
return
fund
Infos
.
stream
().
map
(
p
->
getProductInfoVO
(
fundCount
Map
,
rateMappingMap
,
p
,
null
,
productType
))
.
collect
(
Collectors
.
toList
());
}
...
...
@@ -1180,11 +1182,13 @@ public class ProductServiceImpl implements ProductService, Constant {
// return fundInfoCustomMapper.getFundInfoReport(ids);
// }
private
ProductInfoVO
getProductInfoVO
(
Map
<
String
,
FundInfo
>
fund
Info
Map
,
Map
<
String
,
FundRateMapping
>
rateMappingMap
,
Fund
Count
fundCount
,
private
ProductInfoVO
getProductInfoVO
(
Map
<
String
,
FundInfo
>
fund
Count
Map
,
Map
<
String
,
FundRateMapping
>
rateMappingMap
,
Fund
Info
fundInfo
,
Set
<
String
>
fundInfoReports
,
Integer
productType
)
{
ProductInfoVO
vo
=
new
ProductInfoVO
();
BeanUtils
.
copyProperties
(
fundCount
,
vo
);
if
(
fundCountMap
.
containsKey
(
fundInfo
.
getId
()))
{
BeanUtils
.
copyProperties
(
fundCount
,
vo
);
}
vo
.
setProductType
(
productType
);
vo
.
setRet1m
(
multiply100
(
fundCount
.
getRet1m
()));
vo
.
setRet1y
(
multiply100
(
fundCount
.
getRet1y
()));
...
...
@@ -1285,7 +1289,7 @@ public class ProductServiceImpl implements ProductService, Constant {
FundCountExample
example
=
new
FundCountExample
();
FundCountExample
.
Criteria
criteria
=
example
.
createCriteria
().
andDataSourcesEqualTo
(
ONE_NUM
)
// .andStatusEqualTo(ONE_NUM)
.
andSubstrategyNotEqualTo
(
ProductEnums
.
FundSubStrategyEnum
.
COMBINATION
.
subStrategy
)
//
.andSubstrategyNotEqualTo(ProductEnums.FundSubStrategyEnum.COMBINATION.subStrategy)
.
andDeleteTagEqualTo
(
ZERO_NUM
);
if
(
CollectionUtils
.
isNotEmpty
(
req
.
getList
()))
{
...
...
@@ -1321,7 +1325,8 @@ public class ProductServiceImpl implements ProductService, Constant {
FundCountExample
example
=
new
FundCountExample
();
FundCountExample
.
Criteria
criteria
=
example
.
createCriteria
().
andDataSourcesEqualTo
(
ONE_NUM
)
// .andStatusEqualTo(ONE_NUM)
.
andSubstrategyNotEqualTo
(
ProductEnums
.
FundSubStrategyEnum
.
COMBINATION
.
subStrategy
).
andDeleteTagEqualTo
(
ZERO_NUM
);
// .andSubstrategyNotEqualTo(ProductEnums.FundSubStrategyEnum.COMBINATION.subStrategy)
.
andDeleteTagEqualTo
(
ZERO_NUM
);
if
(!
CollectionUtils
.
isEmpty
(
req
.
getFundIds
()))
{
criteria
.
andFundIdIn
(
req
.
getFundIds
());
...
...
src/main/resources/application-dev.properties
View file @
eb99aa0e
...
...
@@ -10,9 +10,9 @@ management.endpoints.web.base-path = /myhealth
management.endpoint.health.enabled
=
true
management.endpoint.health.show-details
=
always
spring.datasource.url
=
jdbc:mysql://
47.101.189.151:31931
/tamp_fund?autoReconnect=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false
spring.datasource.username
=
dev
spring.datasource.password
=
q
imeng123
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
spring.datasource.password
=
@
imeng123
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
company.oss.prefix
=
https://tamp-pro.oss-cn-shanghai.aliyuncs.com/
...
...
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