fix:如果是单次钥匙开锁成功之后就调用删除

This commit is contained in:
liyi 2025-06-11 09:17:59 +08:00
parent b61aceeac9
commit 0520733080

View File

@ -126,6 +126,17 @@ class LockDetailLogic extends BaseGetXController {
TalkStatus.answeredSuccessfully) {
showToast('开锁成功'.tr);
}
//
if (state.keyInfos.value.keyType == 3) {
final LockListInfoEntity entity = await ApiRepository.to
.deletOwnerKeyData(
lockId: state.keyInfos.value.lockId.toString(),
keyId: state.keyInfos.value!.keyId.toString(),
includeUnderlings: 0);
if (entity.errorCode!.codeIsSuccessful) {
AppLog.log("删除成功");
}
}
break;
case 0x06:
//
@ -532,8 +543,7 @@ class LockDetailLogic extends BaseGetXController {
final List<int> getPublicKeyList =
changeStringListToIntList(publicKey!);
AppLog.log(
'发送同步锁记录命令:${BlueManage().connectDeviceName}');
AppLog.log('发送同步锁记录命令:${BlueManage().connectDeviceName}');
IoSenderManage.senderReferEventRecordTimeCommand(
keyID: BlueManage().connectDeviceName,
userID: await Storage.getUid(),