Mysql 批量修改 multi-statement not allow解决

拈花ヽ惹草 提交于 2020-01-10 22:55:15

直接上代码(使用此方式,不需要进行任何数据库配置):

update t_project_stage_cost_budget update_time = now(), when id = #{item.id,jdbcType=BIGINT} then #{item.personMonths} when id = #{item.id,jdbcType=BIGINT} then #{item.projectStageId} when id = #{item.id,jdbcType=BIGINT} then #{item.subjectCostId} id in #{item.id,jdbcType=BIGINT}

批量新增


insert into
t_project_budget_submission(
project_id,
cost_catagory_id,
subject_catagory_id,
subject_cost_id,
department_num_id,
create_time,
update_time
) values (
#{p.projectId,jdbcType=BIGINT},
#{p.costCatagoryId,jdbcType=INTEGER},
#{p.subjectCatagoryId,jdbcType=INTEGER},
#{p.subjectCostId,jdbcType=INTEGER},
#{p.departmentNumId,jdbcType=BIGINT},
now(),
now()
)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!