application.properties中加入分页插件
pagination.paginationFilter=com.lkx.util.pager.PaginationFilter
oracle数据库:
update test
test=${item.test}+1
where id = ${item.id}
mysql数据库:
mysql数据库采用一下写法即可执行,但是数据库连接必须配置:&allowMultiQueries=true
例如:jdbc:mysql://192.168.1.236:3306/test?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true
update test
test=${item.test}+1
where id = ${item.id}
mysql 批量插入
Dao类
int batchInsert(List list);
Mapper.xml
replace into lottery_user_task (
id
, user_id
, gmt_create
, gmt_modify
)
values
(
#{item.id,jdbcType=INTEGER},
#{item.userId,jdbcType=BIGINT},
now(),
now()
)