<?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.yd.csf.service.dao.FnaMapper">

    <resultMap id="BaseResultMap" type="com.yd.csf.service.model.Fna">
            <id property="id" column="id" />
            <result property="fnaBizId" column="fna_biz_id" />
            <result property="fnaNo" column="fna_no" />
            <result property="tenantCode" column="tenant_code" />
            <result property="userBizId" column="user_biz_id" />
            <result property="customerBizId" column="customer_biz_id" />
            <result property="appointmentNo" column="appointment_no" />
            <result property="appointmentBizId" column="appointment_biz_id" />
            <result property="bookingStatusTip" column="booking_status_tip" />
            <result property="underwritingNo" column="underwriting_no" />
            <result property="policyBizId" column="policy_biz_id" />
            <result property="policyNo" column="policy_no" />
            <result property="status" column="status" />
            <result property="productCode" column="product_code" />
            <result property="productName" column="product_name" />
            <result property="url" column="url" />
            <result property="edit" column="edit" />
            <result property="remark" column="remark" />
            <result property="isDeleted" column="is_deleted" />
            <result property="creatorId" column="creator_id" />
            <result property="updaterId" column="updater_id" />
            <result property="createTime" column="create_time" />
            <result property="updateTime" column="update_time" />
    </resultMap>

    <sql id="Base_Column_List">
        id,fna_biz_id,fna_no,tenant_code,user_biz_id,customer_biz_id,appointment_no,
        appointment_biz_id,booking_status_tip,underwriting_no,policy_biz_id,policy_no,
        status,product_code,product_name,url,edit,
        remark,is_deleted,creator_id,updater_id,create_time,
        update_time
    </sql>

    <update id="updateFnaNoById">
        update fna set fna_no = #{fnaNo} where id = #{id}
    </update>

    <update id="updateCustomerNameByCustomerBizId">
        update fna set customer_name = #{firstNamePinyin} where customer_biz_id = #{customerBizId}
    </update>
</mapper>
