| 对比新文件 |
| | |
| | | <?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> |