Kaynağa Gözat

张丁 公司及培训模糊查询

zhangding 3 yıl önce
ebeveyn
işleme
6f3923130e

+ 3 - 3
master/src/main/resources/mybatis/training/TTrainingCompanylevelMapper.xml

@@ -30,9 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTTrainingCompanylevelVo"/>
         <where>  
             <if test="serialNum != null "> and serial_num = #{serialNum}</if>
-            <if test="courseCode != null  and courseCode != ''"> and course_code = #{courseCode}</if>
-            <if test="item != null  and item != ''"> and item = #{item}</if>
-            <if test="staffId != null  and staffId != ''"> and staff_id = #{staffId}</if>
+            <if test="courseCode != null  and courseCode != ''"> and course_code like concat(concat('%', #{courseCode}), '%')</if>
+            <if test="item != null  and item != ''"> and item like concat(concat('%', #{item}), '%')</if>
+            <if test="staffId!=null and staffId!= ''"> and staff_id like concat(concat('%', #{staffId}), '%')   </if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
             and d.del_flag = 0
         </where>