密钥管理
This commit is contained in:
parent
6d6f3f1d6b
commit
b5df4c2406
@ -1,7 +1,6 @@
|
|||||||
package com.sunyard.chsm.model.entity;
|
package com.sunyard.chsm.model.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -31,7 +30,7 @@ public class KeyInfo {
|
|||||||
private LocalDateTime expiredTime;
|
private LocalDateTime expiredTime;
|
||||||
|
|
||||||
private String remark;
|
private String remark;
|
||||||
@TableLogic
|
// @TableLogic
|
||||||
private Boolean deleted;
|
private Boolean deleted;
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
private LocalDateTime updateTime;
|
private LocalDateTime updateTime;
|
||||||
|
@ -514,12 +514,16 @@ public class KeyInfoServiceImpl implements KeyInfoService {
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
Assert.isTrue(CollectionUtils.isEmpty(unNormalCodes),
|
Assert.isTrue(CollectionUtils.isEmpty(unNormalCodes),
|
||||||
"密钥id: " + String.join(",", unNormalCodes) + "当前状态不支持销毁操作");
|
"密钥id: " + String.join(",", unNormalCodes) + "当前状态不支持销毁操作");
|
||||||
keyInfoMapper.update(
|
|
||||||
new LambdaUpdateWrapper<KeyInfo>()
|
keyInfoMapper.deleteBatchIds(ids);
|
||||||
.set(KeyInfo::getStatus, KeyStatus.DESTROY.getCode())
|
spKeyRecordMapper.delete(new LambdaUpdateWrapper<KeyRecord>().in(KeyRecord::getKeyId, ids));
|
||||||
.set(KeyInfo::getDeleted, true)
|
|
||||||
.set(KeyInfo::getDeleteTime, now)
|
// keyInfoMapper.update(
|
||||||
.in(KeyInfo::getId, ids)
|
// new LambdaUpdateWrapper<KeyInfo>()
|
||||||
);
|
// .set(KeyInfo::getStatus, KeyStatus.DESTROY.getCode())
|
||||||
|
// .set(KeyInfo::getDeleted, true)
|
||||||
|
// .set(KeyInfo::getDeleteTime, now)
|
||||||
|
// .in(KeyInfo::getId, ids)
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user