1
This commit is contained in:
parent
e61020fcdd
commit
32ceb09cb5
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user