|
@@ -66,11 +66,17 @@ FROM
|
|
|
<where>
|
|
|
<if test="typeId != null "> and n.type_id = #{typeId}</if>
|
|
|
<if test="merchantId != null "> and n.merchant_id = #{merchantId}</if>
|
|
|
- <if test="supplyTitle != null and supplyTitle != ''"> and n.supply_title = #{supplyTitle} or n.supply_title_en = #{supplyTitle}</if>
|
|
|
- <if test="manufacturer != null and manufacturer != ''"> and n.manufacturer = #{manufacturer} or n.manufacturer_en = #{manufacturer}</if>
|
|
|
- <if test="contacts != null and contacts != ''"> and n.contacts = #{contacts} or n.contacts_en = #{contacts}</if>
|
|
|
- <if test="telephone != null and telephone != ''"> and n.telephone = #{telephone} or n.telephone_en = #{telephone}</if>
|
|
|
+ <if test="supplyTitle != null and supplyTitle != ''"> and (n.supply_title like concat('%', #{supplyTitle}, '%') or n.supply_title_en like concat('%', #{supplyTitle}, '%'))</if>
|
|
|
+ <if test="manufacturer != null and manufacturer != ''"> and (n.manufacturer like concat('%', #{manufacturer}, '%') or n.manufacturer_en like concat('%', #{manufacturer}, '%'))</if>
|
|
|
+ <if test="contacts != null and contacts != ''"> and (n.contacts like concat('%', #{contacts}, '%') or n.contacts_en like concat('%', #{contacts}, '%'))</if>
|
|
|
+ <if test="telephone != null and telephone != ''"> and (n.telephone like concat('%', #{telephone}, '%') or n.telephone_en like concat('%', #{telephone}, '%'))</if>
|
|
|
<if test="status != null and status != ''"> and n.status = #{status}</if>
|
|
|
+ <if test="params.beginReleaseTime != null and params.beginReleaseTime != ''"><!-- 发布开始时间检索 -->
|
|
|
+ AND date_format(n.release_time,'%y%m%d') >= date_format(#{params.beginReleaseTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
+ <if test="params.endReleaseTime != null and params.endReleaseTime != ''"><!-- 发布结束时间检索 -->
|
|
|
+ AND date_format(n.release_time,'%y%m%d') <= date_format(#{params.endReleaseTime},'%y%m%d')
|
|
|
+ </if>
|
|
|
${params.dataScope}
|
|
|
</where>
|
|
|
|