diff --git a/README.md b/README.md index 96e06ec..4ab120d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ flutter pub run build_runner build --delete-conflicting-outputs~ ## flutter打包 ``` -flutter build apk --build-name 2.1.6 --build-number 216 +flutter build apk --build-name 2.1.8 --build-number 218 --build-name为版本号(展示) --build-number为版本号(内部比较) ``` diff --git a/lib/common/models/manage/face_sync_models.dart b/lib/common/models/manage/face_sync_models.dart index 93bb802..f09a611 100644 --- a/lib/common/models/manage/face_sync_models.dart +++ b/lib/common/models/manage/face_sync_models.dart @@ -1,12 +1,12 @@ -/// 人脸同步的业务范围,所有入口最终映射为部门快照或用户增量。 +/// 人脸同步的业务范围,覆盖部门快照、用户增量和人工全部同步。 enum FaceSyncMode { - /// 本部门及子部门的完整权威快照,用于每日对账和人工同步。 + /// 本部门及子部门的完整权威快照,用于每日对账。 departmentSnapshot, /// 指定用户的最新状态回查,用于 MQ 低延迟增量同步。 userDelta, - /// 非生产调试使用的全租户快照,生产界面不会暴露该模式。 + /// 人工同步全部人脸使用的全租户快照,保留原枚举名称以兼容调用方。 debugAllSnapshot, } diff --git a/lib/common/utils/sync/sync_check_tool.dart b/lib/common/utils/sync/sync_check_tool.dart index 4246b43..702a462 100644 --- a/lib/common/utils/sync/sync_check_tool.dart +++ b/lib/common/utils/sync/sync_check_tool.dart @@ -1132,7 +1132,7 @@ class _PendingTaskRequest { /// 当前请求是否为部门或调试完整快照,用于合并时让全量覆盖用户增量。 final bool fullFaceSnapshot; - /// 是否执行仅非生产可触发的全租户调试快照。 + /// 是否执行人工同步全部人脸使用的全租户快照。 final bool debugAllFaces; /// 全量日志请求优先于“仅当前文件”;任一手动请求到达后只需等待安全窗口。 diff --git a/lib/common/utils/sync/sync_face_tool.dart b/lib/common/utils/sync/sync_face_tool.dart index 3fc79d7..12822d2 100644 --- a/lib/common/utils/sync/sync_face_tool.dart +++ b/lib/common/utils/sync/sync_face_tool.dart @@ -18,7 +18,7 @@ abstract class SyncFaceTool { /// V3 游标快照页面大小。 static const int _snapshotPageSize = 500; - /// V2 调试全租户同步页面大小,仅非生产入口使用。 + /// V2 全租户同步页面大小,供人工同步全部人脸入口使用。 static const int _debugPageSize = 1000; /// 单次日志最多保留的脱敏失败样本数量,避免异常数据导致日志膨胀。 diff --git a/lib/pages/setting/face_manage_controller.dart b/lib/pages/setting/face_manage_controller.dart index 5eb30b8..e69ab63 100644 --- a/lib/pages/setting/face_manage_controller.dart +++ b/lib/pages/setting/face_manage_controller.dart @@ -167,12 +167,12 @@ class FaceManageController extends GetxController { } } - /// 确认后将本部门快照或非生产全租户调试请求提交到统一人脸任务队列。 + /// 确认后将全部人脸同步请求提交到统一人脸任务队列。 /// /// 队列会先避开支付、人脸会话和业务弹框;只有任务已经实际开始时才显示遮罩, /// 避免遮罩本身被空闲检测识别为业务占用而导致任务无法启动。 /// 遮罩会跟随调度器上报的同步进度在转圈与百分比进度条之间切换。 - Future asyncFace({bool isAll = false}) async { + Future asyncFace() async { if (operationInProgress) return; final isNetwork = AppNetworkTool.isAutoNetworkMsg(); if (!isNetwork) return; @@ -181,10 +181,6 @@ class FaceManageController extends GetxController { Toast.error(msg: "请先绑定设备"); return; } - if (isAll && AppSysTool.isProd()) { - Toast.error(msg: '生产环境仅允许同步本部门人脸'); - return; - } if (AppSysTool.isProd()) { final isActive = await AppFaceTool.isActiveSdk(); if (!isActive) { @@ -194,14 +190,14 @@ class FaceManageController extends GetxController { } final isSure = await appMessageDialog( Get.context!, - isAll ? '是否同步全租户人脸?此能力仅用于非生产调试,过程可能较长' : '是否同步本部门及子部门人脸?过程可能较长', + '是否同步全部人脸?过程可能较长', ); if (!isSure) return; final scheduler = SyncCheckTool.instance; isSyncing.value = true; final operation = scheduler.trigger( ScheduledTaskType.departmentFaceSync, - debugAllFaces: isAll, + debugAllFaces: true, triggerType: ScheduledTaskTriggerType.manual, ); await Future.delayed(Duration.zero); diff --git a/lib/pages/setting/widgets/setting_face.dart b/lib/pages/setting/widgets/setting_face.dart index 4c68f43..dab7c54 100644 --- a/lib/pages/setting/widgets/setting_face.dart +++ b/lib/pages/setting/widgets/setting_face.dart @@ -176,7 +176,7 @@ Widget _buildFaceNameField(FaceManageController controller) => Obx( ), ); -/// 构建人脸搜索与既有同步操作区;全租户同步仅在非生产调试环境出现。 +/// 构建人脸搜索与同步操作区;人工同步统一使用全部人脸入口。 Widget buildFaceSearch(BuildContext _) { final controller = Get.find(); return Obx(() { @@ -195,18 +195,11 @@ Widget buildFaceSearch(BuildContext _) { onTap: busy ? null : controller.doPage, ), TerminalToolbarButton( - label: controller.isSyncing.value ? '同步中...' : '同步本部门人脸', - icon: FAssets.icons.scanFace, - style: TerminalToolbarButtonStyle.secondary, - minWidth: 188.w, - onTap: busy ? null : () => controller.asyncFace(isAll: false), - ), - TerminalToolbarButton( - label: '同步全部人脸', + label: controller.isSyncing.value ? '同步中...' : '同步全部人脸', icon: FAssets.icons.scanFace, style: TerminalToolbarButtonStyle.secondary, minWidth: 176.w, - onTap: busy ? null : () => controller.asyncFace(isAll: true), + onTap: busy ? null : controller.asyncFace, ), if (!AppSysTool.isProd()) TerminalToolbarButton( diff --git a/pubspec.yaml b/pubspec.yaml index 59a20c4..e0fda00 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: pj_supermarket_cloud description: "智慧后勤-测试" publish_to: "none" -version: 2.1.6+216 +version: 2.1.8+218 environment: sdk: ^3.6.0