{ "properties" : { }, "id" : "f3263e9461c94c02b68e722fae921981", "script" : null, "groupId" : "9ec6f9ec92d24a369952bb13eddc134f", "name" : "操作日志", "createTime" : null, "updateTime" : 1713861312162, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/oper/list", "method" : "POST", "parameters" : [ ], "options" : [ ], "requestBody" : "", "headers" : [ ], "paths" : [ ], "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"total\": 86,\n \"list\": [{\n \"id\": 7947,\n \"apiName\": \"后台-安全-登录\",\n \"apiPath\": \"/security/login\",\n \"apiMethod\": \"POST\",\n \"costTime\": 301,\n \"createBy\": \"1\",\n \"createDate\": \"2022-03-05 12:22:24\",\n \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36\",\n \"userIp\": \"0:0:0:0:0:0:0:1\",\n \"username\": \"admin\"\n }, {\n \"id\": 7948,\n \"apiName\": \"后台-用户管理-获取用户信息\",\n \"apiPath\": \"/user/info\",\n \"apiMethod\": \"GET\",\n \"costTime\": 41,\n \"createBy\": \"1\",\n \"createDate\": \"2022-03-05 12:22:24\",\n \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36\",\n \"userIp\": \"0:0:0:0:0:0:0:1\",\n \"username\": \"admin\"\n }, {\n \"id\": 7949,\n \"apiName\": \"后台-数据字典-字典项-获取所有字典项\",\n \"apiPath\": \"/dict/items/all\",\n \"apiMethod\": \"GET\",\n \"costTime\": 19,\n \"createBy\": \"1\",\n \"createDate\": \"2022-03-05 12:22:24\",\n \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36\",\n \"userIp\": \"0:0:0:0:0:0:0:1\",\n \"username\": \"admin\"\n }, {\n \"id\": 7950,\n \"apiName\": \"后台-配置-获取所有配置\",\n \"apiPath\": \"/config/list\",\n \"apiMethod\": \"GET\",\n \"costTime\": 5,\n \"createBy\": \"1\",\n \"createDate\": \"2022-03-05 12:22:24\",\n \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36\",\n \"userIp\": \"0:0:0:0:0:0:0:1\",\n \"username\": \"admin\"\n }, {\n \"id\": 7951,\n \"apiName\": \"后台-菜单管理-当前用户菜单\",\n \"apiPath\": \"/menu/current/menus\",\n \"apiMethod\": \"POST\",\n \"costTime\": 19,\n \"createBy\": \"1\",\n \"createDate\": \"2022-03-05 12:22:24\",\n \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36\",\n \"userIp\": \"0:0:0:0:0:0:0:1\",\n \"username\": \"admin\"\n }, {\n \"id\": 7952,\n \"apiName\": \"后台-菜单管理-获取菜单tree\",\n \"apiPath\": \"/menu/tree\",\n \"apiMethod\": \"GET\",\n \"costTime\": 34,\n \"createBy\": \"1\",\n \"createDate\": \"2022-03-05 12:22:27\",\n \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36\",\n \"userIp\": \"0:0:0:0:0:0:0:1\",\n \"username\": \"admin\"\n }, {\n \"id\": 7953,\n \"apiName\": \"后台-组织机构-列表\",\n \"apiPath\": \"/office/tree\",\n \"apiMethod\": \"GET\",\n \"costTime\": 10,\n \"createBy\": \"1\",\n \"createDate\": \"2022-03-05 12:22:28\",\n \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36\",\n \"userIp\": \"0:0:0:0:0:0:0:1\",\n \"username\": \"admin\"\n }, {\n \"id\": 7954,\n \"apiName\": \"后台-角色管理-列表\",\n \"apiPath\": \"/role/list\",\n \"apiMethod\": \"GET\",\n \"costTime\": 18,\n \"createBy\": \"1\",\n \"createDate\": \"2022-03-05 12:22:29\",\n \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36\",\n \"userIp\": \"0:0:0:0:0:0:0:1\",\n \"username\": \"admin\"\n }, {\n \"id\": 7955,\n \"apiName\": \"后台-菜单管理-获取排序号\",\n \"apiPath\": \"/menu/sort\",\n \"apiMethod\": \"GET\",\n \"costTime\": 5,\n \"createBy\": \"1\",\n \"createDate\": \"2022-03-05 12:23:42\",\n \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36\",\n \"userIp\": \"0:0:0:0:0:0:0:1\",\n \"username\": \"admin\"\n }, {\n \"id\": 7956,\n \"apiName\": \"后台-组件-选择组件\",\n \"apiPath\": \"/component/select\",\n \"apiMethod\": \"GET\",\n \"costTime\": 4,\n \"createBy\": \"1\",\n \"createDate\": \"2022-03-05 12:23:43\",\n \"userAgent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36\",\n \"userIp\": \"0:0:0:0:0:0:0:1\",\n \"username\": \"admin\"\n }]\n },\n \"timestamp\": 1646472930242,\n \"executeTime\": 19\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" : "Object", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ { "name" : "total", "value" : "86", "description" : "", "required" : false, "dataType" : "Integer", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "list", "value" : "", "description" : "", "required" : false, "dataType" : "Array", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ { "name" : "", "value" : "", "description" : "", "required" : false, "dataType" : "Object", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ { "name" : "id", "value" : "7947", "description" : "", "required" : false, "dataType" : "Integer", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "apiName", "value" : "后台-安全-登录", "description" : "", "required" : false, "dataType" : "String", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "apiPath", "value" : "/security/login", "description" : "", "required" : false, "dataType" : "String", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "apiMethod", "value" : "POST", "description" : "", "required" : false, "dataType" : "String", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "costTime", "value" : "301", "description" : "", "required" : false, "dataType" : "Integer", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "createBy", "value" : "1", "description" : "", "required" : false, "dataType" : "String", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "createDate", "value" : "2022-03-05 12:22:24", "description" : "", "required" : false, "dataType" : "String", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "userAgent", "value" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36", "description" : "", "required" : false, "dataType" : "String", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "userIp", "value" : "0:0:0:0:0:0:0:1", "description" : "", "required" : false, "dataType" : "String", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "username", "value" : "admin", "description" : "", "required" : false, "dataType" : "String", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] } ] } ] } ] }, { "name" : "timestamp", "value" : "1646472930242", "description" : "", "required" : false, "dataType" : "Long", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] }, { "name" : "executeTime", "value" : "19", "description" : "", "required" : false, "dataType" : "Object", "type" : null, "defaultValue" : null, "validateType" : "", "error" : "", "expression" : "", "children" : [ ] } ] } } ================================ return db.page(""" select sol.*,su.username from sys_oper_log sol left join sys_user su on sol.create_by = su.id where 1=1 ?{userIp, and sol.user_ip like concat('%', #{userIp}, '%')} ?{username, and su.username like concat('%', #{username}, '%')} ?{apiName, and sol.api_name like concat('%', #{apiName}, '%')} ?{apiPath, and sol.api_path like concat('%', #{apiPath}, '%')} ?{createDate && createDate.split(',')[0], and sol.create_date >= #{createDate.split(',')[0]}} ?{createDate && createDate.split(',')[1], and sol.create_date <= #{createDate.split(',')[1]}} ?{costTime && costTime.split(',')[0], and sol.cost_time >= #{costTime.split(',')[0]}} ?{costTime && costTime.split(',')[1], and sol.cost_time <= #{costTime.split(',')[1]}} order by sol.create_date desc """)