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

私有基金

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