删除秘钥时候清空配置.

This commit is contained in:
lijiahang
2023-09-22 19:08:41 +08:00
parent 6a3affdbd3
commit 1e453e4312
6 changed files with 52 additions and 4 deletions

View File

@@ -132,6 +132,10 @@ public class ${table.serviceImplName} implements ${table.serviceName} {
@Override
public Integer delete${type}ById(Long id) {
log.info("${type}Service-delete${type}ById id: {}", id);
// 检查数据是否存在
${type}DO record = ${typeLower}DAO.selectById(id);
Valid.notNull(record, ErrorMessage.DATA_ABSENT);
// 删除
int effect = ${typeLower}DAO.deleteById(id);
log.info("${type}Service-delete${type}ById effect: {}", effect);
return effect;

View File

@@ -123,6 +123,9 @@ public class ${type}ApiImpl implements ${type}Api {
public Integer delete${type}ById(Long id) {
log.info("${type}Api.delete${type}ById id: {}", id);
Valid.notNull(id, ErrorMessage.ID_MISSING);
// 检查数据是否存在
${type}DO record = ${typeLower}DAO.selectById(id);
Valid.notNull(record, ErrorMessage.DATA_ABSENT);
// 删除
int effect = ${typeLower}DAO.deleteById(id);
log.info("${type}Api.delete${type}ById effect: {}", effect);