<insert id="saveReportTemplate" parameterType="map">
<selectKey resultType="java.lang.Integer" keyProperty="template_id" order="AFTER">
SELECT IDENT_CURRENT('insert表名')
</selectKey>
insert into report_template(template_name)
values(#{template_name})
</insert>
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("template_name", "模版1");
int i = (Integer) dao.save("Report.saveReportTemplate", params);
此例子返回map类型,则在调用参数为params可获取{template_name=模版1, template_id=3} |