Record the mybatisplus.xxx.ServiceImpl framework using the service layer

The save(Entity entity) method and updateById(Entity entity) method in ServiceImpl will automatically assign values ​​to the entity class after use.

It can be understood as adding and returning the primary key id

For example: in the case of auto-incrementing the database id, after using save to add data, you can directly call entity.getId() in the subsequent code to obtain the id of the added data. It is equivalent to returning the primary key information after adding.

Guess you like

Origin blog.csdn.net/cccsssrrr/article/details/127871084