kb.id
,kb.`name`
,kb.ent_id
, kb.goods_type goodsType
, kb.spec
, kb.price
, kb.amount
, kb.contacts
, kb.phone
, kb.status
, kb.remark
, kb.create_time createTime
, kb.update_time updateTime
, kba.name addressName
, kba.city_name cityName
, kba.detail_address detailAddress
kb.del_flag = 0
and kb.ent_id in
#{item}
and kb.create_time >= #{wantBuyReq.startCreateTime,jdbcType=TIMESTAMP}
and kb.create_time <= #{wantBuyReq.endCreateTime,jdbcType=TIMESTAMP}
AND EXISTS (
SELECT 1
FROM kwo_want_buy_trading kt2
WHERE kt2.want_buy_id = kb.id
AND kt2.trading = #{value}
)
and kb.id in
#{item,jdbcType=BIGINT}
and kb.status = #{wantBuyReq.status}
and kb.ent_id = #{wantBuyReq.entId}
and (kb.ent_id in
#{item,jdbcType=BIGINT}
or kb.`name` like concat('%', #{wantBuyReq.keywords,jdbcType=VARCHAR}, '%')
)
and (kb.`name` like concat('%', #{wantBuyReq.keywords,jdbcType=VARCHAR}, '%'))
and kb.goods_type in
#{item}
and (kba.`city_code` like concat(#{wantBuyReq.cityCode,jdbcType=VARCHAR}, '%'))
and kb.status in (1,2)
kb.del_flag = 0
and kb.create_time >= #{wantBuyReq.startCreateTime,jdbcType=TIMESTAMP}
and kb.create_time <= #{wantBuyReq.endCreateTime,jdbcType=TIMESTAMP}
AND EXISTS (
SELECT 1
FROM kwo_want_buy_trading kt2
WHERE kt2.want_buy_id = kb.id
AND kt2.trading = #{value}
)
and kb.id in
#{item,jdbcType=BIGINT}
and kb.status = #{wantBuyReq.status}
and kb.ent_id = #{wantBuyReq.entId}
and (kb.ent_id in
#{item,jdbcType=BIGINT}
or kb.`name` like concat('%', #{wantBuyReq.keywords,jdbcType=VARCHAR}, '%')
)
and (kb.`name` like concat('%', #{wantBuyReq.keywords,jdbcType=VARCHAR}, '%'))
and kb.goods_type in
#{item}
and (kba.`city_code` like concat(#{wantBuyReq.cityCode,jdbcType=VARCHAR}, '%'))
and kb.status in (1,2)
and kb.ent_id in
#{item,jdbcType=BIGINT}