Commit ece385a0 authored by 王亚雷's avatar 王亚雷

Merge remote-tracking branch 'origin/hotfix-20210916'

parents 2384b9aa a40d8251
......@@ -8,7 +8,8 @@ package com.tanpu.community.api.enums;
**/
public enum FundCompanyTypeEnum {
PUBLIC(0,"公募"),
PRIVATE(1,"私募");
PRIVATE(1,"私募"),
WHITELIST(2,"白名单");
private Integer code;
private String type;
......
package com.tanpu.community.feign.product;
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 feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
......@@ -27,6 +28,20 @@ public class FeignBackClientForProducts implements FallbackFactory<FeignClientFo
log.error("FeignClientForProducts.getProductInfoByIds-查询产品ids:{}", ids);
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;
}
};
}
}
package com.tanpu.community.feign.product;
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.feign.fatools.FeignbackForFatools;
import io.swagger.annotations.ApiOperation;
......@@ -23,4 +24,12 @@ public interface FeignClientForProducts {
@ApiOperation("根据id查询列表")
@GetMapping("/getProductInfoByIds")
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);
}
......@@ -32,6 +32,7 @@ import com.tanpu.community.feign.activity.FeignClientForActivity;
import com.tanpu.community.feign.course.FeignClientForCourse;
import com.tanpu.community.feign.diagnose.FeignClientForDiagnose;
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.FeignForPublicFund;
import com.tanpu.community.service.FollowRelService;
......@@ -79,6 +80,8 @@ public class HomePageManager {
private RedisCache redisCache;
@Resource
private FeignClientForActivity feignClientForActivity;
@Resource
private FeignClientForProducts feignClientForProducts;
@Autowired
private NotificationService notificationService;
......@@ -157,6 +160,18 @@ public class HomePageManager {
CommonResp<FundCompanySimpleVO> companyFundCount = feignForFund.getCompanyFundCount(userInfoNew.getUserInfoNewOrg().getRelationFundCompanyId());
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);
if (usetInfoByOrgUserId.isSuccess() && CollectionUtils.isNotEmpty(usetInfoByOrgUserId.getData())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment