liyong
2026-04-20 5bc029a31c4325d39f77fb6cb613a5e31df7ece3
Merge branch 'refs/heads/dev_New' into dev_New_pro
已修改2个文件
8 ■■■■■ 文件已修改
src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
@@ -187,6 +187,10 @@
        if (!salesLedgers.isEmpty()) {
            throw new RuntimeException("客户档案下有销售合同,请先删除销售合同");
        }
        List<CustomerPrivatePool> customerPrivatePools = customerPrivatePoolMapper.selectList(new QueryWrapper<CustomerPrivatePool>().lambda().in(CustomerPrivatePool::getCustomerId, idList));
        if (!customerPrivatePools.isEmpty()) {
            throw new RuntimeException("客户档案下有客户私海,请先收回私海数据");
        }
        //  删除客户的同时也需要删除对应的客户跟随、附件和回访提醒
        for (Long id : ids) {
            customerFollowUpService.deleteByCustomerId(id);
src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml
@@ -41,6 +41,10 @@
            <if test="c.customerType != null">
                and c.customer_type = #{c.customerType}
            </if>
            <if test="c.boundId != null">
                and cpp.boundId = #{c.boundId}
            </if>
        </where>
        order by cpp.id desc
    </select>