关于模糊查询和精确搜索 mybits特性

<select id="selectAllmsgByParam" resultType="com.casom.car.pojo.membersugess.MemberSuggest"  parameterType="com.casom.common.PageParam">
      SELECT
		id,
		title,
		content,
		create_date AS createDate,
		update_date AS updateDate
	FROM
		member_suggest
	<where>
			is_delete = 0
		 <if test="params != null " >
		    <if test="params.id != null and params.id != ''">
    		AND id =#{params.id}
    		</if>
    		<if test="params.title != null and params.title != ''">
    		AND title   LIKE '%${params.title}%' 
    		</if>
    		<if test="params.content != null and params.content !=''">
    		AND  content LIKE '%${params.content}%' 
    		</if>
	    </if>
	</where>
	ORDER BY
	create_date DESC
  </select>

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_32521313/article/details/79960764
个人分类: Mysql JAVA
上一篇大数据链接
下一篇Jsp ueditor的反显
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭