浏览代码

小程序有效公告模糊搜索

njs 2 年之前
父节点
当前提交
c4bb2f19d7
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      suishenbang-system/src/main/resources/mapper/system/SysRidingLanternMapper.xml

+ 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>