diff --git a/dl-module-company/src/main/resources/mapper/staff/CompanyStaffMapper.xml b/dl-module-company/src/main/resources/mapper/staff/CompanyStaffMapper.xml index 4aed5a24..b4794795 100644 --- a/dl-module-company/src/main/resources/mapper/staff/CompanyStaffMapper.xml +++ b/dl-module-company/src/main/resources/mapper/staff/CompanyStaffMapper.xml @@ -25,45 +25,47 @@ - - SELECT cs.id AS cs_id, - cs.corp_id AS cs_corp_id, - cs.user_id AS cs_user_id, - cs.dept_id AS cs_dept_id, - cs.work_no AS cs_work_no, - cs.name AS cs_name, - cs.tel AS cs_tel, - cs.sex AS cs_sex, - cs.address AS cs_address, - cs.work_date AS cs_work_date, - cs.work_year AS cs_work_year, - cs.joined_date AS cs_joined_date, - cs.joined_year AS cs_joined_year, - cs.education AS cs_education, - cs.content AS cs_content, - cs.unique_code AS cs_unique_code, - cs.file_urls AS cs_file_urls, - rn.role_names AS role_names - FROM company_staff cs - LEFT JOIN - ( - SELECT cs.user_id, - sr.id, - GROUP_CONCAT(DISTINCT sr.name ORDER BY sr.name SEPARATOR ',') AS role_names - FROM company_staff cs - LEFT JOIN - system_user_role sur ON cs.user_id = sur.user_id - LEFT JOIN - system_role sr ON sur.role_id = sr.id - WHERE cs.deleted = '0' - AND sur.deleted = '0' - GROUP BY cs.user_id - ) rn ON cs.user_id = rn.user_id - WHERE cs.deleted = '0' - -