Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
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
探普后端
tanpu-community
Commits
a40d8251
Commit
a40d8251
authored
Sep 16, 2021
by
吴泽佳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
圈子 白名单查询 基金公司信息与持有基金数量
parent
2384b9aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
1 deletion
+41
-1
FundCompanyTypeEnum.java
...va/com/tanpu/community/api/enums/FundCompanyTypeEnum.java
+2
-1
FeignBackClientForProducts.java
...u/community/feign/product/FeignBackClientForProducts.java
+15
-0
FeignClientForProducts.java
...tanpu/community/feign/product/FeignClientForProducts.java
+9
-0
HomePageManager.java
...ain/java/com/tanpu/community/manager/HomePageManager.java
+15
-0
No files found.
community-api/src/main/java/com/tanpu/community/api/enums/FundCompanyTypeEnum.java
View file @
a40d8251
...
@@ -8,7 +8,8 @@ package com.tanpu.community.api.enums;
...
@@ -8,7 +8,8 @@ package com.tanpu.community.api.enums;
**/
**/
public
enum
FundCompanyTypeEnum
{
public
enum
FundCompanyTypeEnum
{
PUBLIC
(
0
,
"公募"
),
PUBLIC
(
0
,
"公募"
),
PRIVATE
(
1
,
"私募"
);
PRIVATE
(
1
,
"私募"
),
WHITELIST
(
2
,
"白名单"
);
private
Integer
code
;
private
Integer
code
;
private
String
type
;
private
String
type
;
...
...
community-service/src/main/java/com/tanpu/community/feign/product/FeignBackClientForProducts.java
View file @
a40d8251
package
com
.
tanpu
.
community
.
feign
.
product
;
package
com
.
tanpu
.
community
.
feign
.
product
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.community.api.beans.vo.feign.fund.FundCompanySimpleVO
;
import
com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO
;
import
com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO
;
import
feign.hystrix.FallbackFactory
;
import
feign.hystrix.FallbackFactory
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -27,6 +28,20 @@ public class FeignBackClientForProducts implements FallbackFactory<FeignClientFo
...
@@ -27,6 +28,20 @@ public class FeignBackClientForProducts implements FallbackFactory<FeignClientFo
log
.
error
(
"FeignClientForProducts.getProductInfoByIds-查询产品ids:{}"
,
ids
);
log
.
error
(
"FeignClientForProducts.getProductInfoByIds-查询产品ids:{}"
,
ids
);
return
null
;
return
null
;
}
}
@Override
public
CommonResp
<
FundCompanySimpleVO
>
getFundCompanyInfoSimple
(
String
id
)
{
log
.
error
(
"请求信息"
,
throwable
);
log
.
error
(
"FeignClientForProducts.getFundCompanyInfoSimple-查询产品ids:{}"
,
id
);
return
null
;
}
@Override
public
CommonResp
<
FundCompanySimpleVO
>
getCompanyFundCount
(
String
id
)
{
log
.
error
(
"请求信息"
,
throwable
);
log
.
error
(
"FeignClientForProducts.getCompanyFundCount-查询产品ids:{}"
,
id
);
return
null
;
}
};
};
}
}
}
}
community-service/src/main/java/com/tanpu/community/feign/product/FeignClientForProducts.java
View file @
a40d8251
package
com
.
tanpu
.
community
.
feign
.
product
;
package
com
.
tanpu
.
community
.
feign
.
product
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.community.api.beans.vo.feign.fund.FundCompanySimpleVO
;
import
com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO
;
import
com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO
;
import
com.tanpu.community.feign.fatools.FeignbackForFatools
;
import
com.tanpu.community.feign.fatools.FeignbackForFatools
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -23,4 +24,12 @@ public interface FeignClientForProducts {
...
@@ -23,4 +24,12 @@ public interface FeignClientForProducts {
@ApiOperation
(
"根据id查询列表"
)
@ApiOperation
(
"根据id查询列表"
)
@GetMapping
(
"/getProductInfoByIds"
)
@GetMapping
(
"/getProductInfoByIds"
)
CommonResp
<
List
<
ProductInfoVO
>>
getProductInfoByIds
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"fundIds"
)
List
<
String
>
fundIds
);
CommonResp
<
List
<
ProductInfoVO
>>
getProductInfoByIds
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"fundIds"
)
List
<
String
>
fundIds
);
@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
);
}
}
community-service/src/main/java/com/tanpu/community/manager/HomePageManager.java
View file @
a40d8251
...
@@ -32,6 +32,7 @@ import com.tanpu.community.feign.activity.FeignClientForActivity;
...
@@ -32,6 +32,7 @@ import com.tanpu.community.feign.activity.FeignClientForActivity;
import
com.tanpu.community.feign.course.FeignClientForCourse
;
import
com.tanpu.community.feign.course.FeignClientForCourse
;
import
com.tanpu.community.feign.diagnose.FeignClientForDiagnose
;
import
com.tanpu.community.feign.diagnose.FeignClientForDiagnose
;
import
com.tanpu.community.feign.fatools.FeignClientForFatools
;
import
com.tanpu.community.feign.fatools.FeignClientForFatools
;
import
com.tanpu.community.feign.product.FeignClientForProducts
;
import
com.tanpu.community.feign.product.FeignForFund
;
import
com.tanpu.community.feign.product.FeignForFund
;
import
com.tanpu.community.feign.product.FeignForPublicFund
;
import
com.tanpu.community.feign.product.FeignForPublicFund
;
import
com.tanpu.community.service.FollowRelService
;
import
com.tanpu.community.service.FollowRelService
;
...
@@ -79,6 +80,8 @@ public class HomePageManager {
...
@@ -79,6 +80,8 @@ public class HomePageManager {
private
RedisCache
redisCache
;
private
RedisCache
redisCache
;
@Resource
@Resource
private
FeignClientForActivity
feignClientForActivity
;
private
FeignClientForActivity
feignClientForActivity
;
@Resource
private
FeignClientForProducts
feignClientForProducts
;
@Autowired
@Autowired
private
NotificationService
notificationService
;
private
NotificationService
notificationService
;
...
@@ -157,6 +160,18 @@ public class HomePageManager {
...
@@ -157,6 +160,18 @@ public class HomePageManager {
CommonResp
<
FundCompanySimpleVO
>
companyFundCount
=
feignForFund
.
getCompanyFundCount
(
userInfoNew
.
getUserInfoNewOrg
().
getRelationFundCompanyId
());
CommonResp
<
FundCompanySimpleVO
>
companyFundCount
=
feignForFund
.
getCompanyFundCount
(
userInfoNew
.
getUserInfoNewOrg
().
getRelationFundCompanyId
());
userInfoNew
.
setFundNumber
(
companyFundCount
.
isSuccess
()
?
companyFundCount
.
getData
().
getFundCount
()
:
0
);
userInfoNew
.
setFundNumber
(
companyFundCount
.
isSuccess
()
?
companyFundCount
.
getData
().
getFundCount
()
:
0
);
}
}
if
(
FundCompanyTypeEnum
.
WHITELIST
.
getCode
()
==
userInfoNew
.
getUserInfoNewOrg
().
getRelationFundCompanyType
()
&&
StringUtils
.
isNotBlank
(
userInfoNew
.
getUserInfoNewOrg
().
getRelationFundCompanyId
()))
{
// 私募
// 设置成立时间 和 备案编号
CommonResp
<
FundCompanySimpleVO
>
fundCompanyInfoSimple
=
feignClientForProducts
.
getFundCompanyInfoSimple
(
userInfoNew
.
getUserInfoNewOrg
().
getRelationFundCompanyId
());
if
(
fundCompanyInfoSimple
.
isSuccess
())
{
FundCompanySimpleVO
data
=
fundCompanyInfoSimple
.
getData
();
userInfoNew
.
setFounded
(
data
.
getEstablishDate
()
>
0
?
DateUtils
.
formatYMD
(
new
Date
(
data
.
getEstablishDate
()))
:
null
);
userInfoNew
.
setRecordNumber
(
data
.
getRegisterNumber
());
}
// 设置 基金数
CommonResp
<
FundCompanySimpleVO
>
companyFundCount
=
feignClientForProducts
.
getCompanyFundCount
(
userInfoNew
.
getUserInfoNewOrg
().
getRelationFundCompanyId
());
userInfoNew
.
setFundNumber
(
companyFundCount
.
isSuccess
()
?
companyFundCount
.
getData
().
getFundCount
()
:
0
);
}
//设置团队成员
//设置团队成员
CommonResp
<
List
<
UserInfoOrg
>>
usetInfoByOrgUserId
=
feignClientForFatools
.
getUsetInfoByOrgUserId
(
userId
);
CommonResp
<
List
<
UserInfoOrg
>>
usetInfoByOrgUserId
=
feignClientForFatools
.
getUsetInfoByOrgUserId
(
userId
);
if
(
usetInfoByOrgUserId
.
isSuccess
()
&&
CollectionUtils
.
isNotEmpty
(
usetInfoByOrgUserId
.
getData
()))
{
if
(
usetInfoByOrgUserId
.
isSuccess
()
&&
CollectionUtils
.
isNotEmpty
(
usetInfoByOrgUserId
.
getData
()))
{
...
...
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