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} ))
</if>
<iftest="query.customsType != null">
AND o.`customs_type` = #{query.customsType}
<!-- <if test="query.customsType != null">-->
<!-- AND o.`customs_type` = #{query.customsType}-->
<!-- </if>-->
<iftest="query.customsType != null and query.customsType.size()>0">
<iftest="query.customsType != null and query.customsType != '' and query.customsType.size()==1 ">
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} ))
</if>
<iftest ="query.customsType != null">
AND o.`customs_type` = #{query.customsType}
<!-- <if test = "query.customsType != null">-->
<!-- AND o.`customs_type` = #{query.customsType}-->
<!-- </if>-->
<iftest="query.customsType != null and query.customsType.size()>0">
<iftest="query.customsType != null and query.customsType != '' and query.customsType.size()==1 ">