`id`,`order_number`,`tenant_id`,`c_user_id`,`product_id`,`type`,`payment_type`,`payment`,`payment_time`,`order_status`,`create_date`,`update_date`,`detail` where 1 = 1 and `id` = #{id} and `order_number` = #{orderNumber} and `tenant_id` = #{tenantId} and `c_user_id` = #{cUserId} and `product_id` = #{productId} and `type` = #{type} and `payment_type` = #{paymentType} and `payment` = #{payment} and `payment_time` = #{paymentTime} and `order_status` = #{orderStatus} and `create_date` = #{createDate} and `update_date` = #{updateDate} and `detail` like concat('%', #{detail},'%') and id in #{idItem} order by ${sortColumns} o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, c.type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.detail,c.remark, co.id as coupon_order_id,co.coupon_order_status o.`id`,o.`order_number`,o.`tenant_id`,o.`c_user_id`,o.`product_id`,o.`type`, o.`payment_type`,o.`payment`,o.`payment_time`,o.`order_status`,o.`create_date`,o.`update_date`,o.`detail`, m.name as merchant_name, bu.name, bu.phone as bphone, cu.phone,cu.c_user_name wm.id as id, wm.tenant_id as tenant_id, wm.name as merchant_name, wm.link_phone as merchant_phone, mo.xTime as report_date, (case when mo.amount > 0 then mo.amount else 0 end) trade_amt