`id`,`order_number`,`tenant_id`,`parent_tenant_id`,`c_user_id`,`coupon_channel_id`,`product_id`,`type`,`pay_vendor`,`payment_type`,`payment`,`payment_time`,`freight_price`,`order_status`,`create_date`,`update_date`,`detail`,
`press_end_date`,`press_current_num`,`press_current_value`,`order_group_id`,`form_id`,`total_payment`,`compose_order_id`,`coupon_number`,`compose_order_type`,`shipping_type`,`shipping_address`,`parent_order_id`
where 1 = 1
and `id` = #{id}
and `order_number` = #{orderNumber}
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
and `c_user_id` = #{cUserId}
and `coupon_channel_id` = #{couponChannelId}
and `product_id` = #{productId}
and `type` = #{type}
and `pay_vendor` = #{payVendor}
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 `press_end_date` = #{pressEndDate}
and `press_current_num` = #{pressCurrentNum}
and `press_current_value` = #{pressCurrentValue}
and `order_group_id` = #{orderGroupId}
and `form_id` = #{formId}
and `compose_order_id` = #{composeOrderId}
and `compose_order_type` = #{composeOrderType}
and `shipping_type` = #{shippingType}
and `parent_order_id` = #{parentOrderId}
and `order_status` in
#{sItem}
and id in
#{idItem}
order by ${sortColumns}
o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_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.tail_price,c.orig_price,c.unit,c.detail,c.remark,c.valid_start_date,c.valid_end_date,c.pick_start_date,c.pick_end_date,c.gift_list,
co.id as coupon_order_id,co.coupon_order_status,c.support_transfer,c.subsidy_num,o.compose_order_type,o.compose_order_id,o.parent_order_id,
o.`coupon_number`,o.`freight_price`,o.`shipping_type`,o.`shipping_address`,co.`shipping_status`,co.`delivery_info`
update wx_order set order_status=#{orderStatus}
where product_id=#{productId}
and press_end_date is not null and order_status in (6,7)
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
update wx_order set order_status=#{orderStatus},update_date=#{updateDate}
where product_id=#{productId} and order_status in(10,15)
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
update wx_order set order_status=#{orderStatus},update_date=#{updateDate}
where coupon_channel_id=#{couponChannelId} and order_status in(10,15)
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_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.tail_price,c.orig_price,c.unit,c.valid_start_date,c.valid_end_date,c.pick_start_date,c.pick_end_date,
o.compose_order_type,o.compose_order_id,
o.`coupon_number`,o.`freight_price`,o.`shipping_type`,o.`shipping_address`,o.parent_order_id
o.`id`,o.`order_number`,o.`tenant_id`,o.`parent_tenant_id`,o.`c_user_id`,o.`coupon_channel_id`,o.`product_id`,o.`type`,o.`pay_vendor`,
o.`payment_type`,o.`payment`,o.`payment_time`,o.`freight_price`,o.`order_status`,o.`create_date`,o.`update_date`,o.`detail`,
m.name as merchant_name, bu.name, bu.phone as bphone,
cubi.phone, cubi.nick_name, cubi.name c_user_name
o.`id`,o.`order_number`,o.`tenant_id`,o.`c_user_id`,o.`coupon_channel_id`,o.`product_id`,o.`type`,o.`pay_vendor`,
o.`payment_type`,o.`payment`,o.`payment_time`,o.`freight_price`,o.`order_status`,o.`create_date`,o.`update_date`,o.`detail`,
m.name as merchant_name, bu.name, bu.phone as bphone,
cubi.phone, cubi.nick_name, cubi.name c_user_name,
po.id as pay_order_id, po.transaction_id
wm.id as id,
wm.tenant_id as tenant_id,
wm.parent_tenant_id as parent_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
o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.`freight_price`,o.order_status,
o.create_date,o.update_date,o.press_end_date,o.press_current_num,o.press_current_value,
c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.press_limit_num,
o.compose_order_type,o.`shipping_type`,o.`shipping_address`
o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.`freight_price`,o.order_status,
o.create_date,o.update_date,o.press_end_date,o.press_current_num,o.press_current_value,
c.type as coupon_type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.detail,c.remark,c.press_limit_num,
co.id as coupon_order_id,co.coupon_order_status
update wx_order set order_status=#{orderStatus}
where order_group_id=#{orderGroupId} and order_status=10
and `tenant_id` = #{tenantId}
and `parent_tenant_id` = #{parentTenantId}
update wx_order set order_status=12 where `type`=0 and tenant_id = #{tenantId} and order_status in(10,15) and now()>press_end_date
update wx_order set c_user_id= #{cUserId} where tenant_id = #{tenantId}
and id = #{id}
and id in
#{idItem}