如果sql中使用了 resultMap,那么就不能写自定义的类型了 只能写jdk自带的类型,这时候用 resultType
<!--获取平台历史平均年化收益率-->
<select id="selectHistoryAverageRate" resultType="java.lang.Double">
select cast(avg(rate) as DECIMAL(10,2)) from b_loan_info
</select>
<!--根据产品的状态获取产品信息列表-->
<select id="selectLoanInfoByProductStatus" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
b_loan_info
where
product_status = #{productStatus}
</select>