This commit is contained in:
liulu
2024-12-18 11:00:39 +08:00
parent f19891c39d
commit 36a2066542
9 changed files with 80 additions and 41 deletions
@@ -16,7 +16,7 @@ public interface KeyInfoService {
KeyInfoDTO.KeyView selectById(Long id);
Long save(KeyInfoDTO.KeySave save);
List<Long> save(KeyInfoDTO.KeySave save);
void update(KeyInfoDTO.KeyUpdate update);
@@ -188,7 +188,7 @@ public class KeyInfoServiceImpl implements KeyInfoService {
}
@Override
public Long save(KeyInfoDTO.KeySave save) {
public List<Long> save(KeyInfoDTO.KeySave save) {
KeyTemplate keyTemplate = keyTemplateMapper.selectOne(
new LambdaQueryWrapper<KeyTemplate>()
@@ -200,7 +200,7 @@ public class KeyInfoServiceImpl implements KeyInfoService {
Assert.isTrue(EnableStatus.ENABLED.getCode().equals(app.getStatus()), "应用不是启用状态");
LocalDateTime now = LocalDateTime.now();
List<Long> ids = new ArrayList<>();
for (int i = 0; i < save.getGenNumber(); i++) {
// 密钥信息
@@ -229,9 +229,11 @@ public class KeyInfoServiceImpl implements KeyInfoService {
info.setCheckValue(record.getCheckValue());
keyInfoMapper.insert(info);
spKeyRecordMapper.insert(record);
ids.add(info.getId());
}
return 0L;
return ids;
}
@Override