<insert id="insert_office_suppliesFromBaseInfo" parameterClass="java.util.HashMap">
insert into office_supplies_formbaseinfo(BOINSID,APPLICANT_PSERSON,APPLICANT_DEPARTMENT,APPLICANT_TIME)
values(
#BOINSID:VARCHAR#,
#APPLICANT_PSERSON:VARCHAR#,
#APPLICANT_DEPARTMENT:VARCHAR#,
#APPLICANT_TIME:VARCHAR#
)
</insert>Map supplieMap = new HashMap();
supplieMap.put("boinsid", "test");
supplieMap.put("applicant_pserson", "shenqingren");
supplieMap.put("applicant_department", "shenqingbumen");
supplieMap.put("applicant_time", shenqingshijian);
// supplieMap.put("form_no", DocumentNumber1);
IOfficeSuppliesService officeSuppliesService = (IOfficeSuppliesService) BeanUtil.getBean(IOfficeSuppliesService.class);
officeSuppliesService.saveFormBaseInfo(supplieMap);
insert into office_supplies_formbaseinfo(BOINSID,APPLICANT_PSERSON,APPLICANT_DEPARTMENT,APPLICANT_TIME)
values(
#BOINSID:VARCHAR#,
#APPLICANT_PSERSON:VARCHAR#,
#APPLICANT_DEPARTMENT:VARCHAR#,
#APPLICANT_TIME:VARCHAR#
)
</insert>Map supplieMap = new HashMap();
supplieMap.put("boinsid", "test");
supplieMap.put("applicant_pserson", "shenqingren");
supplieMap.put("applicant_department", "shenqingbumen");
supplieMap.put("applicant_time", shenqingshijian);
// supplieMap.put("form_no", DocumentNumber1);
IOfficeSuppliesService officeSuppliesService = (IOfficeSuppliesService) BeanUtil.getBean(IOfficeSuppliesService.class);
officeSuppliesService.saveFormBaseInfo(supplieMap);
INSERT INTO user (uid,firstname,lastname, pwd, sex, address, city, province, code, state, email,phone,tel, language,
emformat, payment, datestime, regtime, security, answer, onlstatus, status, balance,
avacredit, uip)
VALUES (#uid#,#firstname#,#lastname#, #pwd#, #sex#, #address#,
#city#, #province#, #code#, #state#, #email#,#phone#,
#tel#, #language#, #emformat#, #payment#,
#datestime#, #regtime#, #security#, #answer#,
#onlstatus#, #status#, #balance#, #avacredit#, #uip#)
</insert>
这个是我项目中的
有什么不同吗?
PS:service方法里的参数是HashMap的话。parameterClass就是java.util.HashMap,
若参数是User类,就可以写成User,不过要加上
<typeAlias alias="User" type="XXXXXX.biz.User"/>