aa
This commit is contained in:
@@ -780,8 +780,8 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
|
|||||||
t5.pay_percentage, t5.old_pay_percentage, t5.market_man_phone, tu.name market_man_name,
|
t5.pay_percentage, t5.old_pay_percentage, t5.market_man_phone, tu.name market_man_name,
|
||||||
t5.operator_phone, t5.operator_phone2, t5.operator_phone3, tu1.name operator_name, tu2.name operator_name2, tu3.name operator_name3,
|
t5.operator_phone, t5.operator_phone2, t5.operator_phone3, tu1.name operator_name, tu2.name operator_name2, tu3.name operator_name3,
|
||||||
t6.vendor_pay_percentage,
|
t6.vendor_pay_percentage,
|
||||||
city.name city_name, district.name district_name,
|
city.name city_name, district.name district_name
|
||||||
ROUND(IF(t1.earning_type = 1, t1.total_shop_money-t1.earning_price-IFNULL(t2.desired_fee,0), t1.total_shop_money *(t1.order_pay_percentage/2)/100)) jx_income`, model.DefaultEarningPricePercentage)
|
-- ROUND(IF(t1.earning_type = 1, t1.total_shop_money-t1.earning_price-IFNULL(t2.desired_fee,0), t1.total_shop_money *(t1.order_pay_percentage/2)/100)) jx_income`, model.DefaultEarningPricePercentage)
|
||||||
if isIncludeSku {
|
if isIncludeSku {
|
||||||
sql += `,
|
sql += `,
|
||||||
IF(t3.jx_sku_id > 0, t3.jx_sku_id, t3.sku_id) sku_id,
|
IF(t3.jx_sku_id > 0, t3.jx_sku_id, t3.sku_id) sku_id,
|
||||||
@@ -802,8 +802,8 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
|
|||||||
LEFT JOIN user tu1 ON tu1.mobile = t5.operator_phone
|
LEFT JOIN user tu1 ON tu1.mobile = t5.operator_phone
|
||||||
LEFT JOIN user tu2 ON tu2.mobile = t5.operator_phone2
|
LEFT JOIN user tu2 ON tu2.mobile = t5.operator_phone2
|
||||||
LEFT JOIN user tu3 ON tu3.mobile = t5.operator_phone3
|
LEFT JOIN user tu3 ON tu3.mobile = t5.operator_phone3
|
||||||
LEFT JOIN (SELECT MAX(created_at), afs_order_id, vendor_order_id, vendor_id FROM afs_order WHERE status = 180 GROUP BY 2, 3, 4) t7 ON t7.vendor_order_id = t1.vendor_order_id AND t7.vendor_id = t1.vendor_id
|
-- LEFT JOIN (SELECT MAX(created_at), afs_order_id, vendor_order_id, vendor_id FROM afs_order WHERE status = 180 GROUP BY 2, 3, 4) t7 ON t7.vendor_order_id = t1.vendor_order_id AND t7.vendor_id = t1.vendor_id
|
||||||
LEFT JOIN afs_order t8 ON t8.afs_order_id = t7.afs_order_id
|
-- LEFT JOIN afs_order t8 ON t8.afs_order_id = t7.afs_order_id
|
||||||
`
|
`
|
||||||
if isIncludeSku {
|
if isIncludeSku {
|
||||||
sql += `
|
sql += `
|
||||||
|
|||||||
Reference in New Issue
Block a user