From d697e4fa4468a803d97905164da5cbdded859858 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期一, 20 四月 2026 10:46:11 +0800
Subject: [PATCH] Merge branch 'refs/heads/dev_New' into dev_西宁_湟水峡
---
src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 101 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml b/src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml
new file mode 100644
index 0000000..c35006c
--- /dev/null
+++ b/src/main/resources/mapper/basic/CustomerPrivatePoolMapper.xml
@@ -0,0 +1,101 @@
+<?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.CustomerPrivatePoolMapper">
+
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="BaseResultMap" type="com.ruoyi.basic.pojo.CustomerPrivatePool">
+ <id column="id" property="id" />
+ <result column="customer_id" property="customerId" />
+ <result column="bound_id" property="boundId" />
+ <result column="create_user" property="createUser" />
+ <result column="update_user" property="updateUser" />
+ <result column="create_time" property="createTime" />
+ <result column="update_time" property="updateTime" />
+ </resultMap>
+ <select id="listPage" resultType="com.ruoyi.basic.dto.CustomerPrivatePoolDto">
+ select cpp.id,
+ cpp.bound_id,
+ cpp.type,
+ coalesce(c.id, cp.id) as customer_id,
+ coalesce(c.customer_name, cp.customer_name) as customer_name,
+ coalesce(c.customer_type, cp.customer_type) as customer_type,
+ coalesce(c.taxpayer_identification_number, cp.taxpayer_identification_number) as taxpayer_identification_number,
+ coalesce(c.company_address, cp.company_address) as company_address,
+ coalesce(c.company_phone, cp.company_phone) as company_phone,
+ coalesce(c.contact_person, cp.contact_person) as contact_person,
+ coalesce(c.contact_phone, cp.contact_phone) as contact_phone,
+ coalesce(c.maintainer, cp.maintainer) as maintainer,
+ coalesce(c.maintenance_time, cp.maintenance_time) as maintenance_time,
+ coalesce(c.tenant_id, cp.tenant_id) as tenant_id,
+ coalesce(c.basic_bank_account, cp.basic_bank_account) as basic_bank_account,
+ coalesce(c.bank_account, cp.bank_account) as bank_account,
+ coalesce(c.bank_code, cp.bank_code) as bank_code
+ from customer_private_pool cpp
+ left join customer c on c.id = cpp.customer_id and cpp.type = 1
+ left join customer_private cp on cp.id = cpp.customer_id and cpp.type = 0
+ <where>
+ cpp.delete_flag = 0
+ <if test="c.customerName != null and c.customerName != ''">
+ and (c.customer_name like concat('%', #{c.customerName}, '%') or cp.customer_name like concat('%', #{c.customerName}, '%'))
+ </if>
+ <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>
+ <select id="selectInfo" resultType="com.ruoyi.basic.dto.CustomerPrivatePoolDto">
+ select cpp.id,
+ cpp.bound_id,
+ cpp.type,
+ coalesce(c.id, cp.id) as customer_id,
+ coalesce(c.customer_name, cp.customer_name) as customer_name,
+ coalesce(c.customer_type, cp.customer_type) as customer_type,
+ coalesce(c.taxpayer_identification_number, cp.taxpayer_identification_number) as taxpayer_identification_number,
+ coalesce(c.company_address, cp.company_address) as company_address,
+ coalesce(c.company_phone, cp.company_phone) as company_phone,
+ coalesce(c.contact_person, cp.contact_person) as contact_person,
+ coalesce(c.contact_phone, cp.contact_phone) as contact_phone,
+ coalesce(c.maintainer, cp.maintainer) as maintainer,
+ coalesce(c.maintenance_time, cp.maintenance_time) as maintenance_time,
+ coalesce(c.tenant_id, cp.tenant_id) as tenant_id,
+ coalesce(c.basic_bank_account, cp.basic_bank_account) as basic_bank_account,
+ coalesce(c.bank_account, cp.bank_account) as bank_account,
+ coalesce(c.bank_code, cp.bank_code) as bank_code
+ from customer_private_pool cpp
+ left join customer c on c.id = cpp.customer_id and cpp.type = 1
+ left join customer_private cp on cp.id = cpp.customer_id and cpp.type = 0
+ <where>
+ <if test="id != null">
+ and cpp.id = #{id}
+ </if>
+ </where>
+ </select>
+ <select id="selectInfos" resultType="com.ruoyi.basic.dto.CustomerPrivatePoolDto">
+ select cpp.id,
+ cpp.bound_id,
+ cpp.type,
+ coalesce(c.id, cp.id) as customer_id,
+ coalesce(c.customer_name, cp.customer_name) as customer_name,
+ coalesce(c.customer_type, cp.customer_type) as customer_type,
+ coalesce(c.taxpayer_identification_number, cp.taxpayer_identification_number) as taxpayer_identification_number,
+ coalesce(c.company_address, cp.company_address) as company_address,
+ coalesce(c.company_phone, cp.company_phone) as company_phone,
+ coalesce(c.contact_person, cp.contact_person) as contact_person,
+ coalesce(c.contact_phone, cp.contact_phone) as contact_phone,
+ coalesce(c.maintainer, cp.maintainer) as maintainer,
+ coalesce(c.maintenance_time, cp.maintenance_time) as maintenance_time,
+ coalesce(c.tenant_id, cp.tenant_id) as tenant_id,
+ coalesce(c.basic_bank_account, cp.basic_bank_account) as basic_bank_account,
+ coalesce(c.bank_account, cp.bank_account) as bank_account,
+ coalesce(c.bank_code, cp.bank_code) as bank_code
+ from customer_private_pool cpp
+ left join customer c on c.id = cpp.customer_id and cpp.type = 1
+ left join customer_private cp on cp.id = cpp.customer_id and cpp.type = 0
+ </select>
+
+</mapper>
--
Gitblit v1.9.3