密钥管理

This commit is contained in:
liulu
2024-11-01 15:11:47 +08:00
parent 6d6f3f1d6b
commit b5df4c2406
2 changed files with 12 additions and 9 deletions
@@ -514,12 +514,16 @@ public class KeyInfoServiceImpl implements KeyInfoService {
.collect(Collectors.toList());
Assert.isTrue(CollectionUtils.isEmpty(unNormalCodes),
"密钥id: " + String.join(",", unNormalCodes) + "当前状态不支持销毁操作");
keyInfoMapper.update(
new LambdaUpdateWrapper<KeyInfo>()
.set(KeyInfo::getStatus, KeyStatus.DESTROY.getCode())
.set(KeyInfo::getDeleted, true)
.set(KeyInfo::getDeleteTime, now)
.in(KeyInfo::getId, ids)
);
keyInfoMapper.deleteBatchIds(ids);
spKeyRecordMapper.delete(new LambdaUpdateWrapper<KeyRecord>().in(KeyRecord::getKeyId, ids));
// keyInfoMapper.update(
// new LambdaUpdateWrapper<KeyInfo>()
// .set(KeyInfo::getStatus, KeyStatus.DESTROY.getCode())
// .set(KeyInfo::getDeleted, true)
// .set(KeyInfo::getDeleteTime, now)
// .in(KeyInfo::getId, ids)
// );
}
}