<?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.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceRefundMapper">

    <resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund">
            <id property="id" column="ID" jdbcType="BIGINT"/>
            <result property="insDetailId" column="INS_DETAIL_ID" jdbcType="BIGINT"/>
            <result property="reduceHandleStatus" column="REDUCE_HANDLE_STATUS" jdbcType="TINYINT"/>
            <result property="refundMoney" column="REFUND_MONEY" jdbcType="DECIMAL"/>
            <result property="remark" column="REMARK" jdbcType="VARCHAR"/>
            <result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
            <result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
            <result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Base_Column_List">
        ID,INS_DETAIL_ID,REDUCE_HANDLE_STATUS,
        REFUND_MONEY,REMARK,CREATE_TIME,
        CREATE_BY,CREATE_NAME
	</sql>
	<update id="updateByInsDetailId">
		update
			t_insurance_refund
		set
			REDUCE_HANDLE_STATUS = #{reduceHandleStatus},
			REMARK = #{remark},
			UPDATE_BY = #{createBy},
			UPDATE_TIME = #{createTime}
		where
			INS_DETAIL_ID = #{insDetailId}
	</update>
	<update id="updateRefundMoney">
		update
			t_insurance_refund
		set
			REFUND_MONEY = #{refundMoney},
			UPDATE_BY = #{updateBy},
			UPDATE_TIME = #{updateTime}
		where
			INS_DETAIL_ID = #{insDetailId}
	</update>
	<select id="getByInsDetailId" resultType="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceRefund">

	</select>
</mapper>
