This commit is contained in:
z 2025-04-22 20:13:44 +08:00
parent e61020fcdd
commit 32ceb09cb5

View File

@ -3,7 +3,7 @@ package com.example.demo.controller;
import com.example.demo.mapper.UserMapper;
import com.example.demo.model.User;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@ -34,9 +34,7 @@ public class UserController {
@PutMapping
public String updateUser(@RequestBody User user) {
// if(user.getId()==null){
// return "id is null";
// }
int update = userMapper.updateById(user);
return String.valueOf(update);