repo增加count方法

修改before remove的监听器返回值类型
This commit is contained in:
2020-10-27 23:37:18 +08:00
parent d1c843cbae
commit ca13018c9f
10 changed files with 63 additions and 27 deletions

View File

@@ -27,7 +27,7 @@ interface IApplication {
logger?.debug(this, "$name business execute success")
} catch (ex: Exception) {
msg.status = Status.Error
msg.message = if (error.isEmpty()) ex.message ?: "" else error
msg.message = if (error.isEmpty()) ex.message ?: "" else "$error: ${ex.message}"
logger?.error(this, ex, "$error: ${ex.message}")
}
return msg

View File

@@ -35,7 +35,7 @@ interface ICommandApp<TCommand : ICommand, TKey> : IApplication {
@DeleteMapping("/{id:.+}")
fun remove(@PathVariable id: TKey): HttpMessage {
return this.safeExecute("删除${this.name}失败[id: $id]") {
return this.safeExecute("删除${this.name}[id: $id]失败") {
if (this.service != null)
it.data = this.service!!.remove(id)
else {