From 474ddd0b76f343b09038e6f60e2826684d5eecd2 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期五, 08 五月 2026 13:32:57 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_浪潮_pro' into dev_浪潮_pro
---
src/main/resources/mapper/basic/CustomerContactMapper.xml | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/main/resources/mapper/basic/CustomerContactMapper.xml b/src/main/resources/mapper/basic/CustomerContactMapper.xml
index 8a184e4..c680e53 100644
--- a/src/main/resources/mapper/basic/CustomerContactMapper.xml
+++ b/src/main/resources/mapper/basic/CustomerContactMapper.xml
@@ -17,22 +17,28 @@
<result column="del_flag" property="delFlag" />
</resultMap>
<select id="listPage" resultType="com.ruoyi.basic.dto.CustomerContactDto">
+ select * from (
SELECT
- cc.*,
+ c.*,
(
SELECT GROUP_CONCAT(ci.customer_name SEPARATOR ',')
FROM customer ci
- WHERE FIND_IN_SET(ci.id, cc.customer_id)
+ WHERE FIND_IN_SET(ci.id, c.customer_id)
) AS customer_names
- FROM customer_contact cc
+ FROM customer_contact c
+ ) as cc
<where>
cc.del_flag = 0
<if test="customerContactDto.contactPerson != null and customerContactDto.contactPerson !=''">
- and cc.contact_person = #{customerContactDto.contactPerson}
+ and cc.contact_person like concat('%',#{customerContactDto.contactPerson},'%')
</if>
<if test="customerContactDto.contactPhone != null and customerContactDto.contactPhone !=''">
- and cc.contact_phone = #{customerContactDto.contactPhone}
+ and cc.contact_phone like concat('%',#{customerContactDto.contactPhone},'%')
</if>
+ <if test="customerContactDto.customerId != null and customerContactDto.customerId !=''">
+ and FIND_IN_SET(#{customerContactDto.customerId}, cc.customer_id)
+ </if>
+
</where>
</select>
</mapper>
--
Gitblit v1.9.3