generated from dellevin/template
完善2
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user