Browse Source

查询条件

wangzhe 7 months ago
parent
commit
2f6eaa0e6d
1 changed files with 10 additions and 1 deletions
  1. 10 1
      ruoyi-yiqi/src/main/resources/mapper/YqGOtherEngineMapper.xml

+ 10 - 1
ruoyi-yiqi/src/main/resources/mapper/YqGOtherEngineMapper.xml

@@ -4,11 +4,20 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.yiqi.mapper.YqGOtherEngineMapper">
 
-    <select id="getList" resultType="com.ruoyi.yiqi.entity.YqGOtherEngine">
+    <select id="getList" parameterType="com.ruoyi.yiqi.entity.YqGOtherEngine" resultType="com.ruoyi.yiqi.entity.YqGOtherEngine">
         select *
         from yq_g_other_engine a
         <where>
             a.del_flag = '0'
+            <if test="p.engineType != null  and p.engineType != ''">
+                and a.engine_type = #{p.engineType}
+            </if>
+            <if test="p.name != null  and p.name != ''">
+                and a.name like concat('%', #{p.name}, '%')
+            </if>
+            <if test="p.status != null  and p.status != ''">
+                and a.status = #{p.status}
+            </if>
         </where>
     </select>