varsqlselect="select t1.platform_type,t1.website,t1.origin_order_id,t1.seller_account,t1.amount_refund,(t1.seller_order_exchange_rate*t1.amount_refund) as refundrmb,t1.refund_time,t1.refund_reference_id from dc_base_oms_order t1 ";
varsql=" where ((t1.platform_type!='FBA' and t1.bailun_order_status!='CantHandle') or t1.platform_type='FBA') and t1.amount_refund>0 ";
varsql=" where t1.amount_refund>0 ";
if(paytimestart.HasValue||paytimeend.HasValue)
{
sql+=" and t1.bailun_order_status!='Canceled' and t1.has_scalp=0 and t1.has_innersale=0 and t1.bailun_interception_status in ('None','Failed') ";