MyBatis往Oracle数据库批量插入数据
INSERT INTO DDZHPT.CMS_SCHEDUAL_DETIAL
(
DEPT_ID,
SCHEDUAL_DATE,
CMS_SCHEDUAL_TYPE_ID,
CMS_SCHEDUAL_TEAM_ID,
CMS_SCHEDUAL_TYPE_PERIOD_ID,
CMS_SCHEDUAL_TIME_ID,
SYS_POST_ID,
POINT_ID,
PERSON_ID
)
SELECT
#{item.deptId,jdbcType=DECIMAL},
#{item.schedualDate,jdbcType=TIMESTAMP},
#{item.cmsSchedualTypeId,jdbcType=VARCHAR},
#{item.cmsSchedualTeamId,jdbcType=VARCHAR},
#{item.cmsSchedualTypePeriodId,jdbcType=VARCHAR},
#{item.cmsSchedualTimeId,jdbcType=VARCHAR},
#{item.sysPostId,jdbcType=VARCHAR},
#{item.pointId,jdbcType=VARCHAR},
#{item.personId,jdbcType=VARCHAR}
FROM DUAL
INSERT INTO DDZHPT.CMS_SCHEDUAL_DETIAL
(
DEPT_ID,
SCHEDUAL_DATE,
CMS_SCHEDUAL_TYPE_ID,
CMS_SCHEDUAL_TEAM_ID,
CMS_SCHEDUAL_TYPE_PERIOD_ID,
CMS_SCHEDUAL_TIME_ID,
SYS_POST_ID,
POINT_ID,
PERSON_ID
)
VALUES(
#{item.deptId,jdbcType=DECIMAL},
#{item.schedualDate,jdbcType=TIMESTAMP},
#{item.cmsSchedualTypeId,jdbcType=VARCHAR},
#{item.cmsSchedualTeamId,jdbcType=VARCHAR},
#{item.cmsSchedualTypePeriodId,jdbcType=VARCHAR},
#{item.cmsSchedualTimeId,jdbcType=VARCHAR},
#{item.sysPostId,jdbcType=VARCHAR},
#{item.pointId,jdbcType=VARCHAR},
#{item.personId,jdbcType=VARCHAR}
)