11
This commit is contained in:
1 parent
f6b37348c4
commit
917f03bc58
61 files changed
+4233
-367
No files matched your search
@@ -91,6 +91,32 @@ abstract class UserApi {
|
||||
);
|
||||
}
|
||||
|
||||
/// 由当前设备请求删除服务端部门范围内的人脸,单批最多 500 条。
|
||||
///
|
||||
/// 服务端会以 DEVICE-ID 解析真实绑定部门;业务错误必须抛给调用方,确保终端
|
||||
/// 在未得到 deleted 或 alreadyAbsent 确认前不清理本地数据。
|
||||
static Future<ServiceTerminalFaceDeleteResult> deleteTerminalFaces(
|
||||
List<String> sampleIds,
|
||||
) async {
|
||||
final setting = await AppSettingTool.getSysSetting();
|
||||
final hardId = setting.serviceId;
|
||||
if (hardId == null) throw StateError('终端尚未绑定设备');
|
||||
final res = await HttpManage().dio.post(
|
||||
'/hard/hard-api/ad/face/delete',
|
||||
data: {'sampleIds': sampleIds},
|
||||
options: dio.Options(
|
||||
headers: {'DEVICE-ID': hardId},
|
||||
extra: {HttpManage.rejectBusinessErrorKey: true},
|
||||
),
|
||||
);
|
||||
if (res.data is! Map) {
|
||||
throw const FormatException('服务端未返回有效的人脸删除结果');
|
||||
}
|
||||
return ServiceTerminalFaceDeleteResult.fromJson(
|
||||
Map<String, dynamic>.from(res.data as Map),
|
||||
);
|
||||
}
|
||||
|
||||
/// 获取租户列表
|
||||
static Future<List<ServiceTenant>?> getTenantList() async {
|
||||
final res = await HttpManage().dio.get("/admin/tenant/list");
|
||||
|
||||
Reference in new issue
Block a user