This commit is contained in:
DelLevin-Home
2026-03-07 23:20:24 +08:00
parent dc513fb6f6
commit d28c5e562e
24 changed files with 1983 additions and 636 deletions

View File

@@ -62,8 +62,8 @@ class BookDao {
);
}
// 软删除书籍记录
Future<int> softDeleteBook(String id) async {
// 软删除书籍记录(移入回收站)
Future<int> deleteBook(String id) async {
final db = await _dbHelper.database;
return await db.update(
'books',
@@ -76,16 +76,6 @@ class BookDao {
);
}
// 彻底删除书籍记录
Future<int> deleteBook(String id) async {
final db = await _dbHelper.database;
return await db.delete(
'books',
where: 'id = ?',
whereArgs: [id],
);
}
// 搜索书籍(标题、别名)
Future<List<Book>> searchBooks(String query) async {
final db = await _dbHelper.database;