magic-boot/data/magic-api/api/后台/用户管理/根据用户id获取角色列表.ms

110 lines
2.7 KiB
Plaintext
Raw Normal View History

2021-10-24 20:09:53 +08:00
{
"properties" : { },
"id" : "fc8e8dbfa2dd40e0922a22f680cde084",
"script" : null,
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
"name" : "根据用户id获取角色列表",
"createTime" : null,
2022-01-21 22:38:39 +08:00
"updateTime" : 1642773983120,
2021-10-24 20:09:53 +08:00
"lock" : "0",
"method" : "GET",
"path" : "/roles",
"parameters" : [ {
"name" : "userId",
"value" : "674a3aa6b1ea4d91a1f72e7879d415c3",
"description" : "",
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : null,
"error" : null,
"expression" : null,
"children" : null
} ],
"option" : "[]",
2022-01-21 22:38:39 +08:00
"requestBody" : "{\n\n}",
2021-10-24 20:09:53 +08:00
"headers" : [ ],
"paths" : [ ],
2022-01-21 22:38:39 +08:00
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [],\n \"timestamp\": 1642773977670,\n \"executeTime\": 2\n}",
2021-10-24 20:09:53 +08:00
"description" : null,
"requestBodyDefinition" : null,
"responseBodyDefinition" : {
"name" : "",
"value" : "",
"description" : "",
"required" : false,
"dataType" : "Object",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ {
"name" : "code",
2022-01-21 22:38:39 +08:00
"value" : "200",
2021-10-24 20:09:53 +08:00
"description" : "",
"required" : false,
"dataType" : "Integer",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "message",
2022-01-21 22:38:39 +08:00
"value" : "success",
2021-10-24 20:09:53 +08:00
"description" : "",
"required" : false,
"dataType" : "String",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "data",
2022-01-21 22:38:39 +08:00
"value" : "",
2021-10-24 20:09:53 +08:00
"description" : "",
"required" : false,
2022-01-21 22:38:39 +08:00
"dataType" : "Array",
2021-10-24 20:09:53 +08:00
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "timestamp",
2022-01-21 22:38:39 +08:00
"value" : "1642773977670",
2021-10-24 20:09:53 +08:00
"description" : "",
"required" : false,
"dataType" : "Long",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
}, {
"name" : "executeTime",
2022-01-21 22:38:39 +08:00
"value" : "2",
2021-10-24 20:09:53 +08:00
"description" : "",
"required" : false,
"dataType" : "Object",
"type" : null,
"defaultValue" : null,
"validateType" : "",
"error" : "",
"expression" : "",
"children" : [ ]
} ]
},
"optionMap" : { }
}
================================
return db.select("""
select role_id from sys_user_role where user_id = #{userId}
""").map(it => {return it.roleId})