关联书

This commit is contained in:
wangjinlei
2024-01-04 10:32:34 +08:00
parent 62bc356219
commit 812ee419ba
4 changed files with 23 additions and 3 deletions

View File

@@ -274,18 +274,25 @@ public class BookController {
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody BookEntity book) {
bookService.updateById(book);
return R.ok();
}
/**
* 获取全部古籍书
* @return
*/
public R getAncientBooks(){
List<BookEntity> ancientBooks = bookService.getAncientBooks();
return R.ok().put("books",ancientBooks);
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids) {
bookService.removeByIds(Arrays.asList(ids));