删除功能
/**
* 删除
*/
@DeleteMapping
public R<String> delete(Long ids) {
log.info("ids:{}", ids);
addressBookService.removeById(ids);
return R.success("删除成功");
}
修改功能
/**
* 修改
*/
@PutMapping
public R<AddressBook> put(@RequestBody AddressBook addressBook) {
log.info("addressBook:{}", addressBook);
addressBookService.updateById(addressBook);
return R.success(addressBook);
}