From e25c4200e9ea3f09f295b9b1355451855f099749 Mon Sep 17 00:00:00 2001
From: zhangyh <zhangyahui@wealthgrow.cn>
Date: Sat, 6 Feb 2021 10:46:56 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A7=81=E6=9C=89=E5=9F=BA=E9=87=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../api/model/resp/PrivateFundDetailResp.java     |  2 ++
 .../fund/service/impl/ProductServiceImpl.java     | 15 +++------------
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/tanpu/fund/api/model/resp/PrivateFundDetailResp.java b/src/main/java/com/tanpu/fund/api/model/resp/PrivateFundDetailResp.java
index ef44d3e..f8758e8 100644
--- a/src/main/java/com/tanpu/fund/api/model/resp/PrivateFundDetailResp.java
+++ b/src/main/java/com/tanpu/fund/api/model/resp/PrivateFundDetailResp.java
@@ -19,6 +19,8 @@ import lombok.NoArgsConstructor;
 public class PrivateFundDetailResp {
     @ApiModelProperty("基金ID")
     private String fundId;
+    @ApiModelProperty("备案编号")
+    private String registerNumber;
     @ApiModelProperty("基金名称")
     private String fundName;
     @ApiModelProperty("近一年收益")
diff --git a/src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java b/src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
index e8452d8..42dd455 100644
--- a/src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+++ b/src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
@@ -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;
-- 
2.18.1