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
13e85afc
Commit
13e85afc
authored
Feb 26, 2021
by
zp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
c6e1f72f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
11 deletions
+20
-11
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
+13
-5
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 @
13e85afc
...
@@ -134,7 +134,8 @@ public interface ProductApi {
...
@@ -134,7 +134,8 @@ public interface ProductApi {
@ApiOperation
(
"基金公司 - 私有基金"
)
@ApiOperation
(
"基金公司 - 私有基金"
)
@GetMapping
(
"/private/fund/company"
)
@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
(
"基金经理 - 私有基金"
)
@ApiOperation
(
"基金经理 - 私有基金"
)
@GetMapping
(
"/private/fund/manager"
)
@GetMapping
(
"/private/fund/manager"
)
...
...
src/main/java/com/tanpu/fund/controller/ProductController.java
View file @
13e85afc
...
@@ -105,7 +105,7 @@ public class ProductController implements ProductApi {
...
@@ -105,7 +105,7 @@ public class ProductController implements ProductApi {
@Override
@Override
public
CommonResp
<
FundCompanyVO
>
getFundCompanyInfo
(
String
id
)
{
public
CommonResp
<
FundCompanyVO
>
getFundCompanyInfo
(
String
id
)
{
return
CommonResp
.
success
(
this
.
product
Private
Service
.
getFundCompany
(
id
));
return
CommonResp
.
success
(
this
.
productService
.
getFundCompany
(
id
));
}
}
@Override
@Override
...
@@ -179,8 +179,8 @@ public class ProductController implements ProductApi {
...
@@ -179,8 +179,8 @@ public class ProductController implements ProductApi {
}
}
@Override
@Override
public
CommonResp
<
FundCompanyVO
>
getPrivateFundCompanyInfo
(
String
id
)
{
public
CommonResp
<
FundCompanyVO
>
getPrivateFundCompanyInfo
(
String
id
,
Pageable
page
)
{
return
CommonResp
.
success
(
this
.
productPrivateService
.
getFundCompany
(
id
));
return
CommonResp
.
success
(
this
.
productPrivateService
.
getFundCompany
(
id
,
page
));
}
}
@Override
@Override
...
...
src/main/java/com/tanpu/fund/service/ProductPrivateService.java
View file @
13e85afc
...
@@ -53,7 +53,7 @@ public interface ProductPrivateService {
...
@@ -53,7 +53,7 @@ public interface ProductPrivateService {
FundRecordVO
getFundRecord
(
String
id
);
FundRecordVO
getFundRecord
(
String
id
);
FundCompanyVO
getFundCompany
(
String
id
);
FundCompanyVO
getFundCompany
(
String
id
,
Pageable
page
);
FundCompanyVO
getPrivateFundCompany
(
String
id
);
FundCompanyVO
getPrivateFundCompany
(
String
id
);
...
...
src/main/java/com/tanpu/fund/service/impl/ProductPrivateServiceImpl.java
View file @
13e85afc
package
com
.
tanpu
.
fund
.
service
.
impl
;
package
com
.
tanpu
.
fund
.
service
.
impl
;
import
com.github.pagehelper.page.PageMethod
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.tanpu.common.enums.Constant
;
import
com.tanpu.common.enums.Constant
;
import
com.tanpu.common.model.Page
;
import
com.tanpu.common.model.Page
;
...
@@ -24,6 +25,7 @@ import com.tanpu.common.model.product.resp.TrackRecordVO;
...
@@ -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.product.resp.UnitNetVO
;
import
com.tanpu.common.model.tanpuroom.Type
;
import
com.tanpu.common.model.tanpuroom.Type
;
import
com.tanpu.common.utils.BigDecimalUtil
;
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.CompanyInfo
;
import
com.tanpu.fund.entity.generator.CompanyTnaPersonnel
;
import
com.tanpu.fund.entity.generator.CompanyTnaPersonnel
;
import
com.tanpu.fund.entity.generator.CompanyTnaPersonnelExample
;
import
com.tanpu.fund.entity.generator.CompanyTnaPersonnelExample
;
...
@@ -313,7 +315,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
...
@@ -313,7 +315,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
}
}
@Override
@Override
public
FundCompanyVO
getFundCompany
(
String
id
)
{
public
FundCompanyVO
getFundCompany
(
String
id
,
Pageable
page
)
{
CompanyInfo
companyInfo
=
this
.
companyInfoMapper
.
selectByPrimaryKey
(
id
);
CompanyInfo
companyInfo
=
this
.
companyInfoMapper
.
selectByPrimaryKey
(
id
);
if
(
companyInfo
==
null
)
{
if
(
companyInfo
==
null
)
{
return
new
FundCompanyVO
();
return
new
FundCompanyVO
();
...
@@ -347,8 +349,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
...
@@ -347,8 +349,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
}
}
// 其他基金信息
// 其他基金信息
otherFundInfo
(
vo
,
id
);
otherFundInfo
(
vo
,
id
,
page
);
return
vo
;
return
vo
;
}
}
...
@@ -363,7 +364,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
...
@@ -363,7 +364,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
return
personnelInfos
.
stream
().
collect
(
Collectors
.
toMap
(
PersonnelInfo:
:
getId
,
s
->
s
));
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
();
FundInfoExample
example1
=
new
FundInfoExample
();
example1
.
createCriteria
().
andTrustIdEqualTo
(
id
).
andDeleteTagEqualTo
(
ZERO_NUM
);
example1
.
createCriteria
().
andTrustIdEqualTo
(
id
).
andDeleteTagEqualTo
(
ZERO_NUM
);
...
@@ -373,8 +374,13 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
...
@@ -373,8 +374,13 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
FundCountExample
example2
=
new
FundCountExample
();
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"
);
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
);
List
<
FundCount
>
fundCounts
=
this
.
fundCountMapper
.
selectByExample
(
example2
);
if
(
CollectionUtils
.
isNotEmpty
(
fundCounts
))
{
if
(
CollectionUtils
.
isNotEmpty
(
fundCounts
))
{
...
@@ -419,8 +425,10 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
...
@@ -419,8 +425,10 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
vo1
.
setRet1y
(
multiply100
(
f
.
getRet1y
()));
vo1
.
setRet1y
(
multiply100
(
f
.
getRet1y
()));
vo1
.
setRatioId
(
info
.
getPrimaryBenchmarkId
());
vo1
.
setRatioId
(
info
.
getPrimaryBenchmarkId
());
return
vo1
;
return
vo1
;
}).
collect
(
Collectors
.
toList
()));
}).
collect
(
Collectors
.
toList
()));
vo
.
setPage
(
new
Page
<>(
objectPage
,
vo
.
getFundInfoVOS
()));
}
}
}
}
}
}
...
...
src/main/resources/application-test.properties
View file @
13e85afc
...
@@ -12,7 +12,7 @@ management.endpoint.health.show-details=always
...
@@ -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.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.username
=
root
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
company.oss.prefix
=
https://tamp-pro.oss-cn-shanghai.aliyuncs.com/
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