From 72076b86780981136dde2a3faf16c7446f59669d Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期二, 12 五月 2026 17:18:40 +0800
Subject: [PATCH] feat(customer): 添加客户档案联系人管理功能
---
src/main/resources/mapper/basic/CustomerMapper.xml | 37 +++++++++++++++++++++++++++++++++++--
1 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/basic/CustomerMapper.xml b/src/main/resources/mapper/basic/CustomerMapper.xml
index 57dea6c..cf14e28 100644
--- a/src/main/resources/mapper/basic/CustomerMapper.xml
+++ b/src/main/resources/mapper/basic/CustomerMapper.xml
@@ -8,7 +8,30 @@
</resultMap>
<select id="listPage" resultType="com.ruoyi.basic.vo.CustomerVo">
select
- c.*,
+ c.id,
+ c.customer_name,
+ c.customer_type,
+ c.taxpayer_identification_number,
+ c.company_address,
+ c.company_phone,
+ (
+ select group_concat(cc.contact_person separator ',')
+ from customer_contact cc
+ where find_in_set(c.id, cc.customer_id)
+ ) as contact_person,
+ (
+ select group_concat(cc.contact_phone separator ',')
+ from customer_contact cc
+ where find_in_set(c.id, cc.customer_id)
+ ) as contact_phone,
+ c.maintainer,
+ c.maintenance_time,
+ c.tenant_id,
+ c.type,
+ c.is_assigned,
+ c.usage_user,
+ c.basic_bank_account,
+ c.bank_account,
u.user_name usage_user_name,
(
select group_concat(u2.user_name separator ', ')
@@ -57,6 +80,16 @@
<select id="list" resultType="com.ruoyi.basic.vo.CustomerVo">
select
c.*,
+ (
+ select group_concat(cc.contact_person separator ',')
+ from customer_contact cc
+ where find_in_set(c.id, cc.customer_id)
+ ) as contact_person,
+ (
+ select group_concat(cc.contact_phone separator ',')
+ from customer_contact cc
+ where find_in_set(c.id, cc.customer_id)
+ ) as contact_phone,
u.user_name usage_user_name,
(
select group_concat(u2.user_name separator ', ')
@@ -107,4 +140,4 @@
</if>
</where>
</select>
-</mapper>
\ No newline at end of file
+</mapper>
--
Gitblit v1.9.3