mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-02-21 02:12:50 +08:00
升级magic-api 2.0 增加操作日志、登录日志
This commit is contained in:
parent
b630ed3828
commit
d743d7c95b
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"name" : "后台",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "0",
|
||||
"path" : "",
|
||||
"paths" : [ ],
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "1952f25c81084e24b55b11385767dc38",
|
||||
"name" : "安全",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/security",
|
||||
"paths" : [ ],
|
||||
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
||||
"name" : "登录",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1646400972875,
|
||||
"createTime" : 1646490239399,
|
||||
"updateTime" : 1646482165171,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/login",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"require_login\",\"value\":\"false\",\"description\":\"该接口需要登录才允许访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "require_login",
|
||||
"value" : "false",
|
||||
"description" : "该接口需要登录才允许访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\r\n \"username\": \"admin\",\r\n \"password\": \"123456\"\r\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -125,16 +139,14 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"require_login" : "false"
|
||||
}
|
||||
}
|
||||
================================
|
||||
import log
|
||||
import 'cn.dev33.satoken.secure.SaSecureUtil';
|
||||
import 'cn.dev33.satoken.stp.StpUtil';
|
||||
import env;
|
||||
import env;
|
||||
import request;
|
||||
|
||||
var user
|
||||
if(env.get('super-password') == body.password){
|
||||
@ -143,9 +155,18 @@ if(env.get('super-password') == body.password){
|
||||
user = db.table("sys_user").where().eq("username",body.username).eq("password",SaSecureUtil.sha256(body.password)).selectOne()
|
||||
}
|
||||
|
||||
var loginLog = {
|
||||
username: body.username,
|
||||
type: '成功',
|
||||
ip: request.getClientIP()
|
||||
}
|
||||
|
||||
if(!user){
|
||||
loginLog.failPassword = body.password
|
||||
db.table("sys_login_log").primary("id").save(loginLog);
|
||||
exit 0,'用户名或密码错误'
|
||||
}
|
||||
db.table("sys_login_log").primary("id").save(loginLog);
|
||||
|
||||
StpUtil.login(user.id)
|
||||
return StpUtil.getTokenValueByLoginId(user.id)
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
||||
"name" : "获取当前用户权限code",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239409,
|
||||
"updateTime" : 1645715502500,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/permissions",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"\",\"value\":\"\",\"description\":\"\"}]",
|
||||
"options" : [ {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -101,9 +115,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"" : ""
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
||||
"name" : "退出登录",
|
||||
"createTime" : 1634724871162,
|
||||
"createTime" : 1646490239413,
|
||||
"updateTime" : 1634724871162,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/logout",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"require_login\",\"value\":\"false\",\"description\":\"该接口需要登录才允许访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "require_login",
|
||||
"value" : "false",
|
||||
"description" : "该接口需要登录才允许访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,9 +103,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"require_login" : "false"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
||||
"name" : "验证token",
|
||||
"createTime" : 1634724871160,
|
||||
"createTime" : 1646490239415,
|
||||
"updateTime" : 1634724871160,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/validateToken",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"require_login\",\"value\":\"false\",\"description\":\"该接口需要登录才允许访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "require_login",
|
||||
"value" : "false",
|
||||
"description" : "该接口需要登录才允许访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,9 +103,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"require_login" : "false"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "7eeba36706c24c1484ee4e84ad829f9b",
|
||||
"name" : "富文本",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/ueditor",
|
||||
"paths" : [ ],
|
||||
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "7eeba36706c24c1484ee4e84ad829f9b",
|
||||
"name" : "上传图片",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239417,
|
||||
"updateTime" : 1635926424491,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/uploadImage",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "{}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,8 +91,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
import 'org.ssssssss.magicboot.utils.FileUtils'
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "7eeba36706c24c1484ee4e84ad829f9b",
|
||||
"name" : "上传文件",
|
||||
"createTime" : 1635926414330,
|
||||
"createTime" : 1646490239420,
|
||||
"updateTime" : 1635926414330,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/uploadFile",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "{\r\n\t\r\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import 'org.ssssssss.magicboot.utils.FileUtils'
|
||||
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "7eeba36706c24c1484ee4e84ad829f9b",
|
||||
"name" : "入口get",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239422,
|
||||
"updateTime" : 1635927863001,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/main",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "{}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -101,9 +103,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"require_login" : "false"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -5,22 +5,21 @@
|
||||
"groupId" : "7eeba36706c24c1484ee4e84ad829f9b",
|
||||
"name" : "入口post",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1635927291775,
|
||||
"updateTime" : 1646490257556,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/main",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"require_login" : "false"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import response;
|
||||
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "7eeba36706c24c1484ee4e84ad829f9b",
|
||||
"name" : "配置",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239427,
|
||||
"updateTime" : 1635927563365,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/config",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"\",\"value\":\"\",\"description\":\"\"}]",
|
||||
"options" : [ {
|
||||
"name" : "",
|
||||
"value" : "",
|
||||
"description" : "",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -485,10 +499,6 @@
|
||||
"children" : [ ]
|
||||
} ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"" : "",
|
||||
"require_login" : "false"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "c7ce65f5b3cf4aaa913f6fec7d35d176",
|
||||
"name" : "数据字典",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/dict",
|
||||
"paths" : [ ],
|
||||
|
@ -4,24 +4,46 @@
|
||||
"script" : null,
|
||||
"groupId" : "c7ce65f5b3cf4aaa913f6fec7d35d176",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239430,
|
||||
"updateTime" : 1644121671060,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/save",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"wrap_request_parameter\",\"value\":\"data\",\"description\":\"包装请求参数到一个变量中\"},{\"name\":\"permission\",\"value\":\"dict:save\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : "包装请求参数到一个变量中",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "permission",
|
||||
"value" : "dict:save",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"wrap_request_parameter" : "data",
|
||||
"permission" : "dict:save"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
var typeCount = db.selectInt("select count(1) from sys_dict where is_del = 0 and type = #{data.type} ?{id, and id != #{data.id}}")
|
||||
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "c7ce65f5b3cf4aaa913f6fec7d35d176",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239432,
|
||||
"updateTime" : 1644121689680,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/list",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"dict:view\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "dict:view",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,9 +103,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"permission" : "dict:view"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -4,23 +4,34 @@
|
||||
"script" : null,
|
||||
"groupId" : "c7ce65f5b3cf4aaa913f6fec7d35d176",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239434,
|
||||
"updateTime" : 1644121690359,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/delete",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"dict:delete\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "dict:delete",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"permission" : "dict:delete"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
db.table("sys_dict_items").logic().where().eq("dictId",id).delete()
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "376f26eb43a44a3daeafd27020a96f48",
|
||||
"name" : "字典项",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "c7ce65f5b3cf4aaa913f6fec7d35d176",
|
||||
"path" : "/items",
|
||||
"paths" : [ ],
|
||||
|
@ -4,24 +4,46 @@
|
||||
"script" : null,
|
||||
"groupId" : "376f26eb43a44a3daeafd27020a96f48",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239437,
|
||||
"updateTime" : 1644121691372,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/save",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"wrap_request_parameter\",\"value\":\"data\",\"description\":\"包装请求参数到一个变量中\"},{\"name\":\"permission\",\"value\":\"dict:items:save\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : "包装请求参数到一个变量中",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "permission",
|
||||
"value" : "dict:items:save",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"wrap_request_parameter" : "data",
|
||||
"permission" : "dict:items:save"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
var valueCount = db.selectInt("select count(1) from sys_dict_items where is_del = 0 and dict_id = #{data.dictId} and value = #{data.value} ?{id, and id != #{data.id}}")
|
||||
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "376f26eb43a44a3daeafd27020a96f48",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239439,
|
||||
"updateTime" : 1644121692556,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/list",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"dict:items:view\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "dict:items:view",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -197,9 +211,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"permission" : "dict:items:view"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -4,23 +4,34 @@
|
||||
"script" : null,
|
||||
"groupId" : "376f26eb43a44a3daeafd27020a96f48",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239443,
|
||||
"updateTime" : 1644121693440,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/delete",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"dict:items:delete\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "dict:items:delete",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"permission" : "dict:items:delete"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.table("sys_dict_items").logic().where().eq("id",id).delete();
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "376f26eb43a44a3daeafd27020a96f48",
|
||||
"name" : "获取所有字典项",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239446,
|
||||
"updateTime" : 1634735167647,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/all",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "{\r\n\t\r\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,8 +91,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
return db.select("""
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "376f26eb43a44a3daeafd27020a96f48",
|
||||
"name" : "获取排序号",
|
||||
"createTime" : 1634735599490,
|
||||
"createTime" : 1646490239449,
|
||||
"updateTime" : 1634735599490,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/sort",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.selectInt("""select max(sort) + 10 from sys_dict_items where dict_id = #{dictId} and is_del = '0'""") || 10;
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "c7ce65f5b3cf4aaa913f6fec7d35d176",
|
||||
"name" : "获取排序号",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239435,
|
||||
"updateTime" : 1634735056733,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/sort",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.selectInt("""select max(sort) + 10 from sys_dict where is_del = '0'""") || 10;
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "文件管理",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/file",
|
||||
"paths" : [ ],
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "上传",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239451,
|
||||
"updateTime" : 1643706737853,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/upload",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import org.ssssssss.magicboot.utils.FileUtils
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239453,
|
||||
"updateTime" : 1643706734133,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/delete",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import java.net.URLDecoder
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "排序",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239454,
|
||||
"updateTime" : 1643706726137,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/resort",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import java.net.URLDecoder
|
||||
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "获取文件列表",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239456,
|
||||
"updateTime" : 1635075004674,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/files",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -101,8 +103,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
return db.select("select url from sys_file where external_id = #{externalId} and external_type = #{externalType} order by sort").map(it => {return it.url})
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab",
|
||||
"name" : "裁剪",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239458,
|
||||
"updateTime" : 1643706719537,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/cropper",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import org.ssssssss.magicboot.model.Global
|
||||
|
10
data/magic-api/api/后台/日志管理/group.json
Normal file
10
data/magic-api/api/后台/日志管理/group.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"properties" : { },
|
||||
"id" : "9ec6f9ec92d24a369952bb13eddc134f",
|
||||
"name" : "日志管理",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/log",
|
||||
"paths" : [ ],
|
||||
"options" : [ ]
|
||||
}
|
258
data/magic-api/api/后台/日志管理/操作日志.ms
Normal file
258
data/magic-api/api/后台/日志管理/操作日志.ms
Normal file
File diff suppressed because one or more lines are too long
258
data/magic-api/api/后台/日志管理/登录日志.ms
Normal file
258
data/magic-api/api/后台/日志管理/登录日志.ms
Normal file
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "42d241c0bb18476f8dabf92c2e4e2324",
|
||||
"name" : "测试数据",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/test",
|
||||
"paths" : [ ],
|
||||
|
@ -4,23 +4,34 @@
|
||||
"script" : null,
|
||||
"groupId" : "42d241c0bb18476f8dabf92c2e4e2324",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239463,
|
||||
"updateTime" : 1642312068428,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/save",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"wrap_request_parameter\",\"value\":\"data\",\"description\":\"包装请求参数到一个变量中\"}]",
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : "包装请求参数到一个变量中",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"wrap_request_parameter" : "data"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.table("sys_test_data").primary("id").saveOrUpdate(data)
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "42d241c0bb18476f8dabf92c2e4e2324",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239464,
|
||||
"updateTime" : 1642327645651,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/list",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "用户管理",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/user",
|
||||
"paths" : [ ],
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "个人信息修改",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239466,
|
||||
"updateTime" : 1643713357950,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/center/update",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "{\r\n\t\r\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||
|
@ -4,23 +4,34 @@
|
||||
"script" : null,
|
||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239467,
|
||||
"updateTime" : 1644121682487,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/save",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"user:save\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "user:save",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"permission" : "user:save"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "修改登录状态",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239469,
|
||||
"updateTime" : 1634729738648,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/change/login/status",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.table("sys_user").column("isLogin", isLogin).where().eq("id",id).update()
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239471,
|
||||
"updateTime" : 1644121683184,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/list",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"user:view\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "user:view",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,9 +103,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"permission" : "user:view"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -4,23 +4,34 @@
|
||||
"script" : null,
|
||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239473,
|
||||
"updateTime" : 1644121688496,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/delete",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"user:delete\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "user:delete",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"permission" : "user:delete"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import org.ssssssss.magicapi.cache.SqlCache
|
||||
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "所有机构",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239474,
|
||||
"updateTime" : 1642134606249,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/offices",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -233,8 +235,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
var toTree = (list,pid) => select t.*,toTree(list,t.id) children from list t where t.pid = pid
|
||||
|
@ -4,11 +4,13 @@
|
||||
"script" : null,
|
||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "根据用户id获取角色列表",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239476,
|
||||
"updateTime" : 1642773983120,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/roles",
|
||||
"method" : "GET",
|
||||
"parameters" : [ {
|
||||
"name" : "userId",
|
||||
"value" : "674a3aa6b1ea4d91a1f72e7879d415c3",
|
||||
@ -22,7 +24,7 @@
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -101,8 +103,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
return db.select("""
|
||||
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
||||
"name" : "获取用户信息",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239479,
|
||||
"updateTime" : 1643710783720,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/info",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "{}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,8 +91,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
import 'cn.dev33.satoken.stp.StpUtil';
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "组件",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/component",
|
||||
"paths" : [ ],
|
||||
|
@ -4,23 +4,34 @@
|
||||
"script" : null,
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239481,
|
||||
"updateTime" : 1646401456776,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/save",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"wrap_request_parameter\",\"value\":\"data\",\"description\":\"包装请求参数到一个变量中\"}]",
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : "包装请求参数到一个变量中",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"wrap_request_parameter" : "data"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.table("sys_component").primary("id").saveOrUpdate(data)
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239482,
|
||||
"updateTime" : 1646401619732,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/list",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.page("""
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239484,
|
||||
"updateTime" : 1646401575406,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/delete",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.table("sys_component").logic().where().eq("id",id).delete()
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "详情",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239485,
|
||||
"updateTime" : 1646401567689,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/get",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -185,8 +187,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
return db.table("sys_component").where().eq("id",id).selectOne()
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "6f106ebdee21489db34b956f7770ff03",
|
||||
"name" : "选择组件",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239487,
|
||||
"updateTime" : 1646402724502,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/select",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,8 +91,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
return db.select("""
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "8295fc13678d4144bf7363c465247a50",
|
||||
"name" : "组织机构",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/office",
|
||||
"paths" : [ ],
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "8295fc13678d4144bf7363c465247a50",
|
||||
"name" : "上移",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239489,
|
||||
"updateTime" : 1641732205207,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/sort/up",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
var top = db.selectOne("""
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "8295fc13678d4144bf7363c465247a50",
|
||||
"name" : "下移",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239491,
|
||||
"updateTime" : 1641737498723,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/sort/down",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
var top = db.selectOne("""
|
||||
|
@ -4,24 +4,46 @@
|
||||
"script" : null,
|
||||
"groupId" : "8295fc13678d4144bf7363c465247a50",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239492,
|
||||
"updateTime" : 1644121675551,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/save",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"wrap_request_parameter\",\"value\":\"data\",\"description\":\"包装请求参数到一个变量中\"},{\"name\":\"permission\",\"value\":\"office:save\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : "包装请求参数到一个变量中",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "permission",
|
||||
"value" : "office:save",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"wrap_request_parameter" : "data",
|
||||
"permission" : "office:save"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
var codeCount = db.selectInt("select count(1) from sys_office where is_del = 0 and code = #{code} ?{id, and id != #{id}}")
|
||||
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "8295fc13678d4144bf7363c465247a50",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239494,
|
||||
"updateTime" : 1645694064991,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/tree",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"office:view\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "office:view",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,9 +103,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"permission" : "office:view"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "8295fc13678d4144bf7363c465247a50",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239496,
|
||||
"updateTime" : 1644121676877,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/delete",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"office:delete\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "office:delete",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,9 +103,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"permission" : "office:delete"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "8295fc13678d4144bf7363c465247a50",
|
||||
"name" : "根据角色获取组织机构",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239498,
|
||||
"updateTime" : 1642080922495,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/by/role",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,8 +91,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
return db.select("""
|
||||
|
@ -4,11 +4,13 @@
|
||||
"script" : null,
|
||||
"groupId" : "8295fc13678d4144bf7363c465247a50",
|
||||
"name" : "获取排序号",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239501,
|
||||
"updateTime" : 1641732159522,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/sort",
|
||||
"method" : "GET",
|
||||
"parameters" : [ {
|
||||
"name" : "pid",
|
||||
"value" : "",
|
||||
@ -22,15 +24,14 @@
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.selectInt("""
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "菜单管理",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/menu",
|
||||
"paths" : [ ],
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "上移",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239503,
|
||||
"updateTime" : 1641564601649,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/sort/up",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
var top = db.selectOne("""
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "下移",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239505,
|
||||
"updateTime" : 1641564596885,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/sort/down",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
var top = db.selectOne("""
|
||||
|
@ -4,24 +4,46 @@
|
||||
"script" : null,
|
||||
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239506,
|
||||
"updateTime" : 1644121672548,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/save",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"wrap_request_parameter\",\"value\":\"data\",\"description\":\"包装请求参数到一个变量中\"},{\"name\":\"permission\",\"value\":\"menu:save\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : "包装请求参数到一个变量中",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
}, {
|
||||
"name" : "permission",
|
||||
"value" : "menu:save",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"wrap_request_parameter" : "data",
|
||||
"permission" : "menu:save"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import org.ssssssss.magicapi.cache.SqlCache;
|
||||
|
@ -4,23 +4,34 @@
|
||||
"script" : null,
|
||||
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "修改是否显示",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239508,
|
||||
"updateTime" : 1641482987357,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/change",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"wrap_request_parameter\",\"value\":\"data\",\"description\":\"包装请求参数到一个变量中\"}]",
|
||||
"options" : [ {
|
||||
"name" : "wrap_request_parameter",
|
||||
"value" : "data",
|
||||
"description" : "包装请求参数到一个变量中",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"wrap_request_parameter" : "data"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.table("sys_menu").primary("id").update(data)
|
@ -4,11 +4,13 @@
|
||||
"script" : null,
|
||||
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239510,
|
||||
"updateTime" : 1644121673352,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/delete",
|
||||
"method" : "POST",
|
||||
"parameters" : [ {
|
||||
"name" : "id",
|
||||
"value" : "b1851d1b13594e71840103c11a37a669",
|
||||
@ -22,7 +24,19 @@
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"menu:delete\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "menu:delete",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -101,9 +115,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"permission" : "menu:delete"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "当前用户菜单",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239513,
|
||||
"updateTime" : 1646450734459,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/current/menus",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -533,8 +535,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
import 'cn.dev33.satoken.stp.StpUtil';
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "根据菜单id清除缓存",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239517,
|
||||
"updateTime" : 1641218495832,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/cache/delete",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import org.ssssssss.magicapi.cache.SqlCache
|
||||
|
@ -4,11 +4,13 @@
|
||||
"script" : null,
|
||||
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "根据角色获取菜单",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239520,
|
||||
"updateTime" : 1642080927004,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/by/role",
|
||||
"method" : "GET",
|
||||
"parameters" : [ {
|
||||
"name" : "roleId",
|
||||
"value" : "4d80f40315f747768d5b14095a0a7336",
|
||||
@ -22,7 +24,7 @@
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -113,8 +115,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
return db.select("""
|
||||
|
@ -4,11 +4,13 @@
|
||||
"script" : null,
|
||||
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "获取排序号",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239522,
|
||||
"updateTime" : 1641732167291,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/sort",
|
||||
"method" : "GET",
|
||||
"parameters" : [ {
|
||||
"name" : "pid",
|
||||
"value" : "",
|
||||
@ -22,15 +24,14 @@
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
return db.selectInt("""
|
||||
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
||||
"name" : "获取菜单tree",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239523,
|
||||
"updateTime" : 1646402874965,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/tree",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"menu:view\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "menu:view",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,9 +103,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"permission" : "menu:view"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "89130d496f6f467c88b22ae4a7f688eb",
|
||||
"name" : "角色管理",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/role",
|
||||
"paths" : [ ],
|
||||
|
@ -4,23 +4,34 @@
|
||||
"script" : null,
|
||||
"groupId" : "89130d496f6f467c88b22ae4a7f688eb",
|
||||
"name" : "保存",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239526,
|
||||
"updateTime" : 1644121680268,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/save",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"role:save\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "role:save",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"permission" : "role:save"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import '@get:/role/cache/delete' as cacheDelete
|
||||
|
@ -4,13 +4,27 @@
|
||||
"script" : null,
|
||||
"groupId" : "89130d496f6f467c88b22ae4a7f688eb",
|
||||
"name" : "列表",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239527,
|
||||
"updateTime" : 1644121680976,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/list",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"role:view\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "role:view",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -149,9 +163,6 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : {
|
||||
"permission" : "role:view"
|
||||
}
|
||||
}
|
||||
================================
|
||||
|
@ -4,23 +4,34 @@
|
||||
"script" : null,
|
||||
"groupId" : "89130d496f6f467c88b22ae4a7f688eb",
|
||||
"name" : "删除",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239530,
|
||||
"updateTime" : 1644121681716,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/delete",
|
||||
"method" : "POST",
|
||||
"parameters" : [ ],
|
||||
"option" : "[{\"name\":\"permission\",\"value\":\"role:delete\",\"description\":\"允许拥有该权限的访问\"}]",
|
||||
"options" : [ {
|
||||
"name" : "permission",
|
||||
"value" : "role:delete",
|
||||
"description" : "允许拥有该权限的访问",
|
||||
"required" : false,
|
||||
"dataType" : "String",
|
||||
"type" : null,
|
||||
"defaultValue" : null,
|
||||
"validateType" : null,
|
||||
"error" : null,
|
||||
"expression" : null,
|
||||
"children" : null
|
||||
} ],
|
||||
"requestBody" : "{\n\n}",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : {
|
||||
"permission" : "role:delete"
|
||||
}
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import '@get:/role/cache/delete' as cacheDelete
|
||||
|
@ -4,21 +4,22 @@
|
||||
"script" : null,
|
||||
"groupId" : "89130d496f6f467c88b22ae4a7f688eb",
|
||||
"name" : "根据角色id删除缓存",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239532,
|
||||
"updateTime" : 1641218346505,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/cache/delete",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
"responseBody" : null,
|
||||
"description" : null,
|
||||
"requestBodyDefinition" : null,
|
||||
"responseBodyDefinition" : null,
|
||||
"optionMap" : { }
|
||||
"responseBodyDefinition" : null
|
||||
}
|
||||
================================
|
||||
import org.ssssssss.magicapi.cache.SqlCache
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "5c36bdc1de454d6e9d1a464d87c96091",
|
||||
"name" : "配置",
|
||||
"type" : "1",
|
||||
"type" : "api",
|
||||
"parentId" : "02df51e4d7184780a98b632f43dc5848",
|
||||
"path" : "/config",
|
||||
"paths" : [ ],
|
||||
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "5c36bdc1de454d6e9d1a464d87c96091",
|
||||
"name" : "获取所有配置",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239534,
|
||||
"updateTime" : 1646391487051,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/list",
|
||||
"method" : "GET",
|
||||
"parameters" : [ ],
|
||||
"option" : "[]",
|
||||
"options" : [ ],
|
||||
"requestBody" : "",
|
||||
"headers" : [ ],
|
||||
"paths" : [ ],
|
||||
@ -89,8 +91,7 @@
|
||||
"expression" : "",
|
||||
"children" : [ ]
|
||||
} ]
|
||||
},
|
||||
"optionMap" : { }
|
||||
}
|
||||
}
|
||||
================================
|
||||
import 'org.ssssssss.magicboot.utils.WebUtils'
|
||||
|
@ -2,7 +2,7 @@
|
||||
"properties" : { },
|
||||
"id" : "41922e26ef57421f8819fe6c59f14d63",
|
||||
"name" : "权限",
|
||||
"type" : "2",
|
||||
"type" : "function",
|
||||
"parentId" : "0",
|
||||
"path" : "/permission",
|
||||
"paths" : [ ],
|
||||
|
@ -4,13 +4,15 @@
|
||||
"script" : null,
|
||||
"groupId" : "41922e26ef57421f8819fe6c59f14d63",
|
||||
"name" : "组织机构",
|
||||
"createTime" : null,
|
||||
"createTime" : 1646490239535,
|
||||
"updateTime" : 1642327198030,
|
||||
"lock" : "0",
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
"path" : "/office",
|
||||
"description" : null,
|
||||
"returnType" : null,
|
||||
"mappingPath" : null,
|
||||
"mappingPath" : "/permission/office",
|
||||
"parameters" : [ ]
|
||||
}
|
||||
================================
|
||||
|
@ -4,6 +4,24 @@
|
||||
font-weight: 100;
|
||||
font-style: normal;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
overflow: auto
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #e6e6e6;
|
||||
min-height: 25px;
|
||||
min-width: 25px;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 99px
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #efefef
|
||||
}
|
||||
body{
|
||||
--el-dialog__wrapper-bottom: 15vh;
|
||||
--el-dialog__wrapper-top: 15vh;
|
||||
|
@ -8,12 +8,12 @@
|
||||
v-else-if="it.type == 'date' || it.type == 'datetime' || it.type == 'daterange' || it.type == 'datetimerange'"
|
||||
v-model="it.value"
|
||||
align="right"
|
||||
:format="it.type.startsWith('datetime') ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
|
||||
:value-format="it.type.startsWith('datetime') ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
|
||||
:format="it.type.startsWith('datetime') ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'"
|
||||
:value-format="it.type.startsWith('datetime') ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'"
|
||||
:type="it.type"
|
||||
:start-placeholder="it.type.startsWith('datetime') ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
|
||||
:end-placeholder="it.type.startsWith('datetime') ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
|
||||
:placeholder="it.type.startsWith('datetime') ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd'"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
:placeholder="it.type.startsWith('datetime') ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'"
|
||||
>
|
||||
</el-date-picker>
|
||||
<component v-else :is="it.type" v-model="it.value" v-bind="it.properties" />
|
||||
|
1
magic-boot-ui/src/icons/component.svg
Normal file
1
magic-boot-ui/src/icons/component.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646452992174" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4758" width="200" height="200" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M914.5 653.5c-5.5 0-11 1.1-16 3.3l-0.2 0.1h-0.2L510.2 822.2 122.2 657h-0.2l-0.2-0.1c-5-2.1-10.3-3.3-16-3.3-23.1 0-41.8 19.3-41.8 43.1 0 18 10.7 33.3 25.8 39.8l403.9 172.1 0.4 0.1c10.2 4.4 21.8 4.4 32 0l0.2-0.1c0.1 0 0.1-0.1 0.2-0.1l403.9-172.1c15.1-6.5 25.8-21.8 25.8-39.8 0.1-23.8-18.6-43.1-41.7-43.1z m0-186.5c-7.9-0.2-16 3.2-16 3.2L510.2 635.6 121.8 470.2s-10.3-3.2-16-3.2C82.7 467 64 486.2 64 510c0 17.9 10.7 33.3 25.8 39.7l403.9 172c0.1 0 0.1 0.1 0.2 0.1l0.1 0.1c5 2.1 10.3 3.3 16 3.3 5.7 0 11.1-1.2 16-3.3l0.2-0.1c0.1 0 0.1 0 0.2-0.1l403.9-172c15.1-6.4 25.8-21.8 25.9-39.7 0.1-23.8-18.6-43-41.7-43zM89.8 363.2l403.9 172.1c0.1 0 0.1 0 0.2 0.1l0.1 0.1c5 2.1 10.3 3.2 16 3.2 5.5 0 10.9-1.1 16-3.2l0.2-0.1 0.2-0.1 403.9-172c15.1-6.5 25.8-21.8 25.9-39.7 0-18-10.7-33.3-25.8-39.8L526.5 111.6c-0.1 0-0.1 0-0.2-0.1l-0.2-0.1c-10.2-4.4-21.8-4.4-32 0l-0.1 0.1L89.8 283.7C74.7 290.1 64 305.5 64 323.5c0 17.9 10.7 33.2 25.8 39.7z" p-id="4759" fill="#909399"></path></svg>
|
After Width: | Height: | Size: 1.3 KiB |
1
magic-boot-ui/src/icons/interface.svg
Normal file
1
magic-boot-ui/src/icons/interface.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646453038639" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4992" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M870.4 256h-153.6V153.6a51.2 51.2 0 0 0-102.4 0v102.4H409.6V153.6a51.2 51.2 0 0 0-102.4 0v102.4H153.6a51.2 51.2 0 0 0 0 102.4h51.2v102.4a51.2 51.2 0 0 0 0 12.8A322.56 322.56 0 0 0 204.8 512a307.2 307.2 0 0 0 256 302.592V921.6h102.4v-107.008A307.2 307.2 0 0 0 819.2 512a322.56 322.56 0 0 0 0-38.4A51.2 51.2 0 0 0 819.2 460.8V358.4h51.2a51.2 51.2 0 0 0 0-102.4z m-153.6 204.8h-7.168a209.408 209.408 0 0 1 7.168 51.2 204.8 204.8 0 0 1-409.6 0 209.408 209.408 0 0 1 7.168-51.2H307.2V358.4h409.6z" fill="#909399" p-id="4993"></path></svg>
|
After Width: | Height: | Size: 910 B |
1
magic-boot-ui/src/icons/log.svg
Normal file
1
magic-boot-ui/src/icons/log.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646472156835" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5189" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M956.8 828.7c3.2 20-0.8 38-12 54-11.1 16-26.4 25.7-45.5 29l-115.1 19c-18.5 3.3-35.7-0.9-51.3-12.5-15.6-11.6-25.1-27.5-28.3-47.5l-97.8-646c-1.3-10-0.8-19.5 1.4-28.5s6-17.4 11-25c5.1-7.7 11.7-14 19.7-19s16.8-8.5 26.4-10.5l114.1-19c19.2-3.3 36.4 1 51.8 13 15.4 12 24.6 28 27.8 48l97.8 645zM510 99.6c19.2 0 35.5 7 48.9 21 13.4 14 20.1 31 20.1 51v667.9c0 20-6.7 37-20.1 51-13.4 14-29.7 21-48.9 21h-99.7c-19.2 0-35.5-7-48.9-21-13.4-14-20.1-31-20.1-51V171.6c0-20 5.1-37 15.4-51s25.3-21 45-21H510z m23.4 504c6.4 0 11.8-3.1 16.3-9.5 4.5-6.3 6.7-13.9 6.7-22.5 0-9.4-2.3-17-6.7-23-4.5-6-9.9-9-16.3-9h-99.7c-6.4 0-11.8 3-16.3 9s-6.7 13.7-6.7 23c0 8.7 2.2 16.2 6.7 22.5 4.5 6.4 9.9 9.5 16.3 9.5h99.7z m0-127.1c6.4 0 11.8-3.1 16.3-9.5 4.5-6.3 6.7-14.2 6.7-23.5s-2.3-17-6.7-23c-4.5-6.1-9.9-9-16.3-9h-99.7c-6.4 0-11.8 3-16.3 9s-6.7 13.7-6.7 23 2.2 17.2 6.7 23.5c4.5 6.3 9.9 9.5 16.3 9.5h99.7z m-301-376.9c19.2 0 35.7 7 49.3 21 13.7 14 20.6 31 20.6 51v667.9c0 20-6.8 37-20.6 51s-30.2 21-49.3 21h-99.7c-19.2 0-35.7-7-49.3-21-13.8-14-20.6-31-20.6-51V171.6c0-20 6.8-37 20.6-51s30.2-21 49.3-21h99.7z m-95.9 250c-7 0-12.8 3-17.2 9-4.5 6-6.7 13.7-6.7 23 0 8.7 2.2 16.2 6.7 22.5 4.5 6.2 10.2 9.5 17.2 9.5h92c7 0 12.6-3.1 16.8-9.5s6.3-13.9 6.3-22.5c0-9.4-2.1-17-6.3-23-4.1-6-9.7-9-16.8-9h-92z m95.9 313.9c7 0 12.6-3 16.8-9 4.1-6 6.3-13.4 6.3-22 0-9.4-2.1-16.8-6.3-22.5s-9.7-8.5-16.8-8.5h-95.9c-7 0-12.8 2.8-17.2 8.5-4.4 5.7-6.7 13.2-6.7 22.5 0 8.7 2.2 16 6.7 22s10.2 9 17.2 9h95.9z m0-122.9c7 0 12.6-3 16.8-9 4.1-6 6.3-13.7 6.3-23 0-9.4-2.1-17-6.3-23-4.1-6-9.7-9-16.8-9h-95.9c-7 0-12.8 3-17.2 9-4.5 6-6.7 13.7-6.7 23 0 9.4 2.2 17 6.7 23 4.5 5.9 10.2 9 17.2 9h95.9z" p-id="5190" fill="#909399"></path></svg>
|
After Width: | Height: | Size: 2.0 KiB |
1
magic-boot-ui/src/icons/login-log.svg
Normal file
1
magic-boot-ui/src/icons/login-log.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646472142600" class="icon" viewBox="0 0 1038 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4847" xmlns:xlink="http://www.w3.org/1999/xlink" width="202.734375" height="200"><defs><style type="text/css"></style></defs><path d="M76.778433 76.778433h776.41112v328.249368h77.209773v-345.071609A59.956192 59.956192 0 0 0 872.599832 0H59.956192A59.956192 59.956192 0 0 0 0 59.956192v898.048863a59.956192 59.956192 0 0 0 59.956192 59.956192H474.473463v-75.915754H76.778433z" p-id="4848" fill="#909399"></path><path d="M209.631003 256.647009h513.294018v81.091828H209.631003zM209.631003 472.748104h389.068239v81.091829H209.631003zM209.631003 684.535805h278.213984v81.091828H209.631003zM914.871104 774.685762a163.046335 163.046335 0 1 0-227.747262 0 180.731255 180.731255 0 0 0-122.069082 180.731256c0 68.582982 102.227464 68.582982 243.706824 68.582982h86.267902c59.956192 0 101.364785-3.450716 125.088458-27.605729a57.799495 57.799495 0 0 0 17.68492-43.133951 172.535805 172.535805 0 0 0-122.93176-178.574558zM733.277169 590.503791a94.894693 94.894693 0 0 1 67.288964-28.037068 92.306655 92.306655 0 1 1-67.288964 26.74305z m122.500422 364.913227h-46.584668a862.679023 862.679023 0 0 1-172.535804-10.352149c5.607414-99.639427 92.737995-121.206403 166.065712-121.206402 144.498736 0 164.771693 70.73968 166.497051 125.951137a480.943555 480.943555 0 0 1-113.442291 5.607414z" p-id="4849" fill="#909399"></path></svg>
|
After Width: | Height: | Size: 1.5 KiB |
1
magic-boot-ui/src/icons/oper-log.svg
Normal file
1
magic-boot-ui/src/icons/oper-log.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1646472151238" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5017" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M12.795383 550.784512h92.979783a11.942357 11.942357 0 0 1 12.795383 11.942357v12.795383a12.795383 12.795383 0 0 1-12.795383 11.942358H12.795383a12.36887 12.36887 0 0 1-12.795383-11.942358v-12.795383a11.942357 11.942357 0 0 1 12.795383-11.942357z m0-365.521441h92.979783a11.942357 11.942357 0 0 1 12.795383 11.942357v12.795383a11.942357 11.942357 0 0 1-12.795383 11.942358H12.795383a11.942357 11.942357 0 0 1-12.795383-11.942358v-12.795383a11.942357 11.942357 0 0 1 12.795383-11.942357z m0 182.973977h92.979783a11.942357 11.942357 0 0 1 12.795383 11.515844v13.221896a11.942357 11.942357 0 0 1-12.795383 11.515845H12.795383a11.942357 11.942357 0 0 1-12.795383-11.515845V379.752892a11.942357 11.942357 0 0 1 12.795383-11.515844z m0 365.094928h92.979783a12.36887 12.36887 0 0 1 12.795383 11.942358v12.795383a11.942357 11.942357 0 0 1-12.795383 11.942357H12.795383a11.942357 11.942357 0 0 1-12.795383-11.942357v-12.795383a12.36887 12.36887 0 0 1 12.795383-11.942358z" p-id="5018" fill="#909399"></path><path d="M945.578804 73.090213h-69.521581a10.236306 10.236306 0 0 1-10.236307-8.103742A76.772298 76.772298 0 0 0 787.76908 0.15653H127.95383A85.302553 85.302553 0 0 0 37.533123 82.473494v54.593634a9.383281 9.383281 0 0 0 9.809794 9.383281H106.628192a47.76943 47.76943 0 0 1 49.475481 45.210353v27.296817a38.386149 38.386149 0 0 1-39.665688 37.106611H47.342917a9.383281 9.383281 0 0 0-9.809794 8.956768v54.593634a9.383281 9.383281 0 0 0 9.809794 9.383281H106.628192a47.76943 47.76943 0 0 1 49.475481 46.063379v17.913536a48.195943 48.195943 0 0 1-49.475481 46.063379H47.342917a9.383281 9.383281 0 0 0-9.809794 8.956768v54.593634a9.383281 9.383281 0 0 0 9.809794 9.383281H106.628192a47.76943 47.76943 0 0 1 49.048968 45.636866v27.296817a38.386149 38.386149 0 0 1-39.665687 36.680098H47.342917a9.809794 9.809794 0 0 0-10.236306 9.383281v54.593634a9.809794 9.809794 0 0 0 10.236306 9.383281h58.858762a47.342917 47.342917 0 0 1 49.048968 45.636866V767.87951a37.959636 37.959636 0 0 1-39.239174 36.253585H46.916404a10.236306 10.236306 0 0 0-10.236306 9.383281v127.95383A85.302553 85.302553 0 0 0 127.95383 1023.78717h810.374257a85.302553 85.302553 0 0 0 85.302553-82.316964V146.450409a76.345785 76.345785 0 0 0-78.904862-73.360196z m-343.342777 91.273732a47.76943 47.76943 0 0 1 55.446659-13.648408l94.259322 49.048968A37.959636 37.959636 0 0 1 767.72298 249.239986l-298.558937 466.178454a10.662819 10.662819 0 0 1-13.221895 3.412102l-147.573418-76.345785a8.956768 8.956768 0 0 1-3.838615-12.36887z m-178.70885 597.117874l-119.850087 42.651276a10.662819 10.662819 0 0 1-12.795383-5.544666v-2.559076l-9.809794-107.90773a9.383281 9.383281 0 0 1 8.956768-9.809794 13.648409 13.648409 0 0 1 5.971179 0l127.95383 66.962505a8.956768 8.956768 0 0 1 3.838615 12.36887 8.530255 8.530255 0 0 1-4.69164 4.69164z m522.051627 152.265057c0 40.0922-2.559077 72.933683-78.904862 72.933683H156.103673a76.772298 76.772298 0 0 1-78.051837-62.697376 8.956768 8.956768 0 0 1 7.250717-10.236307h692.230221a85.302553 85.302553 0 0 0 88.714655-82.316964V118.727079a9.809794 9.809794 0 0 1 10.236306-8.956768c38.812662 0 68.668555 5.118153 68.668556 72.933683v731.042882z" p-id="5019" fill="#909399"></path></svg>
|
After Width: | Height: | Size: 3.5 KiB |
@ -97,4 +97,4 @@
|
||||
path: path
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
@ -23,7 +23,8 @@ import global from '@/scripts/global.js'
|
||||
document.title = global.title
|
||||
router.beforeEach((to, from) => {
|
||||
global.tabValue.value = to.path
|
||||
if((to.name && global.visitedViews.length === 0 || global.visitedViews.every(it => it.path !== to.path)) && !to.path.startsWith('/redirect')){
|
||||
if((to.name && global.visitedViews.length === 0 || global.visitedViews.every(it => it.path !== to.path)) && !to.path.startsWith('/redirect') && !to.path.startsWith('/login')){
|
||||
console.log(to)
|
||||
global.visitedViews.push(to)
|
||||
}
|
||||
return true
|
||||
|
@ -54,29 +54,31 @@ service.interceptors.response.use(
|
||||
var duration = 5
|
||||
if (res.code === 402) {
|
||||
duration = 1
|
||||
ElMessageBox.prompt(`当前账号:${global.user.info.username}凭证已过期,请输入密码重新登录`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '退出',
|
||||
inputType: 'password',
|
||||
closeOnClickModal: false,
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
login({
|
||||
username: global.user.info.username,
|
||||
password: instance.inputValue
|
||||
}).then((res) => {
|
||||
if (res) {
|
||||
done()
|
||||
service(response.config).then(ret => reslove(ret))
|
||||
}
|
||||
})
|
||||
} else if (action === 'cancel') {
|
||||
logout()
|
||||
} else {
|
||||
done()
|
||||
if(global.user.info.username){
|
||||
ElMessageBox.prompt(`当前账号:${global.user.info.username}凭证已过期,请输入密码重新登录`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '退出',
|
||||
inputType: 'password',
|
||||
closeOnClickModal: false,
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
login({
|
||||
username: global.user.info.username,
|
||||
password: instance.inputValue
|
||||
}).then((res) => {
|
||||
if (res) {
|
||||
done()
|
||||
service(response.config).then(ret => reslove(ret))
|
||||
}
|
||||
})
|
||||
} else if (action === 'cancel') {
|
||||
logout()
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
if (res.code !== 402) {
|
||||
if(currentMessage){
|
||||
|
46
magic-boot-ui/src/views/system/log/login-log.vue
Normal file
46
magic-boot-ui/src/views/system/log/login-log.vue
Normal file
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<mb-search :where="tableOptions.where" @search="reloadTable" />
|
||||
<mb-table ref="table" v-bind="tableOptions" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
const table = ref()
|
||||
const tableOptions = reactive({
|
||||
url: 'log/login/list',
|
||||
where: {
|
||||
createDate: {
|
||||
type: 'datetimerange',
|
||||
label: '创建时间',
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
cols: [
|
||||
{
|
||||
field: 'username',
|
||||
title: '登录名'
|
||||
},
|
||||
{
|
||||
field: 'failPassword',
|
||||
title: '失败密码'
|
||||
},
|
||||
{
|
||||
field: 'type',
|
||||
title: '登录状态'
|
||||
},
|
||||
{
|
||||
field: 'ip',
|
||||
title: 'ip'
|
||||
},
|
||||
{
|
||||
field: 'createDate',
|
||||
title: '操作时间'
|
||||
}
|
||||
]
|
||||
})
|
||||
function reloadTable(){
|
||||
table.value.reloadList()
|
||||
}
|
||||
</script>
|
58
magic-boot-ui/src/views/system/log/oper-log.vue
Normal file
58
magic-boot-ui/src/views/system/log/oper-log.vue
Normal file
@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<mb-search :where="tableOptions.where" @search="reloadTable" />
|
||||
<mb-table ref="table" v-bind="tableOptions" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
const table = ref()
|
||||
const tableOptions = reactive({
|
||||
url: 'log/oper/list',
|
||||
where: {
|
||||
createDate: {
|
||||
type: 'datetimerange',
|
||||
label: '创建时间',
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
cols: [
|
||||
{
|
||||
field: 'apiName',
|
||||
title: '接口名'
|
||||
},
|
||||
{
|
||||
field: 'apiPath',
|
||||
title: '路径'
|
||||
},
|
||||
{
|
||||
field: 'apiMethod',
|
||||
title: '方法'
|
||||
},
|
||||
{
|
||||
field: 'userIp',
|
||||
title: 'ip'
|
||||
},
|
||||
{
|
||||
field: 'costTime',
|
||||
title: '耗时'
|
||||
},
|
||||
{
|
||||
field: 'userAgent',
|
||||
title: '用户代理'
|
||||
},
|
||||
{
|
||||
field: 'username',
|
||||
title: '操作人'
|
||||
},
|
||||
{
|
||||
field: 'createDate',
|
||||
title: '操作时间'
|
||||
}
|
||||
]
|
||||
})
|
||||
function reloadTable(){
|
||||
table.value.reloadList()
|
||||
}
|
||||
</script>
|
@ -17,7 +17,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="上级菜单" prop="pid">
|
||||
<treeselect v-model="temp.pid" :options="menuTree" />
|
||||
<treeselect v-model="temp.pid" :options="menuTree" :key="temp.pid" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -44,7 +44,7 @@
|
||||
<a @click="openIcons">
|
||||
<el-input v-model="temp.icon" class="input-with-select">
|
||||
<template #append>
|
||||
<el-button style="height:40px;">
|
||||
<el-button style="height:32px;">
|
||||
<mb-icon :icon="temp.icon" />
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="组织机构" prop="officeId">
|
||||
<treeselect v-model="temp.officeId" :options="officeTree" :show-count="true" placeholder="请选择组织机构" />
|
||||
<treeselect v-model="temp.officeId" :options="officeTree" :key="temp.officeId" :show-count="true" placeholder="请选择组织机构" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -14,7 +14,7 @@
|
||||
<description>magic-boot</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<magic-api.version>1.7.5</magic-api.version>
|
||||
<magic-api.version>2.0.0-beta.2</magic-api.version>
|
||||
<druid.version>1.2.1</druid.version>
|
||||
<hutool-all.version>5.7.13</hutool-all.version>
|
||||
<sa-token.version>1.26.0</sa-token.version>
|
||||
|
@ -1,7 +1,7 @@
|
||||
package org.ssssssss.magicboot.extension;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.ssssssss.magicapi.modules.table.NamedTable;
|
||||
import org.ssssssss.magicapi.modules.db.table.NamedTable;
|
||||
import org.ssssssss.magicboot.model.MagicBootConstants;
|
||||
import org.ssssssss.script.annotation.Comment;
|
||||
import org.ssssssss.script.functions.ExtensionMethod;
|
||||
|
@ -4,10 +4,11 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
import org.ssssssss.magicapi.context.RequestContext;
|
||||
import org.ssssssss.magicapi.modules.ResponseModule;
|
||||
import org.ssssssss.magicapi.core.context.RequestContext;
|
||||
import org.ssssssss.magicapi.modules.servlet.ResponseModule;
|
||||
import org.ssssssss.script.annotation.Comment;
|
||||
import org.ssssssss.script.functions.ExtensionMethod;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -36,4 +37,4 @@ public class ResponseFunctionExtension implements ExtensionMethod {
|
||||
return responseModule.end();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -3,13 +3,14 @@ package org.ssssssss.magicboot.interceptor;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.ssssssss.magicapi.interceptor.NamedTableInterceptor;
|
||||
import org.ssssssss.magicapi.model.SqlMode;
|
||||
import org.ssssssss.magicapi.modules.table.NamedTable;
|
||||
import static org.ssssssss.magicboot.model.MagicBootConstants.*;
|
||||
import org.ssssssss.magicapi.modules.db.inteceptor.NamedTableInterceptor;
|
||||
import org.ssssssss.magicapi.modules.db.model.SqlMode;
|
||||
import org.ssssssss.magicapi.modules.db.table.NamedTable;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static org.ssssssss.magicboot.model.MagicBootConstants.*;
|
||||
|
||||
@Component
|
||||
public class NamedTableHandlerInterceptor implements NamedTableInterceptor {
|
||||
|
||||
|
@ -1,29 +1,42 @@
|
||||
package org.ssssssss.magicboot.interceptor;
|
||||
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.hutool.extra.servlet.ServletUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.ssssssss.magicapi.interceptor.RequestInterceptor;
|
||||
import org.ssssssss.magicapi.model.ApiInfo;
|
||||
import org.ssssssss.magicapi.model.Options;
|
||||
import org.ssssssss.magicapi.provider.MagicAPIService;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
import org.ssssssss.magicapi.core.context.RequestEntity;
|
||||
import org.ssssssss.magicapi.core.interceptor.RequestInterceptor;
|
||||
import org.ssssssss.magicapi.core.model.ApiInfo;
|
||||
import org.ssssssss.magicapi.core.model.Options;
|
||||
import org.ssssssss.magicapi.core.service.MagicAPIService;
|
||||
import org.ssssssss.magicapi.core.service.MagicResourceService;
|
||||
import org.ssssssss.magicapi.utils.PathUtils;
|
||||
import org.ssssssss.magicboot.model.StatusCode;
|
||||
import org.ssssssss.script.MagicScriptContext;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Component
|
||||
@Order(1)
|
||||
public class PermissionInterceptor implements RequestInterceptor {
|
||||
public class PermissionInterceptor implements RequestInterceptor, HandlerInterceptor {
|
||||
|
||||
@Autowired
|
||||
MagicAPIService magicAPIService;
|
||||
|
||||
@Autowired
|
||||
MagicResourceService magicResourceService;
|
||||
|
||||
@Autowired
|
||||
private JdbcTemplate template;
|
||||
|
||||
/*
|
||||
* 当返回对象时,直接将此对象返回到页面,返回null时,继续执行后续操作
|
||||
*/
|
||||
@ -46,4 +59,25 @@ public class PermissionInterceptor implements RequestInterceptor {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postHandle(RequestEntity requestEntity, Object returnValue) throws Exception {
|
||||
try {
|
||||
HttpServletRequest request = requestEntity.getRequest();
|
||||
ApiInfo info = requestEntity.getApiInfo();
|
||||
template.update("insert into sys_oper_log(api_name, api_path, api_method, cost_time, create_by, create_date, user_agent, user_ip) values(?,?,?,?,?,?,?,?)",
|
||||
// PathUtils.replaceSlash(groupServiceProvider.getFullName(info.getGroupId()) + "/" + info.getName()).replace("/","-"),
|
||||
PathUtils.replaceSlash(String.format("/%s/%s", magicResourceService.getGroupName(info.getGroupId()), info.getName())),
|
||||
request.getRequestURI(),
|
||||
request.getMethod(),
|
||||
System.currentTimeMillis() - requestEntity.getRequestTime(),
|
||||
StpUtil.getLoginId(),
|
||||
new Date(requestEntity.getRequestTime()),
|
||||
request.getHeader("User-Agent"),
|
||||
ServletUtil.getClientIP(request));
|
||||
} catch (Exception ignored){
|
||||
ignored.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.ssssssss.magicboot.model;
|
||||
|
||||
import org.ssssssss.magicapi.model.JsonBean;
|
||||
import org.ssssssss.magicapi.core.model.JsonBean;
|
||||
|
||||
public enum StatusCode {
|
||||
|
||||
|
@ -37,19 +37,19 @@ magic-api:
|
||||
web: /magic/web
|
||||
show-sql: true #配置打印SQL
|
||||
sql-column-case: camel
|
||||
page-config:
|
||||
page: current
|
||||
size: size
|
||||
cache-config:
|
||||
enable: true #开启缓存,默认是不开启的
|
||||
ttl: 3600000 #有效期1小时,默认-1 即永不过期
|
||||
resource:
|
||||
location: data/magic-api
|
||||
response-code-config:
|
||||
page:
|
||||
page: current
|
||||
size: size
|
||||
cache:
|
||||
enable: true #开启缓存,默认是不开启的
|
||||
ttl: 3600000 #有效期1小时,默认-1 即永不过期
|
||||
response-code:
|
||||
success: 200 #执行成功的code值
|
||||
invalid: 400 #参数验证未通过的code值
|
||||
exception: 500 #执行出现异常的code值
|
||||
crud-config: # CRUD相关配置
|
||||
crud: # CRUD相关配置
|
||||
logic-delete-column: is_del #逻辑删除列
|
||||
logic-delete-value: 1 #逻辑删除值
|
||||
# security-config:
|
||||
|
Loading…
Reference in New Issue
Block a user