尝试修正del接口操作失败,替换excuteUpdate为update

master
lyf666 2017-09-26 12:18:14 +08:00
parent 76835abd49
commit b952359dd4
1 changed files with 5 additions and 2 deletions

View File

@ -298,8 +298,11 @@ class Service {
fun deletePerm(permId: Int): Boolean {
val conn = DBUtil.getConnection()
try {
return conn.createStatement()
.execute("delete from `perm` where id=$permId") > 1
conn.createStatement()
.execute("delete from `perm` where id=$permId")
return true
} catch (e: Exception) {
return false
} finally {
conn.close()
}