浏览代码

fix:数据详情查询优化

chenjianhua 3 周之前
父节点
当前提交
215faab077

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

@@ -16,6 +16,10 @@ public class ParseDetailPageQuery extends PageQuery {
      */
     private String fundName;
     /**
+     * 基金名称
+     */
+    private String registerNumber;
+    /**
      * 净值开始日期
      */
     private String priceStartDate;
@@ -109,4 +113,12 @@ public class ParseDetailPageQuery extends PageQuery {
     public void setUpdateEndDate(String updateEndDate) {
         this.updateEndDate = updateEndDate;
     }
+
+    public String getRegisterNumber() {
+        return registerNumber;
+    }
+
+    public void setRegisterNumber(String registerNumber) {
+        this.registerNumber = registerNumber;
+    }
 }

+ 8 - 2
service-base/src/main/resources/mapper/EmailFundAssetMapper.xml

@@ -66,7 +66,10 @@
         on file.email_id = parse.id
         where asset.isvalid=1 and file.isvalid=1 and parse.isvalid=1
         <if test="fundName != null and fundName !=''">
-            and (asset.fund_name like concat(#{fundName},'%') or asset.register_number like concat(#{fundName},'%') )
+            and asset.fund_name like concat(#{fundName},'%')
+        </if>
+        <if test="registerNumber != null and registerNumber !=''">
+            and asset.register_number like concat(#{registerNumber},'%')
         </if>
         <if test="priceStartDate != null and priceStartDate !=''">
             and asset.price_date >= #{priceStartDate}
@@ -112,7 +115,10 @@
         on file.email_id = parse.id
         where asset.isvalid=1 and file.isvalid=1 and parse.isvalid=1
         <if test="fundName != null and fundName !=''">
-            and (asset.fund_name like concat(#{fundName},'%') or asset.register_number like concat(#{fundName},'%') )
+            and asset.fund_name like concat(#{fundName},'%')
+        </if>
+        <if test="registerNumber != null and registerNumber !=''">
+            and asset.register_number like concat(#{registerNumber},'%')
         </if>
         <if test="priceStartDate != null and priceStartDate !=''">
             and asset.price_date >= #{priceStartDate}

+ 8 - 2
service-base/src/main/resources/mapper/EmailFundNavMapper.xml

@@ -71,7 +71,10 @@
                 on file.email_id = parse.id
         WHERE nav.isvalid = 1  and file.isvalid=1 and parse.isvalid=1
         <if test="fundName != null and fundName !=''">
-            and (nav.fund_name like concat(#{fundName},'%') or nav.register_number like concat(#{fundName},'%'))
+            and nav.fund_name like concat(#{fundName},'%')
+        </if>
+        <if test="registerNumber != null and registerNumber !=''">
+            and nav.register_number like concat(#{registerNumber},'%')
         </if>
         <if test="priceStartDate != null and priceStartDate !=''">
             and nav.price_date >= #{priceStartDate}
@@ -117,7 +120,10 @@
         on file.email_id = parse.id
         WHERE nav.isvalid = 1  and file.isvalid=1 and parse.isvalid=1
         <if test="fundName != null and fundName !=''">
-            and (nav.fund_name like concat(#{fundName},'%') or nav.register_number like concat(#{fundName},'%'))
+            and nav.fund_name like concat(#{fundName},'%')
+        </if>
+        <if test="registerNumber != null and registerNumber !=''">
+            and nav.register_number like concat(#{registerNumber},'%')
         </if>
         <if test="priceStartDate != null and priceStartDate !=''">
             and nav.price_date >= #{priceStartDate}

+ 8 - 2
service-base/src/main/resources/mapper/FundNavAssetMapper.xml

@@ -34,7 +34,10 @@
         WHERE info.isvalid = 1
         AND nav.isvalid = 1
         <if test="fundName != null and fundName !=''">
-            and (info.fund_name like concat(#{fundName},'%') or info.fund_short_name like concat(#{fundName},'%') or info.register_number like concat(#{fundName},'%'))
+            and info.fund_name like concat(#{fundName},'%')
+        </if>
+        <if test="registerNumber != null and registerNumber !=''">
+            and info.register_number like concat(#{registerNumber},'%')
         </if>
         <if test="priceStartDate != null and priceStartDate !=''">
             and (nav.price_date >= #{priceStartDate} or asset.price_date >= #{priceStartDate})
@@ -72,7 +75,10 @@
         WHERE info.isvalid = 1
         AND nav.isvalid = 1
         <if test="fundName != null and fundName !=''">
-            and (info.fund_name like concat(#{fundName},'%') or info.fund_short_name like concat(#{fundName},'%') or info.register_number like concat(#{fundName},'%'))
+            and info.fund_name like concat(#{fundName},'%')
+        </if>
+        <if test="registerNumber != null and registerNumber !=''">
+            and info.register_number like concat(#{registerNumber},'%')
         </if>
         <if test="priceStartDate != null and priceStartDate !=''">
             and (nav.price_date >= #{priceStartDate} or asset.price_date >= #{priceStartDate})