{ "properties" : { }, "id" : "fc8e8dbfa2dd40e0922a22f680cde084", "script" : null, "groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a", "name" : "根据用户id获取角色列表", "createTime" : null, "updateTime" : 1642773983120, "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" : "[]", "requestBody" : "{\n\n}", "headers" : [ ], "paths" : [ ], "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [],\n \"timestamp\": 1642773977670,\n \"executeTime\": 2\n}", "description" : null, "requestBodyDefinition" : null, "responseBodyDefinition" : { "name" : "", "value" : "", "description" : "", "required" : false, "dataType" : "Object", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ { "name" : "code", "value" : "200", "description" : "", "required" : false, "dataType" : "Integer", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "message", "value" : "success", "description" : "", "required" : false, "dataType" : "String", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "data", "value" : "", "description" : "", "required" : false, "dataType" : "Array", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "timestamp", "value" : "1642773977670", "description" : "", "required" : false, "dataType" : "Long", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "executeTime", "value" : "2", "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})