mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-01-31 17:12:49 +08:00
77f77fd407
# 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
103 lines
2.6 KiB
Plaintext
103 lines
2.6 KiB
Plaintext
{
|
|
"properties" : { },
|
|
"id" : "55ddadf56dfe433baae1b5c26580cf00",
|
|
"script" : null,
|
|
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
|
"name" : "所有机构",
|
|
"createTime" : null,
|
|
"updateTime" : 1680361919209,
|
|
"lock" : "0",
|
|
"createBy" : null,
|
|
"updateBy" : null,
|
|
"path" : "/offices",
|
|
"method" : "GET",
|
|
"parameters" : [ ],
|
|
"options" : [ ],
|
|
"requestBody" : "",
|
|
"headers" : [ ],
|
|
"paths" : [ ],
|
|
"responseBody" : "{\n \"code\": 500,\n \"message\": \"系统内部出现错误\",\n \"data\": null,\n \"timestamp\": 1680361909126,\n \"executeTime\": 175\n}",
|
|
"description" : null,
|
|
"requestBodyDefinition" : null,
|
|
"responseBodyDefinition" : {
|
|
"name" : "",
|
|
"value" : "",
|
|
"description" : "",
|
|
"required" : false,
|
|
"dataType" : "Object",
|
|
"type" : null,
|
|
"defaultValue" : null,
|
|
"validateType" : "",
|
|
"error" : "",
|
|
"expression" : "",
|
|
"children" : [ {
|
|
"name" : "code",
|
|
"value" : "500",
|
|
"description" : "",
|
|
"required" : false,
|
|
"dataType" : "Integer",
|
|
"type" : null,
|
|
"defaultValue" : null,
|
|
"validateType" : "",
|
|
"error" : "",
|
|
"expression" : "",
|
|
"children" : [ ]
|
|
}, {
|
|
"name" : "message",
|
|
"value" : "系统内部出现错误",
|
|
"description" : "",
|
|
"required" : false,
|
|
"dataType" : "String",
|
|
"type" : null,
|
|
"defaultValue" : null,
|
|
"validateType" : "",
|
|
"error" : "",
|
|
"expression" : "",
|
|
"children" : [ ]
|
|
}, {
|
|
"name" : "data",
|
|
"value" : "null",
|
|
"description" : "",
|
|
"required" : false,
|
|
"dataType" : "Object",
|
|
"type" : null,
|
|
"defaultValue" : null,
|
|
"validateType" : "",
|
|
"error" : "",
|
|
"expression" : "",
|
|
"children" : [ ]
|
|
}, {
|
|
"name" : "timestamp",
|
|
"value" : "1680361909126",
|
|
"description" : "",
|
|
"required" : false,
|
|
"dataType" : "Long",
|
|
"type" : null,
|
|
"defaultValue" : null,
|
|
"validateType" : "",
|
|
"error" : "",
|
|
"expression" : "",
|
|
"children" : [ ]
|
|
}, {
|
|
"name" : "executeTime",
|
|
"value" : "175",
|
|
"description" : "",
|
|
"required" : false,
|
|
"dataType" : "Integer",
|
|
"type" : null,
|
|
"defaultValue" : null,
|
|
"validateType" : "",
|
|
"error" : "",
|
|
"expression" : "",
|
|
"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')
|
|
|
|
return {
|
|
list: list,
|
|
total: list.getLength()
|
|
} |