mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-04-26 00:00:04 +08:00
验证,组件优化,样式优化等
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"groupId" : "8295fc13678d4144bf7363c465247a50",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1646553126039,
|
||||
"updateTime" : 1647615807925,
|
||||
"lock" : "0",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
@@ -118,5 +118,17 @@
|
||||
}
|
||||
}
|
||||
================================
|
||||
var pCount = db.selectInt("select count(1) from sys_office where is_del = 0 and pid = #{id}")
|
||||
if(pCount > 0){
|
||||
exit 500,'存在下级机构,不允许删除'
|
||||
}
|
||||
var userCount = db.selectInt("select count(1) from sys_user where is_del = 0 and office_id = #{id}")
|
||||
if(userCount > 0){
|
||||
exit 500, '机构存在用户,不允许删除'
|
||||
}
|
||||
var root = db.selectValue("select pid from sys_office where is_del = 0 and id = #{id}")
|
||||
if(root == '0'){
|
||||
exit 500, '不能删除根节点'
|
||||
}
|
||||
// db.table('sys_user_office').where().eq("office_id",id).delete();
|
||||
return db.table("sys_office").logic().where().eq("id",id).delete();
|
||||
Reference in New Issue
Block a user