</delete>
<select id="getOne" resultType="java.util.Map"> select ${queryItem.fields} <choose> <when test = "queryItem.addRanking"> from (
select a.*, (@rownum:=@rownum+1) as ranking from ${queryItem.tableName} a,
(select @rownum:=0) b <if test = 'queryItem.orders != null and !"".equals(queryItem.orders)'> order by ${queryItem.orders} </if>
) c
</when> <otherwise> from ${queryItem.tableName} </otherwise> </choose> where 1 = 1 ${queryItem.whereCondition} <if test='queryItem.group != null and !"".equals(queryItem.group)'> group by ${queryItem.group} </if> <if test='queryItem.orders != null and !"".equals(queryItem.orders)'> order by ${queryItem.orders} </if> ${queryItem.pageFooter} </select>
<insert id="insertRateInfoList" useGeneratedKeys="true" parameterType="java.util.List"> insert into loan_rate(loan_id,loan_name,period_from,period_to) values <foreach collection="list" item="item" index="index" separator="," > (#{item.loan_id},#{item.loan_name},#{item.period_from},#{item.period_to}) </foreach> </insert>
