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
35752327
Commit
35752327
authored
Feb 27, 2021
by
张亚辉
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
1911a79b
436c6194
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
13 deletions
+25
-13
ProductApi.java
src/main/java/com/tanpu/fund/api/ProductApi.java
+2
-1
ProductController.java
...ain/java/com/tanpu/fund/controller/ProductController.java
+3
-3
ProductPrivateService.java
...in/java/com/tanpu/fund/service/ProductPrivateService.java
+1
-1
ProductPrivateServiceImpl.java
...om/tanpu/fund/service/impl/ProductPrivateServiceImpl.java
+18
-7
application-test.properties
src/main/resources/application-test.properties
+1
-1
No files found.
src/main/java/com/tanpu/fund/api/ProductApi.java
View file @
35752327
...
...
@@ -126,7 +126,8 @@ public interface ProductApi {
@ApiOperation
(
"基金公司 - 私有基金"
)
@GetMapping
(
"/private/fund/company"
)
CommonResp
<
FundCompanyVO
>
getPrivateFundCompanyInfo
(
@ApiParam
(
"基金公司id"
)
@RequestParam
(
"id"
)
String
id
);
CommonResp
<
FundCompanyVO
>
getPrivateFundCompanyInfo
(
@ApiParam
(
"基金公司id"
)
@RequestParam
(
"id"
)
String
id
,
@ApiParam
(
"分页对象"
)
Pageable
page
);
@ApiOperation
(
"基金经理 - 私有基金"
)
@GetMapping
(
"/private/fund/manager"
)
...
...
src/main/java/com/tanpu/fund/controller/ProductController.java
View file @
35752327
...
...
@@ -100,7 +100,7 @@ public class ProductController implements ProductApi {
@Override
public
CommonResp
<
FundCompanyVO
>
getFundCompanyInfo
(
String
id
)
{
return
CommonResp
.
success
(
this
.
product
Private
Service
.
getFundCompany
(
id
));
return
CommonResp
.
success
(
this
.
productService
.
getFundCompany
(
id
));
}
@Override
...
...
@@ -168,8 +168,8 @@ public class ProductController implements ProductApi {
}
@Override
public
CommonResp
<
FundCompanyVO
>
getPrivateFundCompanyInfo
(
String
id
)
{
return
CommonResp
.
success
(
this
.
productPrivateService
.
getFundCompany
(
id
));
public
CommonResp
<
FundCompanyVO
>
getPrivateFundCompanyInfo
(
String
id
,
Pageable
page
)
{
return
CommonResp
.
success
(
this
.
productPrivateService
.
getFundCompany
(
id
,
page
));
}
@Override
...
...
src/main/java/com/tanpu/fund/service/ProductPrivateService.java
View file @
35752327
...
...
@@ -53,7 +53,7 @@ public interface ProductPrivateService {
FundRecordVO
getFundRecord
(
String
id
);
FundCompanyVO
getFundCompany
(
String
id
);
FundCompanyVO
getFundCompany
(
String
id
,
Pageable
page
);
FundCompanyVO
getPrivateFundCompany
(
String
id
);
...
...
src/main/java/com/tanpu/fund/service/impl/ProductPrivateServiceImpl.java
View file @
35752327
package
com
.
tanpu
.
fund
.
service
.
impl
;
import
com.github.pagehelper.page.PageMethod
;
import
com.google.common.collect.Lists
;
import
com.tanpu.common.enums.Constant
;
import
com.tanpu.common.model.Page
;
...
...
@@ -24,6 +25,7 @@ import com.tanpu.common.model.product.resp.TrackRecordVO;
import
com.tanpu.common.model.product.resp.UnitNetVO
;
import
com.tanpu.common.model.tanpuroom.Type
;
import
com.tanpu.common.utils.BigDecimalUtil
;
import
com.tanpu.common.utils.PageUtils
;
import
com.tanpu.fund.entity.generator.CompanyInfo
;
import
com.tanpu.fund.entity.generator.CompanyTnaPersonnel
;
import
com.tanpu.fund.entity.generator.CompanyTnaPersonnelExample
;
...
...
@@ -184,7 +186,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
@Override
public
List
<
FundManagerVO
>
getFundManager
(
String
id
)
{
FundManagerMappingExample
example
=
new
FundManagerMappingExample
();
example
.
createCriteria
().
andFundIdEqualTo
(
id
).
and
IsvisibleEqualTo
(
ONE_NUM
).
and
DeleteTagEqualTo
(
ZERO_NUM
);
example
.
createCriteria
().
andFundIdEqualTo
(
id
).
andDeleteTagEqualTo
(
ZERO_NUM
);
example
.
setOrderByClause
(
"update_time desc"
);
List
<
String
>
list
=
this
.
fundManagerMappingMapper
.
selectByExample
(
example
).
stream
()
...
...
@@ -201,7 +203,10 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
.
collect
(
Collectors
.
toList
());
FundCountExample
example2
=
new
FundCountExample
();
example2
.
createCriteria
().
andFundIdIn
(
fundIds
).
andDeleteTagEqualTo
(
ZERO_NUM
);
example2
.
createCriteria
()
.
andFundIdIn
(
fundIds
)
.
andRetIncepIsNotNull
()
.
andDeleteTagEqualTo
(
ZERO_NUM
);
example2
.
setOrderByClause
(
"ret_incep desc"
);
List
<
FundCount
>
fundCounts
=
this
.
fundCountMapper
.
selectByExample
(
example2
);
Map
<
String
,
FundCount
>
fundCountMap
=
fundCounts
.
stream
()
...
...
@@ -313,7 +318,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
}
@Override
public
FundCompanyVO
getFundCompany
(
String
id
)
{
public
FundCompanyVO
getFundCompany
(
String
id
,
Pageable
page
)
{
CompanyInfo
companyInfo
=
this
.
companyInfoMapper
.
selectByPrimaryKey
(
id
);
if
(
companyInfo
==
null
)
{
return
new
FundCompanyVO
();
...
...
@@ -347,8 +352,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
}
// 其他基金信息
otherFundInfo
(
vo
,
id
);
otherFundInfo
(
vo
,
id
,
page
);
return
vo
;
}
...
...
@@ -363,7 +367,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
return
personnelInfos
.
stream
().
collect
(
Collectors
.
toMap
(
PersonnelInfo:
:
getId
,
s
->
s
));
}
private
void
otherFundInfo
(
FundCompanyVO
vo
,
String
id
)
{
private
void
otherFundInfo
(
FundCompanyVO
vo
,
String
id
,
Pageable
page
)
{
FundInfoExample
example1
=
new
FundInfoExample
();
example1
.
createCriteria
().
andTrustIdEqualTo
(
id
).
andDeleteTagEqualTo
(
ZERO_NUM
);
...
...
@@ -373,8 +377,13 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
FundCountExample
example2
=
new
FundCountExample
();
example2
.
createCriteria
().
andFundIdIn
(
list
).
andDeleteTagEqualTo
(
ZERO_NUM
);
example2
.
createCriteria
().
andFundIdIn
(
list
)
.
andDeleteTagEqualTo
(
ZERO_NUM
)
.
andRet1yBm1IsNotNull
();
example2
.
setOrderByClause
(
"ret_incep desc,ret_incep_a desc"
);
com
.
github
.
pagehelper
.
Page
<
Object
>
objectPage
=
PageMethod
.
startPage
(
page
.
getPageNumber
(),
page
.
getPageSize
());
List
<
FundCount
>
fundCounts
=
this
.
fundCountMapper
.
selectByExample
(
example2
);
if
(
CollectionUtils
.
isNotEmpty
(
fundCounts
))
{
...
...
@@ -419,8 +428,10 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
vo1
.
setRet1y
(
multiply100
(
f
.
getRet1y
()));
vo1
.
setRatioId
(
info
.
getPrimaryBenchmarkId
());
return
vo1
;
}).
collect
(
Collectors
.
toList
()));
vo
.
setPage
(
new
Page
<>(
objectPage
,
vo
.
getFundInfoVOS
()));
}
}
}
...
...
src/main/resources/application-test.properties
View file @
35752327
...
...
@@ -12,7 +12,7 @@ management.endpoint.health.show-details=always
spring.datasource.url
=
jdbc:mysql://118.190.63.109:3306/tamp_fund?autoReconnect=true&characterEncoding=utf-8&serverTimezone=GMT%2B8&useSSL=false
spring.datasource.username
=
root
spring.datasource.password
=
'@imeng123'
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