|
@@ -18,16 +18,15 @@
|
|
i.`register_phone` as registerPhone,
|
|
i.`register_phone` as registerPhone,
|
|
i.`bank_name` as bankName,
|
|
i.`bank_name` as bankName,
|
|
i.`bank_account` as bankAccount,
|
|
i.`bank_account` as bankAccount,
|
|
- re.`ship_name` as shipName,
|
|
|
|
- re.`ship_mobile` as shipMobile,
|
|
|
|
- re.`ship_address` as shipAddress,
|
|
|
|
|
|
+ i.`ship_name` as shipName,
|
|
|
|
+ i.`ship_mobile` as shipMobile,
|
|
|
|
+ i.`ship_address` as shipAddress,
|
|
i.`email_address` AS email,
|
|
i.`email_address` AS email,
|
|
- i.`invoiced`
|
|
|
|
|
|
+ i.`invoiced`,
|
|
|
|
+ i.`user_id` as userId
|
|
FROM t_invoice i
|
|
FROM t_invoice i
|
|
LEFT JOIN t_order o ON i.`order_id` = o.`id`
|
|
LEFT JOIN t_order o ON i.`order_id` = o.`id`
|
|
- left join t_receiver_info re on i.user_id = re.user_id
|
|
|
|
WHERE i.`consume_type` = 0 AND i.`rec_status` = 'A' AND o.`rec_status` = 'A' AND i.`type` != 1
|
|
WHERE i.`consume_type` = 0 AND i.`rec_status` = 'A' AND o.`rec_status` = 'A' AND i.`type` != 1
|
|
- and re.rec_status = 'A'
|
|
|
|
<if test="param.orderSn != null and param.orderSn != ''">
|
|
<if test="param.orderSn != null and param.orderSn != ''">
|
|
and o.`order_sn` like concat('%', #{param.orderSn}, '%')
|
|
and o.`order_sn` like concat('%', #{param.orderSn}, '%')
|
|
</if>
|
|
</if>
|
|
@@ -64,8 +63,9 @@
|
|
i.`ship_mobile` AS shipMobile,
|
|
i.`ship_mobile` AS shipMobile,
|
|
i.`ship_address` AS shipAddress,
|
|
i.`ship_address` AS shipAddress,
|
|
i.`email_address` AS email,
|
|
i.`email_address` AS email,
|
|
- i.`invoiced`
|
|
|
|
- FROM t_invoice i
|
|
|
|
|
|
+ i.`invoiced`,
|
|
|
|
+ i.`user_id` as userId
|
|
|
|
+ FROM t_invoice i
|
|
LEFT JOIN t_increment_order o ON i.`increment_order_id` = o.`id`
|
|
LEFT JOIN t_increment_order o ON i.`increment_order_id` = o.`id`
|
|
WHERE i.`consume_type` = 2 AND i.`rec_status` = 'A' AND o.`rec_status` = 'A' AND i.`type` != 1
|
|
WHERE i.`consume_type` = 2 AND i.`rec_status` = 'A' AND o.`rec_status` = 'A' AND i.`type` != 1
|
|
<if test="param.orderSn != null and param.orderSn != ''">
|
|
<if test="param.orderSn != null and param.orderSn != ''">
|
|
@@ -104,8 +104,9 @@
|
|
i.`ship_mobile` AS shipMobile,
|
|
i.`ship_mobile` AS shipMobile,
|
|
i.`ship_address` AS shipAddress,
|
|
i.`ship_address` AS shipAddress,
|
|
i.`email_address` AS email,
|
|
i.`email_address` AS email,
|
|
- i.`invoiced`
|
|
|
|
- FROM t_invoice i
|
|
|
|
|
|
+ i.`invoiced`,
|
|
|
|
+ i.`user_id` as userId
|
|
|
|
+ FROM t_invoice i
|
|
LEFT JOIN t_download_order o ON i.`download_order_id` = o.`id`
|
|
LEFT JOIN t_download_order o ON i.`download_order_id` = o.`id`
|
|
WHERE i.`consume_type` = 3 AND i.`rec_status` = 'A' AND o.`rec_status` = 'A' AND i.`type` != 1
|
|
WHERE i.`consume_type` = 3 AND i.`rec_status` = 'A' AND o.`rec_status` = 'A' AND i.`type` != 1
|
|
<if test="param.orderSn != null and param.orderSn != ''">
|
|
<if test="param.orderSn != null and param.orderSn != ''">
|