Merge branch 'develop'

# Conflicts:
#	data/magic-api/api/系统管理/用户管理/所有机构.ms
#	data/magic-api/api/系统管理/组件/选择组件.ms
#	magic-boot/pom.xml
#	magic-boot/src/main/java/org/ssssssss/magicboot/extension/ResponseFunctionExtension.java
#	magic-boot/src/main/java/org/ssssssss/magicboot/interceptor/PermissionInterceptor.java
This commit is contained in:
zegezy
2023-08-24 09:45:50 +08:00
9 changed files with 29 additions and 29 deletions
@@ -92,8 +92,8 @@
"children" : [ ]
} ]
}
}
================================
}
================================
var toTree = (list,pid) => select t.*,toTree(list,t.key) children from list t where t.pid = pid
var list = toTree(db.select('select id "key",name label,pid from sys_office where is_del = 0 order by sort'),'0')
@@ -224,8 +224,8 @@
"children" : [ ]
} ]
}
}
================================
}
================================
import org.ssssssss.magicapi.utils.PathUtils
import org.ssssssss.magicapi.core.service.MagicResourceService
var getFiles = (groupId) => {
@@ -5,7 +5,7 @@
"groupId" : "8295fc13678d4144bf7363c465247a50",
"name" : "删除",
"createTime" : null,
"updateTime" : 1647615807925,
"updateTime" : 1679552802807,
"lock" : "0",
"createBy" : null,
"updateBy" : null,
@@ -126,9 +126,9 @@ var userCount = db.selectInt("select count(1) from sys_user where is_del = 0 and
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, '不能删除根节点'
}
// 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();
return db.table("sys_office").logic().where().eq("id",id).delete();
@@ -5,7 +5,7 @@
"groupId" : "0295f2b4af9145f5a0ea29fa4b797214",
"name" : "保存",
"createTime" : null,
"updateTime" : 1653129238531,
"updateTime" : 1679725946724,
"lock" : null,
"createBy" : null,
"updateBy" : null,
@@ -218,4 +218,4 @@ import org.ssssssss.magicapi.modules.db.cache.SqlCache
SqlCache.delete(`configure:${configureKey}${configureCondition}`)
SqlCache.delete(`configure:${configureKey}`)
return db.table('sys_configure').primary('id').saveOrUpdate(data)
return db.table('sys_configure').primary('id').withBlank().saveOrUpdate(data)