<iftest="query.salesmanId != null and query.creator">
AND (o.`salesman_id` = #{query.salesmanId} or o.`customer_id` in(select cus.id from ecw_customer cus where cus.is_customer_service_confirmed = 1 and cus.customer_service = #{query.salesmanId} ) or o.`creator` = #{query.creator})
</if>
<!-- <if test="query.customsType != null">-->
<!-- AND o.`customs_type` = #{query.customsType}-->
<!-- </if>-->
<!-- <if test="query.productRecord != null">-->
<!-- AND o.`product_record` = #{query.productRecord}-->
<!-- </if>-->
<iftest="query.customsType != null and query.customsType.size()>0">
<iftest="query.customsType != null and query.customsType != '' and query.customsType.size()==1 ">