From 7dbe348fa7fd4c24d2111b7bd6c41ec76192a50a Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期四, 07 五月 2026 18:02:16 +0800
Subject: [PATCH] feat(customer-contact): 修改客户联系人删除接口支持批量删除
---
src/main/resources/mapper/basic/CustomerContactMapper.xml | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/basic/CustomerContactMapper.xml b/src/main/resources/mapper/basic/CustomerContactMapper.xml
new file mode 100644
index 0000000..c680e53
--- /dev/null
+++ b/src/main/resources/mapper/basic/CustomerContactMapper.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.basic.mapper.CustomerContactMapper">
+
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="BaseResultMap" type="com.ruoyi.basic.pojo.CustomerContact">
+ <id column="id" property="id" />
+ <result column="contact_person" property="contactPerson" />
+ <result column="contact_phone" property="contactPhone" />
+ <result column="customer_id" property="customerId" />
+ <result column="dept_id" property="deptId" />
+ <result column="create_user" property="createUser" />
+ <result column="create_time" property="createTime" />
+ <result column="update_user" property="updateUser" />
+ <result column="update_time" property="updateTime" />
+ <result column="remark" property="remark" />
+ <result column="del_flag" property="delFlag" />
+ </resultMap>
+ <select id="listPage" resultType="com.ruoyi.basic.dto.CustomerContactDto">
+ select * from (
+ SELECT
+ c.*,
+ (
+ SELECT GROUP_CONCAT(ci.customer_name SEPARATOR ',')
+ FROM customer ci
+ WHERE FIND_IN_SET(ci.id, c.customer_id)
+ ) AS customer_names
+ FROM customer_contact c
+ ) as cc
+ <where>
+ cc.del_flag = 0
+ <if test="customerContactDto.contactPerson != null and customerContactDto.contactPerson !=''">
+ and cc.contact_person like concat('%',#{customerContactDto.contactPerson},'%')
+ </if>
+ <if test="customerContactDto.contactPhone != null and 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