Explorar el Código

feat: 别名匹配查询增加是否匹配条件

chenjianhua hace 7 meses
padre
commit
88137b696e

+ 15 - 1
service-base/src/main/java/com/simuwang/base/pojo/dto/query/FundAliasPageQuery.java

@@ -13,8 +13,14 @@ public class FundAliasPageQuery extends PageQuery {
      * 基金名称
      */
     private String fundName;
-
+    /**
+     * 基金别名
+     */
     private String fundAliasName;
+    /**
+     * 是否匹配基金
+     */
+    private Integer isMapping;
 
     public String getFundName() {
         return fundName;
@@ -31,4 +37,12 @@ public class FundAliasPageQuery extends PageQuery {
     public void setFundAliasName(String fundAliasName) {
         this.fundAliasName = fundAliasName;
     }
+
+    public Integer getIsMapping() {
+        return isMapping;
+    }
+
+    public void setIsMapping(Integer isMapping) {
+        this.isMapping = isMapping;
+    }
 }

+ 12 - 0
service-base/src/main/resources/mapper/FundAliasMapper.xml

@@ -58,6 +58,12 @@
         <if test="fundAliasName != null and fundAliasName !=''">
             and (target_fund_name like concat('%',#{fundAliasName},'%')  or target_register_number like concat('%',#{fundAliasName},'%') )
         </if>
+        <if test="isMapping != null and isMapping == 0">
+            and target_fund_id is null
+        </if>
+        <if test="isMapping != null and isMapping == 1">
+            and target_fund_id is not null
+        </if>
         order by updatetime desc
         limit #{offset},#{pageSize}
     </select>
@@ -70,6 +76,12 @@
         <if test="fundAliasName != null and fundAliasName !=''">
             and (target_fund_name like concat('%',#{fundAliasName},'%')  or target_register_number like concat('%',#{fundAliasName},'%') )
         </if>
+        <if test="isMapping != null and isMapping == 0">
+            and target_fund_id is null
+        </if>
+        <if test="isMapping != null and isMapping == 1">
+            and target_fund_id is not null
+        </if>
     </select>
     <select id="searchFundAliasById" resultType="com.simuwang.base.pojo.dos.FundAliasDO"
             parameterType="java.lang.Integer">