@TableName("tb_xxx") public class TbXxx implements Serializable { private static
final long serialVersionUID = 1L; // database id Field is :AUTO_INCREMENT @TableId(value =
"id", type = IdType.AUTO) private Integer id; } @Service public class
TbXxxServiceImpl extends ServiceImpl<TbXxxMapper, TbXxx> implements TbXxxService
{ /** * test mybatis-plus Insert return primary key auto increment id * @author:heshengjin qq:2356899074 @date
2020 year 8 month 13 day afternoon 3:55:25 */ @SuppressWarnings("serial") @Override public int
insertBackAutoId() { TbXxx tbXxx = new TbXxx(){{ // Do not set the primary key id, It's self increasing id
// other getter/setter }}; baseMapper.insert(tbXxx ); // Here we get the self incrementing primary key id, Packaged, leveraged , Like one return
tbXxx.getId(); } }

Technology
©2019-2020 Toolsou All rights reserved,
Huawei 2021 session Hardware Engineer Logical post (FPGA) Super detailed surface !!!Vue-element-admin upgrade ui edition virtual machine VMware Download and install the most detailed tutorial !C++ Move constructor and copy constructor sound of dripping water java Backstage interview pygame Realize full screen mode and adjustable window size mysql Database setting character set configuration modification my.ini file (windows)30 What's the experience of being a junior programmer at the age of 20 C++ Multithreading programming ( Summary of common functions and parameters )python_ cherry tree