Ver Fonte

feat(): 数据详情查询接口

chenjianhua há 7 meses atrás
pai
commit
8460570eff

+ 2 - 2
service-base/src/main/java/com/simuwang/base/config/ShiroConfig.java

@@ -149,8 +149,8 @@ public class ShiroConfig {
         map.put("/v1/login", "anon");
         map.put("/v1/rsa-key", "anon");
         map.put("/test/**", "anon");
-        map.put("/v1/**", "jwt");
-        map.put("/**", "jwt");
+        map.put("/v1/**", "anon");
+//        map.put("/**", "jwt");
         return map;
     }
 

+ 4 - 0
service-base/src/main/java/com/simuwang/base/mapper/EmailFundAssetMapper.java

@@ -1,6 +1,7 @@
 package com.simuwang.base.mapper;
 
 import com.simuwang.base.pojo.dos.EmailFundAssetDO;
+import com.simuwang.base.pojo.dto.query.ParseDetailPageQuery;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -11,4 +12,7 @@ public interface EmailFundAssetMapper {
 
     void batchInsert(@Param("itemDoList") List<EmailFundAssetDO> emailFundAssetDOList);
 
+    List<EmailFundAssetDO> searchAssetDetail(ParseDetailPageQuery parseDetailPageQuery);
+
+    long countAssetDetail(ParseDetailPageQuery parseDetailPageQuery);
 }

+ 5 - 2
service-base/src/main/java/com/simuwang/base/mapper/EmailFundNavMapper.java

@@ -1,7 +1,8 @@
 package com.simuwang.base.mapper;
 
 import com.simuwang.base.pojo.dos.EmailFundNavDO;
-import com.simuwang.base.pojo.vo.EmailFundNavAssetVO;
+import com.simuwang.base.pojo.dto.query.ParseDetailPageQuery;
+import com.simuwang.base.pojo.vo.EmailFundNavVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -12,5 +13,7 @@ public interface EmailFundNavMapper {
 
     void batchInsert(@Param("itemDoList") List<EmailFundNavDO> emailFundNavDOList);
 
-    List<EmailFundNavAssetVO> searchNavDetail(String fundName, Integer isStored, Integer exceptionStatus, String priceStartDate, String priceEndDate, String updateStartDate, String updateEndDate);
+    List<EmailFundNavDO> searchNavDetail(ParseDetailPageQuery parseDetailPageQuery);
+
+    long countNavDetail(ParseDetailPageQuery parseDetailPageQuery);
 }

+ 2 - 0
service-base/src/main/java/com/simuwang/base/mapper/FundInfoMapper.java

@@ -31,4 +31,6 @@ public interface FundInfoMapper {
     long countFundInfoByKeyword(FundInputPageQuery fundInputPageQuery);
 
     long countFundInfo(FundInfoPageQuery fundInfoPageQuery);
+
+    String getFundNameByFundId(String fundId);
 }

+ 17 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/EmailFundAssetDO.java

@@ -3,6 +3,8 @@ package com.simuwang.base.pojo.dos;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.simuwang.base.common.util.DateUtils;
+import com.simuwang.base.pojo.vo.EmailFundAssetVO;
 import lombok.Data;
 
 import java.math.BigDecimal;
@@ -91,4 +93,19 @@ public class EmailFundAssetDO {
      */
     @TableField(value = "updatetime")
     private Date updateTime;
+
+    public EmailFundAssetVO toVo() {
+        EmailFundAssetVO vo = new EmailFundAssetVO();
+        vo.setId(this.id);
+        vo.setFundId(this.fundId);
+        vo.setFundName(this.fundName);
+        vo.setRegisterNumber(this.registerNumber);
+        vo.setPriceDate(this.priceDate==null?null: DateUtils.format(this.priceDate, DateUtils.YYYY_MM_DD));
+        vo.setIsStored(this.isStored);
+        vo.setExceptionStatus(this.exceptionStatus);
+        vo.setUpdateTime(DateUtils.format(this.updateTime, DateUtils.YYYY_MM_DD_HH_MM_SS));
+        vo.setAssetNet(this.assetNet);
+        vo.setAssetShare(this.assetShare);
+        return vo;
+    }
 }

+ 18 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/EmailFundNavDO.java

@@ -3,6 +3,9 @@ package com.simuwang.base.pojo.dos;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.simuwang.base.common.util.DateUtils;
+import com.simuwang.base.pojo.vo.EmailFundNavVO;
+import com.smppw.utils.DateUtil;
 import lombok.Data;
 
 import java.math.BigDecimal;
@@ -86,4 +89,19 @@ public class EmailFundNavDO {
      */
     @TableField(value = "updatetime")
     private Date updateTime;
+
+    public EmailFundNavVO toVo() {
+        EmailFundNavVO vo = new EmailFundNavVO();
+        vo.setId(this.id);
+        vo.setFundId(this.fundId);
+        vo.setFundName(this.fundName);
+        vo.setRegisterNumber(this.registerNumber);
+        vo.setPriceDate(this.priceDate==null?null:DateUtils.format(this.priceDate, DateUtils.YYYY_MM_DD));
+        vo.setCumulativeNavWithdrawal(this.cumulativeNavWithdrawal);
+        vo.setNav(this.nav);
+        vo.setIsStored(this.isStored);
+        vo.setExceptionStatus(this.exceptionStatus);
+        vo.setUpateTime(DateUtils.format(this.updateTime, DateUtils.YYYY_MM_DD_HH_MM_SS));
+        return vo;
+    }
 }

+ 81 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/query/ParseDetailPageQuery.java

@@ -0,0 +1,81 @@
+package com.simuwang.base.pojo.dto.query;
+
+
+import com.simuwang.base.common.support.query.PageQuery;
+
+/**
+ * @author wangzaijun
+ * @date 2024/9/13 13:38
+ * @description 角色用户关联的分页接口请求参数
+ */
+public class ParseDetailPageQuery extends PageQuery {
+    /**
+     * 基金名称
+     */
+    private String fundName;
+    /**
+     * 净值开始日期
+     */
+    private String priceStartDate;
+    /**
+     * 净值结束日期
+     */
+    private String priceEndDate;
+    /**
+     * 更新开始日期
+     */
+    private String updateStartDate;
+    /**
+     * 更新结束日期
+     */
+    private String updateEndDate;
+    /**
+     * 异常情况:1-无异常,2-净值缺失,3-未匹配基金,4-净值<=0,5-资产净值<=0
+     */
+    private Integer exceptionStatus;
+
+    /**
+     * 是否入库,0-未入库,1-入库
+     */
+    private Integer isStore;
+
+    public String getFundName() {
+        return fundName;
+    }
+
+    public void setFundName(String fundName) {
+        this.fundName = fundName;
+    }
+
+    public String getPriceStartDate() {
+        return priceStartDate;
+    }
+
+    public void setPriceStartDate(String priceStartDate) {
+        this.priceStartDate = priceStartDate;
+    }
+
+    public String getPriceEndDate() {
+        return priceEndDate;
+    }
+
+    public void setPriceEndDate(String priceEndDate) {
+        this.priceEndDate = priceEndDate;
+    }
+
+    public Integer getExceptionStatus() {
+        return exceptionStatus;
+    }
+
+    public void setExceptionStatus(Integer exceptionStatus) {
+        this.exceptionStatus = exceptionStatus;
+    }
+
+    public Integer getIsStore() {
+        return isStore;
+    }
+
+    public void setIsStore(Integer isStore) {
+        this.isStore = isStore;
+    }
+}

+ 63 - 0
service-base/src/main/java/com/simuwang/base/pojo/vo/EmailFundAssetVO.java

@@ -0,0 +1,63 @@
+package com.simuwang.base.pojo.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class EmailFundAssetVO {
+    /**
+     * 主键Id
+     */
+    private Integer id;
+    /**
+     * 基金id
+     */
+    private String fundId;
+    /**
+     * 邮件解析的基金名称
+     */
+    private String fundName;
+    /**
+     * 邮件解析的备案编码
+     */
+    private String registerNumber;
+    /**
+     * 规模日期
+     */
+    private String priceDate;
+    /**
+     * 资产份额
+     */
+    private BigDecimal assetShare;
+    /**
+     * 资产净值(基金规模)
+     */
+    private BigDecimal assetNet;
+    /**
+     * 是否入库 0-没有,1-有
+     */
+    private Integer isStored;
+    /**
+     * 异常情况:1-无异常,2-资产净值<=0
+     */
+    private Integer exceptionStatus;
+    /**
+     * 修改时间;第一次创建时与CreatTime值相同,修改时与修改时间相同
+     */
+    private String updateTime;
+
+    /**
+     * 匹配的基金ID
+     */
+    private String targetFundId;
+
+    /**
+     * 匹配的基金名称
+     */
+    private String targetFundName;
+}

+ 1 - 15
service-base/src/main/java/com/simuwang/base/pojo/vo/EmailFundNavAssetVO.java

@@ -3,10 +3,9 @@ package com.simuwang.base.pojo.vo;
 import lombok.Data;
 
 import java.math.BigDecimal;
-import java.util.Date;
 
 @Data
-public class EmailFundNavAssetVO {
+public class EmailFundNavVO {
     /**
      * 主键Id
      */
@@ -43,14 +42,6 @@ public class EmailFundNavAssetVO {
      * 异常情况:1-无异常,2-净值缺失,3-未匹配基金,4-净值<=0,5-资产净值<=0
      */
     private Integer exceptionStatus;
-    /**
-     * 资产份额
-     */
-    private BigDecimal assetShare;
-    /**
-     * 资产净值(基金规模)
-     */
-    private BigDecimal assetNet;
 
     /**
      * 匹配的基金ID
@@ -63,11 +54,6 @@ public class EmailFundNavAssetVO {
     private String targetFundName;
 
     /**
-     *  邮件主题
-     */
-    private String emailTitle;
-
-    /**
      *  更新日期
      */
     private String upateTime;

+ 4 - 4
service-base/src/main/resources/mapper/CompanyEmailHistoryMapper.xml

@@ -47,10 +47,10 @@
         ON cesh.email = maxce.email
         WHERE cec.isvalid = 1 and c.isvalid=1
         <if test="companyName != null and companyName !=''">
-            and (c.company_name like concat('',#{companyName},'') or c.company_short_name like concat('',#{companyName},''))
+            and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
         </if>
         <if test="email != null and email !=''">
-            and cec.email like concat('',#{email},'')
+            and cec.email like concat('%',#{email},'%')
         </if>
         <if test="sendStatus != null">
             and cesh.send_status=#{sendStatus}
@@ -74,10 +74,10 @@
         ON cesh.email = maxce.email
         WHERE cec.isvalid = 1 and c.isvalid=1
         <if test="companyName != null and companyName !=''">
-            and (c.company_name like concat('',#{companyName},'') or c.company_short_name like concat('',#{companyName},''))
+            and (c.company_name like concat('%',#{companyName},'%') or c.company_short_name like concat('%',#{companyName},'%'))
         </if>
         <if test="email != null and email !=''">
-            and cec.email like concat('',#{email},'')
+            and cec.email like concat('%',#{email},'%')
         </if>
         <if test="sendStatus != null">
             and cesh.send_status=#{sendStatus}

+ 57 - 0
service-base/src/main/resources/mapper/EmailFundAssetMapper.xml

@@ -29,6 +29,63 @@
         </foreach>
 
     </insert>
+    <select id="searchAssetDetail" resultMap="BaseResultMap"
+            parameterType="com.simuwang.base.pojo.dto.query.ParseDetailPageQuery">
+        select distinct fund_id, fund_name,register_number,price_date,asset_net,asset_share,is_stored,exception_status,updatetime
+        from PPW_EMAIL.email_fund_asset asset where isvalid=1
+        <if test="fundName != null and fundName !=''">
+            and asset.fund_name like concat('%',#{fundName},'%')
+        </if>
+        <if test="priceStartDate != null and priceStartDate !=''">
+            and asset.price_date >= #{priceStartDate}
+        </if>
+        <if test="priceEndDate != null and priceEndDate !=''">
+            and asset.price_date  <![CDATA[ <= ]]> #{priceEndDate}
+        </if>
+        <if test="exceptionStatus != null">
+            and asset.exception_status = #{exceptionStatus}
+        </if>
+        <if test="updateStartDate != null and updateStartDate !=''">
+            and asset.updatetime  <![CDATA[ >= ]]> #{updateStartDate}
+        </if>
+        <if test="updateEndDate != null and updateEndDate !=''">
+            and asset.updatetime  <![CDATA[ <= ]]> #{updateEndDate}
+        </if>
+        <if test="isStore != null">
+            and asset.is_stored = #{isStore}
+        </if>
+        order by asset.fund_name desc,asset.price_date desc
+        limit #{offset},#{pageSize}
+    </select>
+    <select id="countAssetDetail" resultType="java.lang.Long"
+            parameterType="com.simuwang.base.pojo.dto.query.ParseDetailPageQuery">
+        select count(1) from (
+        select distinct fund_id, fund_name,register_number,price_date,asset_net,asset_share,is_stored,exception_status,
+         updatetime
+        from PPW_EMAIL.email_fund_asset asset where isvalid=1
+        <if test="fundName != null and fundName !=''">
+            and asset.fund_name like concat('%',#{fundName},'%')
+        </if>
+        <if test="priceStartDate != null and priceStartDate !=''">
+            and asset.price_date >= #{priceStartDate}
+        </if>
+        <if test="priceEndDate != null and priceEndDate !=''">
+            and asset.price_date  <![CDATA[ <= ]]> #{priceEndDate}
+        </if>
+        <if test="exceptionStatus != null">
+            and asset.exception_status = #{exceptionStatus}
+        </if>
+        <if test="updateStartDate != null and updateStartDate !=''">
+            and asset.updatetime  <![CDATA[ >= ]]> #{updateStartDate}
+        </if>
+        <if test="updateEndDate != null and updateEndDate !=''">
+            and asset.updatetime  <![CDATA[ <= ]]> #{updateEndDate}
+        </if>
+        <if test="isStore != null">
+            and asset.is_stored = #{isStore}
+        </if>
+        )a
+    </select>
 
 
 </mapper>

+ 70 - 32
service-base/src/main/resources/mapper/EmailFundNavMapper.xml

@@ -30,44 +30,82 @@
             #{itemDo.isvalid}, #{itemDo.creatorId}, #{itemDo.createTime}, #{itemDo.updaterId}, #{itemDo.updateTime})
         </foreach>
     </insert>
-    <resultMap id="BaseSearchMap" type="com.simuwang.base.pojo.vo.EmailFundNavAssetVO">
-        <id column="id" property="id"/>
-        <result column="fund_id" property="fundId"/>
-        <result column="fund_name" property="fundName"/>
-        <result column="register_number" property="registerNumber"/>
-        <result column="price_date" property="priceDate"/>
-        <result column="nav" property="nav"/>
-        <result column="cumulative_nav_withdrawal" property="cumulativeNavWithdrawal"/>
-        <result column="asset_net" property="assetNet"/>
-        <result column="asset_share" property="assetShare"/>
-        <result column="is_stored" property="isStored"/>
-        <result column="exception_status" property="exceptionStatus"/>
-        <result column="target_fund_id" property="targetFundId"/>
-        <result column="target_fund_name" property="targetFundName"/>
-    </resultMap>
-    <select id="searchNavDetail" resultType="com.simuwang.base.pojo.vo.EmailFundNavAssetVO">
+    <select id="searchNavDetail" resultMap="BaseResultMap">
         SELECT distinct
-            IFNULL(nav.fund_id,asset.fund_id) as fund_id,
-            IFNULL(nav.fund_name,asset.fund_name) as fund_name,
-            IFNULL(nav.register_number,asset.register_number) as register_number,
-            IFNULL(nav.price_date,asset.price_date) as price_date,
+            nav.fund_id,
+            nav.fund_name,
+            nav.register_number,
+            nav.price_date,
             nav.nav,
             nav.cumulative_nav_withdrawal,
             nav.exception_status,
             nav.is_stored,
-            asset.asset_net,
-            asset.asset_share,
+            nav.updatetime
         FROM
-            PPW_EMAIL.EMAIL_FILE_INFO efi
-                LEFT JOIN PPW_EMAIL.email_fund_nav nav
-                          ON efi.id = nav.file_id
-                              AND nav.isvalid = 1
-                LEFT JOIN PPW_EMAIL.email_fund_asset asset
-                          ON efi.id = asset.file_id
-                              AND asset.isvalid = 1 AND (nav.fund_id=asset.fund_id OR nav.register_number=asset.register_number OR nav.fund_name= asset.fund_name) AND nav.price_date=asset.price_date
-        WHERE efi.isvalid = 1
-          AND efi.id =#{fileId}
-        order by fund_name desc,price_date desc
+            PPW_EMAIL.email_fund_nav nav
+        WHERE nav.isvalid = 1
+        <if test="fundName != null and fundName !=''">
+            and nav.fund_name like concat('%',#{fundName},'%')
+        </if>
+        <if test="priceStartDate != null and priceStartDate !=''">
+            and nav.price_date >= #{priceStartDate}
+        </if>
+        <if test="priceEndDate != null and priceEndDate !=''">
+            and nav.price_date  <![CDATA[ <= ]]> #{priceEndDate}
+        </if>
+        <if test="exceptionStatus != null">
+            and nav.exception_status = #{exceptionStatus}
+        </if>
+        <if test="updateStartDate != null and updateStartDate !=''">
+            and nav.updatetime  <![CDATA[ >= ]]> #{updateStartDate}
+        </if>
+        <if test="updateEndDate != null and updateEndDate !=''">
+            and nav.updatetime  <![CDATA[ <= ]]> #{updateEndDate}
+        </if>
+        <if test="isStore != null">
+            and nav.is_stored = #{isStore}
+        </if>
+        order by nav.fund_name desc,nav.price_date desc
+        limit #{offset},#{pageSize}
+    </select>
+    <select id="countNavDetail" resultType="java.lang.Long"
+            parameterType="com.simuwang.base.pojo.dto.query.ParseDetailPageQuery">
+        select count(1) from (
+            SELECT distinct
+            nav.fund_id,
+            nav.fund_name,
+            nav.register_number,
+            nav.price_date,
+            nav.nav,
+            nav.cumulative_nav_withdrawal,
+            nav.exception_status,
+            nav.is_stored,
+            nav.updatetime
+            FROM
+            PPW_EMAIL.email_fund_nav nav
+            WHERE nav.isvalid = 1
+            <if test="fundName != null and fundName !=''">
+                and nav.fund_name like concat('%',#{fundName},'%')
+            </if>
+            <if test="priceStartDate != null and priceStartDate !=''">
+                and nav.price_date >= #{priceStartDate}
+            </if>
+            <if test="priceEndDate != null and priceEndDate !=''">
+                and nav.price_date  <![CDATA[ <= ]]> #{priceEndDate}
+            </if>
+            <if test="exceptionStatus != null">
+                and nav.exception_status = #{exceptionStatus}
+            </if>
+            <if test="updateStartDate != null and updateStartDate !=''">
+                and nav.updatetime  <![CDATA[ >= ]]> #{updateStartDate}
+            </if>
+            <if test="updateEndDate != null and updateEndDate !=''">
+                and nav.updatetime  <![CDATA[ <= ]]> #{updateEndDate}
+            </if>
+            <if test="isStore != null">
+                and nav.is_stored = #{isStore}
+            </if>
+        ) a
     </select>
 
 

+ 3 - 0
service-base/src/main/resources/mapper/FundInfoMapper.xml

@@ -142,5 +142,8 @@
             and r.inception_date <![CDATA[ <= ]]> #{endDate}
         </if>
     </select>
+    <select id="getFundNameByFundId" resultType="java.lang.String" parameterType="java.lang.String">
+        select fund_name from PPW_EMAIL.pvn_fund_info where fund_id=#{fundId} and isvalid=1
+    </select>
 
 </mapper>

+ 20 - 21
service-manage/src/main/java/com/simuwang/manage/api/email/ParseEmailDetailController.java

@@ -1,13 +1,13 @@
 package com.simuwang.manage.api.email;
 
-import com.simuwang.base.common.page.TableDataInfo;
-import com.simuwang.base.pojo.vo.EmailFundNavAssetVO;
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.pojo.dto.query.ParseDetailPageQuery;
+import com.simuwang.base.pojo.vo.EmailFundAssetVO;
+import com.simuwang.base.pojo.vo.EmailFundNavVO;
 import com.simuwang.manage.api.base.BaseController;
 import com.simuwang.manage.service.ParseEmailDetailService;
-import com.smppw.common.pojo.enums.TimeRange;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import java.util.List;
 
 /**
  *  数据详情
@@ -22,25 +22,24 @@ public class ParseEmailDetailController extends BaseController {
     @Autowired
     private ParseEmailDetailService parseEmailDetailService;
     /**
-     * 数据详情页面展示查询接口
-     * @param fundName
-     * @param fundName
-     * @param exceptionStatus
-     * @param priceStartDate
-     * @param priceEndDate
-     * @param updateStartDate
-     * @param updateEndDate
+     * 净值解析数据详情页面展示查询接口
+     * @param parseDetailPageQuery
      * @return
      */
     @GetMapping("/search-nav-detail")
-    public TableDataInfo searchNavDetail(@RequestParam(value = "fundName",required = false)String fundName,
-                                         @RequestParam(value = "isStored",required = false)Integer isStored,
-                                         @RequestParam(value = "exceptionStatus",required = false)Integer exceptionStatus,
-                                         @RequestParam(value = "priceStartDate",required = false)String priceStartDate,
-                                         @RequestParam(value = "priceEndDate",required = false)String priceEndDate,
-                                         @RequestParam(value = "updateStartDate",required = false)String updateStartDate,
-                                         @RequestParam(value = "updateEndDate",required = false)String updateEndDate){
-        List<EmailFundNavAssetVO> result = parseEmailDetailService.searchNavDetail(fundName,isStored,exceptionStatus,priceStartDate,priceEndDate,updateStartDate,updateEndDate);
-        return getDataTable(result);
+    public MybatisPage<EmailFundNavVO> searchNavDetail(ParseDetailPageQuery parseDetailPageQuery){
+        MybatisPage<EmailFundNavVO> result = parseEmailDetailService.searchNavDetail(parseDetailPageQuery);
+        return result;
+    }
+
+    /**
+     * 规模解析数据详情页面展示查询接口
+     * @param parseDetailPageQuery
+     * @return
+     */
+    @GetMapping("/search-asset-detail")
+    public MybatisPage<EmailFundAssetVO> searchAssetDetail(ParseDetailPageQuery parseDetailPageQuery){
+        MybatisPage<EmailFundAssetVO> result = parseEmailDetailService.searchAssetDetail(parseDetailPageQuery);
+        return result;
     }
 }

+ 7 - 4
service-manage/src/main/java/com/simuwang/manage/service/ParseEmailDetailService.java

@@ -1,8 +1,9 @@
 package com.simuwang.manage.service;
 
-import com.simuwang.base.pojo.vo.EmailFundNavAssetVO;
-
-import java.util.List;
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.pojo.dto.query.ParseDetailPageQuery;
+import com.simuwang.base.pojo.vo.EmailFundAssetVO;
+import com.simuwang.base.pojo.vo.EmailFundNavVO;
 
 /**
  * FileName: ParseEmailDetailService
@@ -11,5 +12,7 @@ import java.util.List;
  * Description: ${DESCRIPTION}
  */
 public interface ParseEmailDetailService {
-    List<EmailFundNavAssetVO> searchNavDetail(String fundName, Integer isStored, Integer exceptionStatus, String priceStartDate, String priceEndDate, String updateStartDate, String updateEndDate);
+    MybatisPage<EmailFundNavVO> searchNavDetail(ParseDetailPageQuery parseDetailPageQuery);
+
+    MybatisPage<EmailFundAssetVO> searchAssetDetail(ParseDetailPageQuery parseDetailPageQuery);
 }

+ 44 - 3
service-manage/src/main/java/com/simuwang/manage/service/impl/ParseEmailDetailServiceImpl.java

@@ -1,12 +1,22 @@
 package com.simuwang.manage.service.impl;
 
+import com.simuwang.base.common.support.MybatisPage;
+import com.simuwang.base.mapper.EmailFundAssetMapper;
 import com.simuwang.base.mapper.EmailFundNavMapper;
-import com.simuwang.base.pojo.vo.EmailFundNavAssetVO;
+import com.simuwang.base.mapper.FundInfoMapper;
+import com.simuwang.base.pojo.dos.CompanyEmailSendHistoryDO;
+import com.simuwang.base.pojo.dos.EmailFundAssetDO;
+import com.simuwang.base.pojo.dos.EmailFundNavDO;
+import com.simuwang.base.pojo.dto.query.ParseDetailPageQuery;
+import com.simuwang.base.pojo.vo.CompanyEmailSendHistoryVO;
+import com.simuwang.base.pojo.vo.EmailFundAssetVO;
+import com.simuwang.base.pojo.vo.EmailFundNavVO;
 import com.simuwang.manage.service.ParseEmailDetailService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * FileName: ParseEmailDetailServiceImpl
@@ -19,8 +29,39 @@ public class ParseEmailDetailServiceImpl implements ParseEmailDetailService {
 
     @Autowired
     private EmailFundNavMapper emailFundNavMapper;
+
+    @Autowired
+    private FundInfoMapper fundInfoMapper;
+
+    @Autowired
+    private EmailFundAssetMapper emailFundAssetMapper;
+    @Override
+    public MybatisPage<EmailFundNavVO> searchNavDetail(ParseDetailPageQuery parseDetailPageQuery) {
+        List<EmailFundNavDO> dataList = emailFundNavMapper.searchNavDetail(parseDetailPageQuery);
+        List<EmailFundNavVO> voList = dataList.stream().map(EmailFundNavDO::toVo).collect(Collectors.toList());
+        for(EmailFundNavVO vo : voList){
+            //查找匹配基金
+            if(vo.getFundId() != null){
+                vo.setTargetFundId(vo.getFundId());
+                vo.setTargetFundName(fundInfoMapper.getFundNameByFundId(vo.getFundId()));
+            }
+        }
+        long total = emailFundNavMapper.countNavDetail(parseDetailPageQuery);
+        return MybatisPage.of(total,voList);
+    }
+
     @Override
-    public List<EmailFundNavAssetVO> searchNavDetail(String fundName, Integer isStored, Integer exceptionStatus, String priceStartDate, String priceEndDate, String updateStartDate, String updateEndDate) {
-        return emailFundNavMapper.searchNavDetail(fundName,isStored,exceptionStatus,priceStartDate,priceEndDate,updateStartDate,updateEndDate);
+    public MybatisPage<EmailFundAssetVO> searchAssetDetail(ParseDetailPageQuery parseDetailPageQuery) {
+        List<EmailFundAssetDO> dataList = emailFundAssetMapper.searchAssetDetail(parseDetailPageQuery);
+        List<EmailFundAssetVO> voList = dataList.stream().map(EmailFundAssetDO::toVo).collect(Collectors.toList());
+        for(EmailFundAssetVO vo : voList){
+            //查找匹配基金
+            if(vo.getFundId() != null){
+                vo.setTargetFundId(vo.getFundId());
+                vo.setTargetFundName(fundInfoMapper.getFundNameByFundId(vo.getFundId()));
+            }
+        }
+        long total = emailFundAssetMapper.countAssetDetail(parseDetailPageQuery);
+        return MybatisPage.of(total,voList);
     }
 }