管理员账号登录时可以查看所有内容(例如业务员a,b,c三个负责的所有客户内容),业务员登录的时候只可以看到12121负责的客户内容 这个在数据集总怎么合并怎么写,麻烦各位大佬谢谢 -- 管理员登录的时候显示获取这段sql SELECT DISTINCT comp_id,type FROM ( SELECT pur,type FROM a WHERE type=1 and acctid = 'admin'-- '${fine_username}' ) a INNER JOIN ( SELECT DISTINCT comp_id,comp_name,com_id FROM b WHERE com_id NOT IN (SELECT cus_code FROM c) ) b ON a.pur = b.com_id OR a.pur='-1' -- 业务员登录的时候获取这一段sql SELECT DISTINCT comp_id,type FROM ( SELECT pur,type FROM a WHERE (type = 7) and acctid = '12121'-- '${fine_username}' ) a INNER JOIN ( SELECT DISTINCT comp_id,com_id FROM b WHERE com_id NOT IN (SELECT cus_code FROM c) ) b ON a.pur = b.comp_id |