on duplicate key update
<insert id="insert" parameterType="Plan"> insert into t_plan ( `plan_id`, `install_id`, `parent_id`, `plan_name`, `credit_hour`, `max_hour`, `is_required`, `sort_num`, `explain`, `plan_type`, `zone_id`, `validity`, `create_user`, `create_date`, `update_user`, `update_date` ) values ( #{planId}, #{installId}, #{parentId}, #{planName}, #{creditHour}, #{maxHour}, #{isRequired}, #{sortNum}, #{explain}, #{planType}, #{zoneId}, #{validity}, #{createUser}, #{createDate}, #{updateUser}, #{updateDate} ) on duplicate key update `plan_name` = values(`plan_name`), `credit_hour` = values(`credit_hour`), `sort_num` = values(`sort_num`), `explain` = values(`explain`) </insert>
insert ignore into
<insert id="insert" parameterType="Plan">
insert ignore into t_plan (
`plan_id`,
`install_id`,
`parent_id`,
`plan_name`,
`credit_hour`,
`max_hour`,
`is_required`,
`sort_num`,
`explain`,
`plan_type`,
`zone_id`,
`validity`,
`create_user`,
`create_date`,
`update_user`,
`update_date`
) values (
#{planId},
#{installId},
#{parentId},
#{planName},
#{creditHour},
#{maxHour},
#{isRequired},
#{sortNum},
#{explain},
#{planType},
#{zoneId},
#{validity},
#{createUser},
#{createDate},
#{updateUser},
#{updateDate}
)
</insert>