mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-04-26 00:00:04 +08:00
升级magic-api 2.0 增加操作日志、登录日志
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user