@PostMapping
public boolean save(@RequestBody menu menu){
//新增或更新
return userService.savemenu(menu);
}
public class UserService extends ServiceImpl<UserMapper, menu> {
public boolean savemenu(menu menu) {
return saveOrUpdate(menu);
}
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@46da75ef] was not registered for synchronization because synchronization is not active
JDBC Connection [HikariProxyConnection@1209893700 wrapping com.mysql.cj.jdbc.ConnectionImpl@403783] will not be managed by Spring
==> Preparing: INSERT INTO menu ( DishID ) VALUES ( ? )
==> Parameters: -772145151(Integer)
<== Updates: 1
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@46da75ef]
调用savemenu方法时,postman发送给后端的数据与后端控制台显示的不一致