You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
2.4 KiB
44 lines
2.4 KiB
4 years ago
|
<?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.daqing.financial.crms.dao.CompanyCustomerDao">
|
||
|
|
||
|
<!-- 可根据自己的需求,是否要使用 -->
|
||
|
<resultMap type="com.daqing.framework.domain.crms.CompanyCustomerEntity" id="companyCustomerMap">
|
||
|
<result property="id" column="id"/>
|
||
|
<result property="registeredCapital" column="registered_capital"/>
|
||
|
<result property="industry" column="industry"/>
|
||
|
<result property="years" column="years"/>
|
||
|
<result property="region" column="region"/>
|
||
|
<result property="shareholder" column="shareholder"/>
|
||
|
<result property="affiliatedCompany" column="affiliated_company"/>
|
||
|
<result property="empNum" column="emp_num"/>
|
||
|
<result property="linkman" column="linkman"/>
|
||
|
<result property="businessSource" column="business_source"/>
|
||
|
<result property="customerId" column="customer_id"/>
|
||
|
</resultMap>
|
||
|
|
||
|
<!-- 根据客户基本信息id查询企业类型客户的信息 -->
|
||
|
<select id="queryCompanyCustomerById" parameterType="long" resultType="com.daqing.framework.domain.crms.CompanyCustomerEntity">
|
||
|
SELECT registered_capital,industry,years,region,shareholder,affiliated_company,emp_num,linkman,business_source
|
||
|
FROM crms_company_customer
|
||
|
WHERE customer_id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<!-- 插入企业类型客户信息 -->
|
||
|
<insert id="saveCompanyCustomer" parameterType="com.daqing.framework.domain.crms.CompanyCustomerEntity">
|
||
|
INSERT INTO crms_company_customer
|
||
|
(id,registered_capital,industry,years,region,shareholder,affiliated_company,emp_num,linkman,business_source,customer_id)
|
||
|
values (#{id},#{registeredCapital},#{industry},#{years},#{region},#{shareholder},#{affiliatedCompany},#{empNum},#{linkman},
|
||
|
#{businessSource},#{customerId});
|
||
|
</insert>
|
||
|
|
||
|
<!-- 更新企业类型客户信息 -->
|
||
|
<update id="updateCompanyCustomer" parameterType="com.daqing.framework.domain.crms.CompanyCustomerEntity">
|
||
|
UPDATE crms_company_customer
|
||
|
SET registered_capital=#{registeredCapital},industry=#{industry},years=#{years},region=#{region},shareholder=#{shareholder},
|
||
|
affiliated_company=#{affiliatedCompany},emp_num=#{empNum},linkman=#{linkman},business_source=#{businessSource}
|
||
|
WHERE customer_id = #{customerId}
|
||
|
</update>
|
||
|
|
||
|
</mapper>
|