use of io.swagger2.spring.boot.dao.UserDto in project spring-boot-starter-samples by vindell.
the class UserController method putUser.
@ApiOperation(value = "更新用户详细信息", notes = "根据url的id来指定更新对象,并根据传过来的user信息来更新用户详细信息")
@ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "用户ID", required = true, dataType = "Long"), @ApiImplicitParam(name = "user", value = "用户详细实体user", required = true, dataType = "UserDto") })
@RequestMapping(value = "put/{id}", method = RequestMethod.PUT)
public String putUser(@PathVariable Long id, @RequestBody UserDto user) {
UserDto u = users.get(id);
u.setName(user.getName());
u.setAge(user.getAge());
users.put(id, u);
return "success";
}
Aggregations