Prechádzať zdrojové kódy

小程序有效公告模糊搜索

njs 2 rokov pred
rodič
commit
c4bb2f19d7

+ 4 - 4
suishenbang-system/src/main/resources/mapper/system/SysRidingLanternMapper.xml

@@ -26,10 +26,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectSysRidingLanternVo"/>
         <where>  
             <if test="isDelete != null "> and is_delete = #{isDelete}</if>
-            <if test="content != null  and content != ''"> and content = #{content}</if>
-            <if test="startTime != null "> and start_time = #{startTime}</if>
-            <if test="endTime != null "> and end_time = #{endTime}</if>
-            <if test="userType != null  and userType != ''"> and user_type = #{userType}</if>
+            <if test="content != null  and content != ''"> and content like concat('%', #{content}, '%') </if>
+            <if test="startTime != null "> and start_time &gt;= #{startTime}</if>
+            <if test="endTime != null "> and end_time &lt; #{endTime}</if>
+            <if test="userType != null  and userType != ''"> and user_type like concat('%', #{userType}, '%') </if>
             <if test="tile != null  and tile != ''"> and tile = #{tile}</if>
         </where>
     </select>