标签:技术 HERE ima cat ike company code flag payment
SELECT (@i :=@i + 1) AS number, x.uuid, x.payment_code, x.supplier_name, x.receive_money, x.is_export_flag, x.export_time, x.payer, x.region_name, x.user_name, x.marketer_id , x.region_id FROM ( SELECT DISTINCT a.uuid, a.payment_code, a.supplier_name, a.receive_money, IF ( is_export_flag = 0, ‘未导出‘, ‘已导出‘ ) AS is_export_flag, a.export_time, b.payer, d.region_name, GROUP_CONCAT(DISTINCT f.user_name) AS user_name, -- ( f.user_name )AS user_name, e.marketer_id, d.uuid as region_id FROM biz_lc_payment_info a, biz_lc_payment_invoice_info b LEFT JOIN biz_item_company c ON b.payer = c.item_company_name AND c.sys_status = 1 LEFT JOIN biz_item_region d ON c.region_id = d.uuid AND d.sys_status = 1 LEFT JOIN biz_link_marketer_region e ON e.region_id = d.uuid AND d.sys_status = 1 LEFT JOIN sys_user f ON e.marketer_id LIKE CONCAT(‘%‘, f.uuid, ‘%‘) AND f.sys_status = 1 WHERE a.payment_id = b.payment_id AND a.sys_status = 1 AND b.sys_status = 1 GROUP BY a.uuid ) x, (SELECT @i := 0) AS y WHERE -- x.marketer_id LIKE ‘%u1032%‘ x.is_export_flag = ‘已导出‘
标签:技术 HERE ima cat ike company code flag payment
原文地址:https://www.cnblogs.com/xiaowoniulx/p/11118996.html