From f6bc245454a127e70bff6ddd56b9c66aed26b076 Mon Sep 17 00:00:00 2001
From: xiao-fajia <1665375861@qq.com>
Date: Thu, 15 Aug 2024 08:58:31 +0800
Subject: [PATCH] =?UTF-8?q?=E5=91=98=E5=B7=A5=E5=8A=A0=E8=A7=92=E8=89=B2?=
=?UTF-8?q?=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/staff/CompanyStaffMapper.xml | 83 +++++++++----------
1 file changed, 41 insertions(+), 42 deletions(-)
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'
-
-