`id`,`order_number`,`tenant_id`,`c_user_id`,`merchant_id`,`b_user_id`,`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 `merchant_id` = #{merchantId}
and `b_user_id` = #{bUserId}
and `coupon_id` = #{couponId}
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.merchant_id,o.b_user_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date,
co.cover_img,co.title,co.sub_title,co.sale_price,co.use_price,co.price,
m.name
o.id,o.order_number,o.tenant_id,o.c_user_id,o.merchant_id,o.b_user_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date,
co.type,co.cover_img,co.title,co.sub_title,co.sale_price,co.use_price,co.price,co.detail,co.remark,
m.img_url,m.name,m.link_phone,m.status,
s.addr,s.shop_number,s.baidu_poi,
mb.building_name,mf.floor_name,
c.id as coupon_order_id,c.coupon_order_status