SELECT '=== SUPPLIER USER LINK ===' AS '';
SELECT s.supplier_id, s.supplier_name, u.user_name, u.nick_name
FROM biz_supplier s JOIN sys_user u ON s.user_id = u.user_id
ORDER BY s.supplier_id;

SELECT '=== SUPPLIER ROLE ===' AS '';
SELECT r.role_id, r.role_name, r.role_key FROM sys_role r WHERE r.role_id=3;

SELECT '=== SUPPLIER MENUS ===' AS '';
SELECT m.menu_id, m.menu_name, m.parent_id, m.perms FROM sys_menu m WHERE m.menu_id >= 2100 ORDER BY m.menu_id;

SELECT '=== ROLE-MENU COUNT ===' AS '';
SELECT COUNT(*) AS cnt FROM sys_role_menu WHERE role_id=3;

SELECT '=== USER-ROLE COUNT ===' AS '';
SELECT COUNT(*) AS cnt FROM sys_user_role WHERE role_id=3;
