Dao层
int updateByList(List list);
Mappe层
批量修改
update jt_fin_repayment_plan
erestTotal != null" >
ORG_INTEREST_TOTAL = #{item.orgInterestTotal},
DEL_FLAG = #{item.delFlag},
STATE = #{item.state},
CREATE_BY = #{item.createBy},
CREATE_TIME = #{item.createTime},
UPDATE_BY = #{item.updateBy},
UPDATE_TIME = #{NOW(),
where REPAYMENT_ID = #{item.repaymentId}
----------------------------------------------------------------------------------------------------------
dao层
//批量添加
int addList(List list);
Map层
批量添加
insert into jt_fin_adjust_rates_project_history (
ID,ADJUST_RATES_ID,PROJECT_ID,START_WHOLE,
END_WHOLE,START_WITHOUT,END_WITHOUT,PROJECT_DATE,
KEEP,AUDIT_FLAG,STATUS,REMARK,DEL_FLAG,
CREATE_BY,CREATE_TIME,UPDATE_TIME,UPDATE_BY
)
values
((select UUID()), #{item.adjustRatesId},#{item.projectId},#{item.startWhole},
#{item.endWhole},#{item.startWithout},#{item.endWithout},#{item.projectDate},
#{item.keep},#{item.auditFlag},#{item.status},#{item.remark},#{item.delFlag},
#{item.createBy},sysdate(), #{item.updateTime}, #{item.updateBy})
注意:我的id VARCHAR类型 主键 不能递增 在这里我用的是UUID生成的
原本,想写一个批量添加,回显id但是没实现就不写了,有大佬可以补充一下