feat:添加下单日志
This commit is contained in:
1 parent
e75b3bd58e
commit
531815517a
35 files changed
+2039
-220
No files matched your search
@@ -57,7 +57,10 @@ abstract class SyncFaceTool {
|
||||
/// 比对,会让收银弹框反复判定库损坏并进入就地注册引导。整库装载已先
|
||||
/// 尝试从本地图片补回特征,这里只清理最终仍无特征的行。
|
||||
/// 删除顺序仍先处理虹软内存库;单条失败时保留记录供后续权威快照重试。
|
||||
static Future<int> delEmptyFace() async {
|
||||
static Future<int> delEmptyFace() =>
|
||||
AppFaceTool.runLibraryMutation(_delEmptyFace);
|
||||
|
||||
static Future<int> _delEmptyFace() async {
|
||||
final faceDao = Get.find<AppControl>().dataBase.getFaceDao;
|
||||
// 只回传残缺行;正常启动无需把数千条完整档案再传回 Dart 逐条筛选。
|
||||
final profiles = await faceDao.getEmptyFaceList() ?? const <FaceEntity>[];
|
||||
@@ -89,7 +92,9 @@ abstract class SyncFaceTool {
|
||||
if (_syncRunning) throw const FaceSyncSnapshotException('人脸同步正在进行中');
|
||||
_syncRunning = true;
|
||||
try {
|
||||
return await _sync(mode: mode, userIds: userIds, onProgress: onProgress);
|
||||
return await AppFaceTool.runLibraryMutation(
|
||||
() => _sync(mode: mode, userIds: userIds, onProgress: onProgress),
|
||||
);
|
||||
} finally {
|
||||
_syncRunning = false;
|
||||
}
|
||||
@@ -838,7 +843,10 @@ abstract class SyncFaceTool {
|
||||
/// 调用方必须先完成服务端删除或取得“服务端已不存在”确认;失败时本方法恢复
|
||||
/// 图片、SQLite 和虹软内存特征,并返回 false 供页面保留重试入口。
|
||||
static Future<bool> deleteLocalFace(FaceEntity face) =>
|
||||
_deleteLocalFace(face, Get.find<AppControl>().dataBase.getFaceDao);
|
||||
AppFaceTool.runLibraryMutation(
|
||||
() =>
|
||||
_deleteLocalFace(face, Get.find<AppControl>().dataBase.getFaceDao),
|
||||
);
|
||||
|
||||
/// 按批量管线清理一组本地人脸(不触碰服务端数据),返回成功删除数。
|
||||
///
|
||||
@@ -847,10 +855,12 @@ abstract class SyncFaceTool {
|
||||
List<FaceEntity> faces, {
|
||||
void Function(int processed, int? total)? onProgress,
|
||||
}) async {
|
||||
final result = await _deleteFacesInBulk(
|
||||
faces,
|
||||
Get.find<AppControl>().dataBase.getFaceDao,
|
||||
onProgress: onProgress,
|
||||
final result = await AppFaceTool.runLibraryMutation(
|
||||
() => _deleteFacesInBulk(
|
||||
faces,
|
||||
Get.find<AppControl>().dataBase.getFaceDao,
|
||||
onProgress: onProgress,
|
||||
),
|
||||
);
|
||||
return result.deleted;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user