|
@@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
a.create_by as createBy, a.update_by as updateBy, a.cancel_time as cancelTime, b.name as categoryName
|
|
|
from info_content a left join info_category b on a.category_id = b.id
|
|
|
<where>
|
|
|
- <if test="title != null and title != ''"> and a.title = #{title}</if>
|
|
|
+ <if test="title != null and title != ''"> and a.title like concat('%',#{title},'%')</if>
|
|
|
<if test="categoryId != null "> and a.category_id = #{categoryId}</if>
|
|
|
<if test="source != null and source != ''"> and a.source = #{source}</if>
|
|
|
<if test="checkStatus != null and checkStatus != ''"> and a.check_status = #{checkStatus}</if>
|
|
@@ -65,6 +65,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="content != null and content != ''"> and a.content = #{content}</if>
|
|
|
<if test="banner != null and banner != ''"> and a.banner = #{banner}</if>
|
|
|
<if test="cancelTime != null "> and a.cancel_time = #{cancelTime}</if>
|
|
|
+ <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
|
+ and date_format(a.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
|
+ and date_format(a.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="params.beginupdateTime != null and params.beginupdateTime != ''"><!-- 开始时间检索 -->
|
|
|
+ and date_format(a.update_time,'%y%m%d') >= date_format(#{params.beginupdateTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="params.endupdateTime != null and params.endupdateTime != ''"><!-- 结束时间检索 -->
|
|
|
+ and date_format(a.update_time,'%y%m%d') <= date_format(#{params.endupdateTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|