Commit 88db936d authored by 张亚辉's avatar 张亚辉

基金详情

parent e20f4ccd
...@@ -65,6 +65,10 @@ public interface ProductApi { ...@@ -65,6 +65,10 @@ public interface ProductApi {
@GetMapping("/track/record") @GetMapping("/track/record")
CommonResp<List<TrackRecordVO>> getTrackRecordInfo(@ApiParam("产品id") @RequestParam("id") String id); CommonResp<List<TrackRecordVO>> getTrackRecordInfo(@ApiParam("产品id") @RequestParam("id") String id);
@ApiOperation("历史业绩 对比指数")
@GetMapping("/track/recor/index")
CommonResp<List<TrackRecordVO>> getTrackRecordInfoIndex(@ApiParam("对比指数ID") @RequestParam("indexId") String indexId);
@ApiOperation("历史净值") @ApiOperation("历史净值")
@GetMapping("/track/net") @GetMapping("/track/net")
CommonResp<Page<TrackNetVO>> getTrackNetListInfo(@ApiParam("产品id") @RequestParam("id") String id, @ApiParam("分页对象") Pageable page); CommonResp<Page<TrackNetVO>> getTrackNetListInfo(@ApiParam("产品id") @RequestParam("id") String id, @ApiParam("分页对象") Pageable page);
...@@ -124,4 +128,12 @@ public interface ProductApi { ...@@ -124,4 +128,12 @@ public interface ProductApi {
@ApiOperation(value = "根据Id查询私有产品基本信息") @ApiOperation(value = "根据Id查询私有产品基本信息")
@PostMapping(value = "/privateFundInfo/simpleList", produces = {"application/json"}) @PostMapping(value = "/privateFundInfo/simpleList", produces = {"application/json"})
CommonResp<List<FundInfoSimpleListResp>> privateSimpleList(@RequestBody List<String> idList); CommonResp<List<FundInfoSimpleListResp>> privateSimpleList(@RequestBody List<String> idList);
@ApiOperation("对比指数")
@GetMapping("/fund/indexes")
CommonResp<List<FundIndexBasicResp>> fundIndexes();
@ApiOperation("查询同类基金")
@GetMapping("/query/samefund")
CommonResp<List<FundSameResp>> querySamefund(@RequestParam("fundId") String fundId);
} }
...@@ -8,6 +8,7 @@ import com.tanpu.common.model.product.req.ProductListReq; ...@@ -8,6 +8,7 @@ import com.tanpu.common.model.product.req.ProductListReq;
import com.tanpu.common.model.product.resp.*; import com.tanpu.common.model.product.resp.*;
import com.tanpu.common.resp.CommonResp; import com.tanpu.common.resp.CommonResp;
import com.tanpu.fund.api.ProductApi; import com.tanpu.fund.api.ProductApi;
import com.tanpu.fund.feign.publicfund.FeignClientForPublicfund;
import com.tanpu.fund.service.ProductService; import com.tanpu.fund.service.ProductService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -22,6 +23,8 @@ public class ProductController implements ProductApi { ...@@ -22,6 +23,8 @@ public class ProductController implements ProductApi {
@Resource @Resource
private ProductService productService; private ProductService productService;
@Resource
private FeignClientForPublicfund feignClientForPublicfund;
@Override @Override
public CommonResp<Page<ProductInfoVO>> getProductInfo(ProductInfoReq req) { public CommonResp<Page<ProductInfoVO>> getProductInfo(ProductInfoReq req) {
...@@ -68,6 +71,11 @@ public class ProductController implements ProductApi { ...@@ -68,6 +71,11 @@ public class ProductController implements ProductApi {
return CommonResp.success(this.productService.getTrackRecord(id)); return CommonResp.success(this.productService.getTrackRecord(id));
} }
@Override
public CommonResp<List<TrackRecordVO>> getTrackRecordInfoIndex(String indexId) {
return feignClientForPublicfund.getTrackRecordInfoIndex(indexId);
}
@Override @Override
public CommonResp<Page<TrackNetVO>> getTrackNetListInfo(String id, Pageable page) { public CommonResp<Page<TrackNetVO>> getTrackNetListInfo(String id, Pageable page) {
return CommonResp.success(this.productService.getTrackNetList(id, page)); return CommonResp.success(this.productService.getTrackNetList(id, page));
...@@ -156,4 +164,14 @@ public class ProductController implements ProductApi { ...@@ -156,4 +164,14 @@ public class ProductController implements ProductApi {
public CommonResp<List<FundInfoSimpleListResp>> privateSimpleList(List<String> idList) { public CommonResp<List<FundInfoSimpleListResp>> privateSimpleList(List<String> idList) {
return CommonResp.success(productService.getPrivateSimpleList(idList)); return CommonResp.success(productService.getPrivateSimpleList(idList));
} }
@Override
public CommonResp<List<FundIndexBasicResp>> fundIndexes() {
return feignClientForPublicfund.fundIndexes();
}
@Override
public CommonResp<List<FundSameResp>> querySamefund(String fundId) {
return CommonResp.success(this.productService.querySamefund(fundId));
}
} }
package com.tanpu.fund.feign.publicfund;
import com.tanpu.common.model.product.resp.FundIndexBasicResp;
import com.tanpu.common.model.product.resp.TrackRecordVO;
import com.tanpu.common.resp.CommonResp;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(value = "service-public-fund", fallbackFactory = FeignbackForPublicfund.class, path = "/fundpublic")
public interface FeignClientForPublicfund {
@ApiOperation("对比指数")
@GetMapping("/fund/indexes")
CommonResp<List<FundIndexBasicResp>> fundIndexes();
@ApiOperation("历史业绩 对比指数")
@GetMapping("/track/recor/index")
CommonResp<List<TrackRecordVO>> getTrackRecordInfoIndex(@ApiParam("对比指数ID") @RequestParam("indexId") String indexId);
}
package com.tanpu.fund.feign.publicfund;
import com.tanpu.common.model.product.resp.FundIndexBasicResp;
import com.tanpu.common.model.product.resp.TrackRecordVO;
import com.tanpu.common.resp.CommonResp;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
@Slf4j
@Component
public class FeignbackForPublicfund implements FallbackFactory<FeignClientForPublicfund> {
@Override
public FeignClientForPublicfund create(Throwable throwable) {
return new FeignClientForPublicfund() {
@Override
public CommonResp<List<FundIndexBasicResp>> fundIndexes() {
log.error("请求信息", throwable);
log.error("FeignClientForPublicfund.fundIndexes 查询指数失败");
return null;
}
@Override
public CommonResp<List<TrackRecordVO>> getTrackRecordInfoIndex(String indexId) {
log.error("请求信息", throwable);
log.error("FeignClientForPublicfund.getTrackRecordInfoIndex 历史业绩 对比指数:{}", indexId);
return null;
}
};
}
}
...@@ -4,6 +4,8 @@ import com.tanpu.fund.entity.generator.FundCompanyInfo; ...@@ -4,6 +4,8 @@ import com.tanpu.fund.entity.generator.FundCompanyInfo;
import com.tanpu.fund.entity.generator.FundCount; import com.tanpu.fund.entity.generator.FundCount;
import com.tanpu.fund.entity.generator.FundPersonnelInfo; import com.tanpu.fund.entity.generator.FundPersonnelInfo;
import java.util.List;
/** /**
* @author: zyh * @author: zyh
*/ */
...@@ -13,5 +15,5 @@ public interface ProductCommonService { ...@@ -13,5 +15,5 @@ public interface ProductCommonService {
FundCompanyInfo getFundCompanyInfo(String companyId); FundCompanyInfo getFundCompanyInfo(String companyId);
FundPersonnelInfo getFundManager(String fundId); List<FundPersonnelInfo> getFundManager(String fundId);
} }
...@@ -64,4 +64,6 @@ public interface ProductService { ...@@ -64,4 +64,6 @@ public interface ProductService {
List<FundInfoSimpleListResp> getSimpleList(List<String> idList); List<FundInfoSimpleListResp> getSimpleList(List<String> idList);
List<FundInfoSimpleListResp> getPrivateSimpleList(List<String> idList); List<FundInfoSimpleListResp> getPrivateSimpleList(List<String> idList);
List<FundSameResp> querySamefund(String fundId);
} }
...@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service; ...@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* @author: zyh * @author: zyh
...@@ -59,7 +60,7 @@ public class ProductCommonServiceImpl implements ProductCommonService { ...@@ -59,7 +60,7 @@ public class ProductCommonServiceImpl implements ProductCommonService {
} }
@Override @Override
public FundPersonnelInfo getFundManager(String fundId) { public List<FundPersonnelInfo> getFundManager(String fundId) {
if (StringUtils.isEmpty(fundId)) { if (StringUtils.isEmpty(fundId)) {
return null; return null;
} }
...@@ -67,9 +68,15 @@ public class ProductCommonServiceImpl implements ProductCommonService { ...@@ -67,9 +68,15 @@ public class ProductCommonServiceImpl implements ProductCommonService {
FundManagerMappingExample example = new FundManagerMappingExample(); FundManagerMappingExample example = new FundManagerMappingExample();
example.createCriteria().andFundIdEqualTo(fundId); example.createCriteria().andFundIdEqualTo(fundId);
List<FundManagerMapping> fundManagerMappings = fundManagerMappingMapper.selectByExample(example); List<FundManagerMapping> fundManagerMappings = fundManagerMappingMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(fundManagerMappings) if (CollectionUtils.isNotEmpty(fundManagerMappings)) {
&& StringUtils.isNotEmpty(fundManagerMappings.get(0).getFundManagerId())) {
return fundPersonnelInfoMapper.selectByPrimaryKey(fundManagerMappings.get(0).getFundManagerId()); List<String> list = fundManagerMappings.stream().filter(item -> StringUtils.isNotEmpty(item.getFundManagerId()))
.map(FundManagerMapping::getFundManagerId).collect(Collectors.toList());
FundPersonnelInfoExample fundPersonnelInfoExample = new FundPersonnelInfoExample();
fundPersonnelInfoExample.createCriteria().andPersonnelIdIn(list);
return fundPersonnelInfoMapper.selectByExample(fundPersonnelInfoExample);
} }
return null; return null;
} }
......
...@@ -19,6 +19,7 @@ import com.tanpu.fund.enums.FilterTypeEnum; ...@@ -19,6 +19,7 @@ import com.tanpu.fund.enums.FilterTypeEnum;
import com.tanpu.fund.enums.ProStrategyEnums; import com.tanpu.fund.enums.ProStrategyEnums;
import com.tanpu.fund.mapper.generator.*; import com.tanpu.fund.mapper.generator.*;
import com.tanpu.fund.mapper.generator.custom.FundInfoCustomMapper; import com.tanpu.fund.mapper.generator.custom.FundInfoCustomMapper;
import com.tanpu.fund.service.ProductCommonService;
import com.tanpu.fund.service.ProductService; import com.tanpu.fund.service.ProductService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -90,6 +91,9 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -90,6 +91,9 @@ public class ProductServiceImpl implements ProductService, Constant {
@Resource @Resource
private IfaImportedFundNavMapper ifaImportedFundNavMapper; private IfaImportedFundNavMapper ifaImportedFundNavMapper;
@Resource
private ProductCommonService productCommonService;
@Override @Override
public Page<ProductInfoVO> getProductList(ProductInfoReq req) { public Page<ProductInfoVO> getProductList(ProductInfoReq req) {
...@@ -165,6 +169,18 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -165,6 +169,18 @@ public class ProductServiceImpl implements ProductService, Constant {
vo.setRiskLevel(fundInfo.getRiskLevel()); vo.setRiskLevel(fundInfo.getRiskLevel());
vo.setInceptionDate(fundInfo.getInceptionDate() != null ? fundInfo.getInceptionDate().getTime() : null);
List<FundManagerVO> fundManagerVOList = this.getFundManager(id);
if (CollectionUtils.isNotEmpty(fundManagerVOList)) {
FundManagerVO fundManagerVO = fundManagerVOList.get(0);
vo.setManagerId(fundManagerVO.getManagerId());
vo.setManagerName(fundManagerVO.getManagerName());
}
//TODO zhoupeng 查询基金是否加自选 isCheck
// vo.setIsCheck();
return vo; return vo;
} }
...@@ -696,8 +712,9 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -696,8 +712,9 @@ public class ProductServiceImpl implements ProductService, Constant {
@Override @Override
public Page<TrackNetVO> getTrackNetList(String id, Pageable page) { public Page<TrackNetVO> getTrackNetList(String id, Pageable page) {
//为计算日涨幅多查一条 返回时要去除
com.github.pagehelper.Page<TrackNetVO> startPage = PageMethod.startPage(page.getPageNumber(), com.github.pagehelper.Page<TrackNetVO> startPage = PageMethod.startPage(page.getPageNumber(),
page.getPageSize()); page.getPageSize() + 1);
FundNavExample example = new FundNavExample(); FundNavExample example = new FundNavExample();
example.createCriteria().andFundIdEqualTo(id).andDeleteTagEqualTo(ZERO_NUM); example.createCriteria().andFundIdEqualTo(id).andDeleteTagEqualTo(ZERO_NUM);
example.setOrderByClause("price_date desc"); example.setOrderByClause("price_date desc");
...@@ -707,18 +724,40 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -707,18 +724,40 @@ public class ProductServiceImpl implements ProductService, Constant {
fundNavs = fundNavs.stream().collect( fundNavs = fundNavs.stream().collect(
Collectors.collectingAndThen( Collectors.collectingAndThen(
Collectors.toCollection(() -> Collectors.toCollection(() ->
new TreeSet<>(Comparator.comparing(FundNav::getPriceDate))), ArrayList::new)); new TreeSet<>(Comparator.comparing(FundNav::getPriceDate))), ArrayList::new))
.stream().sorted(Comparator.comparing(FundNav::getPriceDate).reversed()).collect(Collectors.toList());
//计算 日涨幅=(今日净值-前一日净值)/前一日净值
List<TrackNetVO> list = new ArrayList<>();
for (int i = 0; i < fundNavs.size(); i++) {
FundNav f = fundNavs.get(i);
TrackNetVO vo = new TrackNetVO();
vo.setDailyIncrease("0.00");
//日涨幅
{
if (i < fundNavs.size() - 1) {
FundNav pre = fundNavs.get(i + 1);
if (pre.getNav().compareTo(BigDecimal.ZERO) == 1) {
BigDecimal dailyIncrease = f.getNav().subtract(pre.getNav()).divide(pre.getNav(), 2, BigDecimal.ROUND_HALF_UP);
vo.setDailyIncrease(BigDecimalUtil.toString(dailyIncrease, 2));
}
}
}
return new Page<>(page, startPage.getTotal(), fundNavs.stream() vo.setPriceDate(DateUtil.format(f.getPriceDate(), DatePattern.NORM_DATE_PATTERN));
.sorted(Comparator.comparing(FundNav::getPriceDate).reversed()) vo.setNav(BigDecimalUtil.toString(f.getNav(), 4));
.map(f -> { vo.setCumulativeNav(BigDecimalUtil.toString(f.getCumulativeNav(), 4));
TrackNetVO vo = new TrackNetVO(); vo.setCumulativeNavWithdrawal(BigDecimalUtil.toString(f.getCumulativeNavWithdrawal(), 4));
vo.setPriceDate(DateUtil.format(f.getPriceDate(), DatePattern.NORM_DATE_PATTERN)); list.add(vo);
vo.setNav(BigDecimalUtil.toString(f.getNav(), 4)); }
vo.setCumulativeNav(BigDecimalUtil.toString(f.getCumulativeNav(), 4));
vo.setCumulativeNavWithdrawal(BigDecimalUtil.toString(f.getCumulativeNavWithdrawal(), 4)); if (list.size() > page.getPageSize()) {
return vo; //移除最后一条
}).collect(Collectors.toList())); list.remove(list.size() - 1);
}
return new Page<>(page, startPage.getTotal(), list);
} }
@Override @Override
...@@ -734,17 +773,17 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -734,17 +773,17 @@ public class ProductServiceImpl implements ProductService, Constant {
return Lists.newArrayList( return Lists.newArrayList(
new RiskRatingVO("最近一年", multiply100(fundCount.getMaxdrawdown1y()), new RiskRatingVO("最近一年", multiply100(fundCount.getMaxdrawdown1y()),
multiply100(fundCount.getStddev1y()), BigDecimalUtil.toString(fundCount.getSharperatio1y())), multiply100(fundCount.getStddev1y()), BigDecimalUtil.toString(fundCount.getSharperatio1y()), BigDecimalUtil.toString(fundCount.getRet1y())),
new RiskRatingVO("最近二年", multiply100(fundCount.getMaxdrawdown2y()), new RiskRatingVO("最近二年", multiply100(fundCount.getMaxdrawdown2y()),
multiply100(fundCount.getStddev2y()), BigDecimalUtil.toString(fundCount.getSharperatio2y())), multiply100(fundCount.getStddev2y()), BigDecimalUtil.toString(fundCount.getSharperatio2y()), BigDecimalUtil.toString(fundCount.getRet2yA())),
new RiskRatingVO("最近三年", multiply100(fundCount.getMaxdrawdown3y()), new RiskRatingVO("最近三年", multiply100(fundCount.getMaxdrawdown3y()),
multiply100(fundCount.getStddev3y()), BigDecimalUtil.toString(fundCount.getSharperatio3y())), multiply100(fundCount.getStddev3y()), BigDecimalUtil.toString(fundCount.getSharperatio3y()), BigDecimalUtil.toString(fundCount.getRet3yA())),
new RiskRatingVO("最近四年", multiply100(fundCount.getMaxdrawdown4y()), new RiskRatingVO("最近四年", multiply100(fundCount.getMaxdrawdown4y()),
multiply100(fundCount.getStddev4y()), BigDecimalUtil.toString(fundCount.getSharperatio4y())), multiply100(fundCount.getStddev4y()), BigDecimalUtil.toString(fundCount.getSharperatio4y()), BigDecimalUtil.toString(fundCount.getRet4yA())),
new RiskRatingVO("最近五年", multiply100(fundCount.getMaxdrawdown5y()), new RiskRatingVO("最近五年", multiply100(fundCount.getMaxdrawdown5y()),
multiply100(fundCount.getStddev5y()), BigDecimalUtil.toString(fundCount.getSharperatio5y())), multiply100(fundCount.getStddev5y()), BigDecimalUtil.toString(fundCount.getSharperatio5y()), BigDecimalUtil.toString(fundCount.getRet5yA())),
new RiskRatingVO("成立以来", multiply100(fundCount.getMaxdrawdownIncep()), new RiskRatingVO("成立以来", multiply100(fundCount.getMaxdrawdownIncep()),
multiply100(fundCount.getStddevIncep()), BigDecimalUtil.toString(fundCount.getSharperatioIncep()))); multiply100(fundCount.getStddevIncep()), BigDecimalUtil.toString(fundCount.getSharperatioIncep()), BigDecimalUtil.toString(fundCount.getRetIncepA())));
} }
@Override @Override
...@@ -1370,17 +1409,17 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1370,17 +1409,17 @@ public class ProductServiceImpl implements ProductService, Constant {
return Lists.newArrayList( return Lists.newArrayList(
new RiskRatingVO("最近一年", multiply100(fundCount.getMaxdrawdown1y()), new RiskRatingVO("最近一年", multiply100(fundCount.getMaxdrawdown1y()),
multiply100(fundCount.getStddev1y()), BigDecimalUtil.toString(fundCount.getSharperatio1y())), multiply100(fundCount.getStddev1y()), BigDecimalUtil.toString(fundCount.getSharperatio1y()), BigDecimalUtil.toString(fundCount.getRet1y())),
new RiskRatingVO("最近二年", multiply100(fundCount.getMaxdrawdown2y()), new RiskRatingVO("最近二年", multiply100(fundCount.getMaxdrawdown2y()),
multiply100(fundCount.getStddev2y()), BigDecimalUtil.toString(fundCount.getSharperatio2y())), multiply100(fundCount.getStddev2y()), BigDecimalUtil.toString(fundCount.getSharperatio2y()), BigDecimalUtil.toString(fundCount.getRet2yA())),
new RiskRatingVO("最近三年", multiply100(fundCount.getMaxdrawdown3y()), new RiskRatingVO("最近三年", multiply100(fundCount.getMaxdrawdown3y()),
multiply100(fundCount.getStddev3y()), BigDecimalUtil.toString(fundCount.getSharperatio3y())), multiply100(fundCount.getStddev3y()), BigDecimalUtil.toString(fundCount.getSharperatio3y()), BigDecimalUtil.toString(fundCount.getRet3yA())),
new RiskRatingVO("最近四年", multiply100(fundCount.getMaxdrawdown4y()), new RiskRatingVO("最近四年", multiply100(fundCount.getMaxdrawdown4y()),
multiply100(fundCount.getStddev4y()), BigDecimalUtil.toString(fundCount.getSharperatio4y())), multiply100(fundCount.getStddev4y()), BigDecimalUtil.toString(fundCount.getSharperatio4y()), BigDecimalUtil.toString(fundCount.getRet4yA())),
new RiskRatingVO("最近五年", multiply100(fundCount.getMaxdrawdown5y()), new RiskRatingVO("最近五年", multiply100(fundCount.getMaxdrawdown5y()),
multiply100(fundCount.getStddev5y()), BigDecimalUtil.toString(fundCount.getSharperatio5y())), multiply100(fundCount.getStddev5y()), BigDecimalUtil.toString(fundCount.getSharperatio5y()), BigDecimalUtil.toString(fundCount.getRet5yA())),
new RiskRatingVO("成立以来", multiply100(fundCount.getMaxdrawdownIncep()), new RiskRatingVO("成立以来", multiply100(fundCount.getMaxdrawdownIncep()),
multiply100(fundCount.getStddevIncep()), BigDecimalUtil.toString(fundCount.getSharperatioIncep()))); multiply100(fundCount.getStddevIncep()), BigDecimalUtil.toString(fundCount.getSharperatioIncep()), BigDecimalUtil.toString(fundCount.getRetIncepA())));
} }
@Override @Override
...@@ -1458,6 +1497,38 @@ public class ProductServiceImpl implements ProductService, Constant { ...@@ -1458,6 +1497,38 @@ public class ProductServiceImpl implements ProductService, Constant {
.build()) .build())
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
@Override
public List<FundSameResp> querySamefund(String fundId) {
//查询同类基金
FundInfo fundInfo = fundInfoMapper.selectByPrimaryKey(fundId);
PageMethod.startPage(1, 10);
FundCountExample example = new FundCountExample();
example.createCriteria().andSubstrategyEqualTo(fundInfo.getSubstrategy()).andStatusEqualTo(Constant.ONE_NUM)
.andDataSourcesEqualTo(Constant.ONE_NUM).andDeleteTagEqualTo(BizEnums.DeleteTag.tag_init);
example.setOrderByClause("ret1y desc");
List<FundCount> fundCounts = fundCountMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(fundCounts)) {
List<String> fundIdList = fundCounts.stream().map(FundCount::getFundId).collect(Collectors.toList());
FundInfoExample infoExample = new FundInfoExample();
infoExample.createCriteria().andIdIn(fundIdList);
Map<String, String> fundMap = fundInfoMapper.selectByExample(infoExample).stream().collect(Collectors.toMap(FundInfo::getId, FundInfo::getFundShortName));
//TODO zhoupeng 查询基金是否加自选 isCheck
return fundCounts.stream().map(item -> FundSameResp.builder()
.fundId(item.getFundId())
.fundName(fundMap.get(item.getFundId()))
.ret1y(BigDecimalUtil.toString(item.getRet1y(), 2))
// .isCheck()
.build()).collect(Collectors.toList());
}
return null;
}
private ArrayList<TrackRecordVO> getPrivateFundTrackRecordVOS(IfaImportedFundCount fundCount) { private ArrayList<TrackRecordVO> getPrivateFundTrackRecordVOS(IfaImportedFundCount fundCount) {
return Lists.newArrayList( return Lists.newArrayList(
new TrackRecordVO("近三个月", multiply100(fundCount.getRet3m()), multiply100(fundCount.getRet3mBm1())), new TrackRecordVO("近三个月", multiply100(fundCount.getRet3m()), multiply100(fundCount.getRet3mBm1())),
......
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