删除秘钥时候清空配置.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user