<?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.ruixuan.salesLeads.mapper.SaleFinancePolicyApprovalLogMapper">


<!-- 新增政策的审核意见-->
	<insert id="addSaleFinancePolicyApprovalLog">
		insert into sale_finance_policy_approval_log(
			policy_id,
			approval_status,
			approval_content,
			create_user_id,
			create_time
			)
		values
		(
			#{policyId},
			#{approvalStatus},
			#{approvalContent},
			#{createUserId},
			NOW()
		)
	</insert>

<!-- 查询最新的返点比例 -->
	<select id="selectFinacePolicyRebateInfo" resultType="com.ruixuan.salesLeads.pojo.SaleFinancePolicyRebateInfoPojo">
		SELECT
			*
		FROM
			`sale_finace_policy_rebate_info`
		ORDER BY
			create_time DESC
			LIMIT 1

	</select>





</mapper> 