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
98b3869a
Commit
98b3869a
authored
3 years ago
by
吴泽佳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加社区使用两个接口 查询公司简单信息 和所持有的的基金数量
parent
a4a48950
master
api_opt_branch
bugfix-20210811
bugfix_0903
dev
dev-0429-fund-nav-cache
dev-fund-nav-check
feat/v20220725
ht_order_bouns
search_20211025
v2.2.5
v2.4.0-fund-iteration
v2.4.1-logfilter
v2.4.3-fund-tag
v3.2.0_download_pdf
v3.3.0_pubfund_search
yh_1029
yh_1207
yh_20220221
1 merge request
!1
添加社区使用两个接口 查询公司简单信息 和所持有的的基金数量
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
ProductForCommunityApi.java
src/main/java/com/tanpu/fund/api/ProductForCommunityApi.java
+27
-0
ProductForCommunityController.java
.../tanpu/fund/controller/ProductForCommunityController.java
+48
-0
No files found.
src/main/java/com/tanpu/fund/api/ProductForCommunityApi.java
0 → 100644
View file @
98b3869a
package
com
.
tanpu
.
fund
.
api
;
import
com.tanpu.common.model.product.resp.FundCompanySimpleVO
;
import
com.tanpu.common.model.product.resp.FundCompanyVO
;
import
com.tanpu.common.resp.CommonResp
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
/**
* @description: 社区调用API服务
* @author: zejia zj wu
* @create: 2021-07-29 10:13
**/
@Api
(
tags
=
"社区调用API服务"
)
public
interface
ProductForCommunityApi
{
@ApiOperation
(
"基金公司-简单信息"
)
@GetMapping
(
"/fund/companyInfoSimple"
)
CommonResp
<
FundCompanySimpleVO
>
getFundCompanyInfoSimple
(
@ApiParam
(
"基金公司id"
)
@RequestParam
(
"id"
)
String
id
);
@ApiOperation
(
"私募类型基金公司-持有产品数"
)
@GetMapping
(
"/fund/companyFundCount"
)
CommonResp
<
FundCompanySimpleVO
>
getCompanyFundCount
(
@ApiParam
(
"基金公司id"
)
@RequestParam
(
"id"
)
String
id
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/tanpu/fund/controller/ProductForCommunityController.java
0 → 100644
View file @
98b3869a
package
com
.
tanpu
.
fund
.
controller
;
import
com.tanpu.common.model.product.resp.FundCompanySimpleVO
;
import
com.tanpu.common.resp.CommonResp
;
import
com.tanpu.fund.api.ProductForCommunityApi
;
import
com.tanpu.fund.entity.generator.CompanyInfo
;
import
com.tanpu.fund.entity.generator.FundInfoExample
;
import
com.tanpu.fund.mapper.generator.CompanyInfoMapper
;
import
com.tanpu.fund.mapper.generator.FundInfoMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @description:
* @author: zejia zj wu
* @create: 2021-07-29 10:22
**/
@RestController
@Slf4j
public
class
ProductForCommunityController
implements
ProductForCommunityApi
{
@Resource
private
CompanyInfoMapper
companyInfoMapper
;
@Resource
private
FundInfoMapper
fundInfoMapper
;
@Override
public
CommonResp
<
FundCompanySimpleVO
>
getFundCompanyInfoSimple
(
String
id
)
{
CompanyInfo
companyInfo
=
this
.
companyInfoMapper
.
selectByPrimaryKey
(
id
);
if
(
companyInfo
==
null
)
{
return
CommonResp
.
error
(
CommonResp
.
OBJECT_NOT_FOUND_EXCEPTION_STATUS_CODE
,
CommonResp
.
OBJECT_NOT_FOUND_EXCEPTION_MESSAGE
);
}
FundCompanySimpleVO
build
=
FundCompanySimpleVO
.
builder
().
establishDate
(
companyInfo
.
getEstablishDate
().
getTime
())
.
registerNumber
(
companyInfo
.
getRegisterNumber
()).
build
();
return
CommonResp
.
success
(
build
);
}
@Override
public
CommonResp
<
FundCompanySimpleVO
>
getCompanyFundCount
(
String
id
)
{
FundInfoExample
fundInfoExample
=
new
FundInfoExample
();
fundInfoExample
.
createCriteria
().
andTrustIdEqualTo
(
id
);
long
l
=
fundInfoMapper
.
countByExample
(
fundInfoExample
);
FundCompanySimpleVO
build
=
FundCompanySimpleVO
.
builder
().
fundCount
(
l
).
build
();
return
CommonResp
.
success
(
build
);
}
}
This diff is collapsed.
Click to expand it.
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