|
@@ -30,12 +30,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectNoticeDemandVo"/>
|
|
|
<where>
|
|
|
<if test="memberId != null "> and member_id = #{memberId}</if>
|
|
|
- <if test="purchaseTitle != null and purchaseTitle != ''"> and purchase_title = #{purchaseTitle} or purchase_title_en = #{purchaseTitle}</if>
|
|
|
- <if test="summaryOfNeeds != null and summaryOfNeeds != ''"> and summary_of_needs = #{summaryOfNeeds} or summary_of_needs_en = #{summaryOfNeeds}</if>
|
|
|
- <if test="demandDetails != null and demandDetails != ''"> and demand_details = #{demandDetails} or demand_details_en = #{demandDetails}</if>
|
|
|
- <if test="contacts != null and contacts != ''"> and contacts = #{contacts} or contacts_en = #{contacts}</if>
|
|
|
- <if test="contactNumber != null and contactNumber != ''"> and contact_number = #{contactNumber} or contact_number_en = #{contactNumber}</if>
|
|
|
- <if test="releaseTime != null "> and release_time = #{releaseTime} or release_time_en = #{releaseTime}</if>
|
|
|
+ <if test="purchaseTitle != null and purchaseTitle != ''"> and (purchase_title like concat('%', #{purchaseTitle}, '%') or purchase_title_en like concat('%', #{purchaseTitle}, '%'))</if>
|
|
|
+ <if test="summaryOfNeeds != null and summaryOfNeeds != ''"> and (summary_of_needs like concat('%', #{summaryOfNeeds}, '%') or summary_of_needs_en like concat('%', #{summaryOfNeeds}, '%'))</if>
|
|
|
+ <if test="demandDetails != null and demandDetails != ''"> and (demand_details = #{demandDetails} or demand_details_en = #{demandDetails})</if>
|
|
|
+ <if test="contacts != null and contacts != ''"> and (contacts like concat('%', #{contacts}, '%') or contacts_en like concat('%', #{contacts}, '%'))</if>
|
|
|
+ <if test="contactNumber != null and contactNumber != ''"> and (contact_number like concat('%', #{contactNumber}, '%') or contact_number_en like concat('%', #{contactNumber}, '%'))</if>
|
|
|
+ <if test="params.beginReleaseTime != null and params.beginReleaseTime != ''"><!-- 发布开始时间检索 -->
|
|
|
+ AND date_format(release_time,'%y%m%d') >= date_format(#{params.beginReleaseTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="params.endReleaseTime != null and params.endReleaseTime != ''"><!-- 发布结束时间检索 -->
|
|
|
+ AND date_format(release_time,'%y%m%d') <= date_format(#{params.endReleaseTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
</where>
|
|
|
</select>
|