@PostMapping(“addUser”)
public String addUser(User user){
userService.addUser(user);
return “添加用户成功”;
}
/**
-
删除用户
-
@param id
*/
@GetMapping(“delUser”)
public String delUser(@RequestParam(value = “id”) int id){
userService.delUser(id);
return “删除用户成功”;
}
/**
-
修改用户信息
-
@param user
*/
@PostMapping(“updateUser”)
public String updateUser(User user){
userService.updateUser(user);
return “修改用户成功”;
}
/**
-
获取用户信息
-
@param id
-
@return
*/
@GetMapping(“getUser”)
public User getUser(@RequestParam(value = “id”) int id){
return userService.getUser(id);
}
@GetMapping(“getUsers”)<