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.
57 lines
3.5 KiB
57 lines
3.5 KiB
<?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.PersonalCustomerDao"> |
|
|
|
<!-- 可根据自己的需求,是否要使用 --> |
|
<resultMap type="com.daqing.framework.domain.crms.PersonalCustomerEntity" id="personalCustomerMap"> |
|
<result property="id" column="id"/> |
|
<result property="customerId" column="customer_id"/> |
|
<result property="idCard" column="id_card"/> |
|
<result property="age" column="age"/> |
|
<result property="gender" column="gender"/> |
|
<result property="maritalStatus" column="marital_status"/> |
|
<result property="education" column="education"/> |
|
<result property="employer" column="employer"/> |
|
<result property="position" column="position"/> |
|
<result property="workingYears" column="working_years"/> |
|
<result property="socialSecurityNum" column="social_security_num"/> |
|
<result property="livingSituation" column="living_situation"/> |
|
<result property="residenceAddr" column="residence_addr"/> |
|
<result property="businessSource" column="business_source"/> |
|
<result property="emergencyLinkman" column="emergency_linkman"/> |
|
<result property="emergencyLinkmanRelationship" column="emergency_linkman_relationship"/> |
|
<result property="emergencyLinkmanPhone" column="emergency_linkman_phone"/> |
|
</resultMap> |
|
|
|
<!-- 根据客户基本信息id查询个人类型客户的信息 --> |
|
<select id="queryPersonalCustomerById" parameterType="long" resultType="com.daqing.framework.domain.crms.PersonalCustomerEntity"> |
|
SELECT id_card,age,gender,marital_status,education,employer,position,working_years,social_security_num, |
|
living_situation,residence_addr,business_source,emergency_linkman,emergency_linkman_relationship, |
|
emergency_linkman_phone |
|
FROM crms_personal_customer |
|
WHERE customer_id = #{id} |
|
</select> |
|
|
|
<!-- 插入个人类型的客户信息 --> |
|
<insert id="savePersonalCustomer" parameterType="com.daqing.framework.domain.crms.PersonalCustomerEntity"> |
|
INSERT INTO crms_personal_customer |
|
(id,customer_id,id_card,age,gender,marital_status,education,employer,position,working_years,social_security_num,living_situation |
|
,residence_addr,business_source,emergency_linkman,emergency_linkman_relationship,emergency_linkman_phone) |
|
VALUES (#{id},#{customerId},#{idCard},#{age},#{gender},#{maritalStatus},#{education},#{employer},#{position},#{workingYears}, |
|
#{socialSecurityNum},#{livingSituation},#{residenceAddr},#{businessSource},#{emergencyLinkman},#{emergencyLinkmanRelationship}, |
|
#{emergencyLinkmanPhone}); |
|
</insert> |
|
|
|
<!-- 更新个人类型的客户信息 --> |
|
<update id="updatePersonalCustomer" parameterType="com.daqing.framework.domain.crms.PersonalCustomerEntity"> |
|
UPDATE crms_personal_customer |
|
SET id_card=#{idCard},age=#{age},gender=#{gender},marital_status=#{maritalStatus},education=#{education}, |
|
employer=#{employer},position=#{position},working_years=#{workingYears},social_security_num=#{socialSecurityNum}, |
|
living_situation=#{livingSituation},residence_addr=#{residenceAddr},business_source=#{businessSource}, |
|
emergency_linkman=#{emergencyLinkman},emergency_linkman_relationship=#{emergencyLinkmanRelationship}, |
|
emergency_linkman_phone=#{emergencyLinkmanPhone} |
|
WHERE customer_id = #{customerId} |
|
</update> |
|
|
|
</mapper> |