Commit e25c4200 authored by 张亚辉's avatar 张亚辉

私有基金

parent 176fdfdd
......@@ -19,6 +19,8 @@ import lombok.NoArgsConstructor;
public class PrivateFundDetailResp {
@ApiModelProperty("基金ID")
private String fundId;
@ApiModelProperty("备案编号")
private String registerNumber;
@ApiModelProperty("基金名称")
private String fundName;
@ApiModelProperty("近一年收益")
......
......@@ -1303,25 +1303,16 @@ public class ProductServiceImpl implements ProductService, Constant {
example.createCriteria().andFundIdEqualTo(id).andDeleteTagEqualTo(BizEnums.DeleteTag.tag_init);
List<IfaImportedFundCount> fundCountList = ifaImportedFundCountMapper.selectByExample(example);
//查询净值
PageMethod.startPage(1, 1);
IfaImportedFundNavExample navExample = new IfaImportedFundNavExample();
navExample.createCriteria().andFundIdEqualTo(id).andDeleteTagEqualTo(BizEnums.DeleteTag.tag_init);
navExample.setOrderByClause("price_date desc");
List<IfaImportedFundNav> navList = ifaImportedFundNavMapper.selectByExample(navExample);
PrivateFundDetailResp detailResp = PrivateFundDetailResp.builder()
.fundId(fundInfo.getId())
.fundName(fundInfo.getFundName())
.registerNumber(fundInfo.getRegisterNumber())
.build();
if (CollectionUtils.isNotEmpty(fundCountList)) {
detailResp.setNear1YearProfit(BigDecimalUtil.toString(fundCountList.get(0).getRet1y(), 2));
}
if (CollectionUtils.isNotEmpty(navList)) {
detailResp.setNet(Net.builder().netDate(navList.get(0).getPriceDate().getTime())
.netValue(BigDecimalUtil.toString(navList.get(0).getNav())).build());
detailResp.setNet(Net.builder().netDate(fundCountList.get(0).getPriceDate().getTime())
.netValue(BigDecimalUtil.toString(fundCountList.get(0).getNetNav())).build());
}
return detailResp;
......
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