在线用户

This commit is contained in:
zegezy 2023-04-01 21:15:22 +08:00
parent dc719ef6f7
commit f9b24bded4
2 changed files with 10 additions and 7 deletions

View File

@ -5,7 +5,7 @@
"groupId" : "d95a58e77d314370862ffc4cdfdb8283",
"name" : "列表",
"createTime" : null,
"updateTime" : 1652170512725,
"updateTime" : 1680332611352,
"lock" : null,
"createBy" : null,
"updateBy" : null,
@ -116,13 +116,14 @@
"children" : [ ]
} ]
}
}
================================
}
================================
import cn.dev33.satoken.stp.StpUtil
var tokens = StpUtil.searchTokenValue("", -1, 0).map(it => it.replace('token:login:token:', ''))
return db.page("""
select
su.id,
su.username,
so.name office_name,
sll.address,

View File

@ -5,7 +5,7 @@
"groupId" : "d95a58e77d314370862ffc4cdfdb8283",
"name" : "踢人",
"createTime" : null,
"updateTime" : 1652170543213,
"updateTime" : 1680332529466,
"lock" : null,
"createBy" : null,
"updateBy" : null,
@ -32,7 +32,9 @@
"description" : null,
"requestBodyDefinition" : null,
"responseBodyDefinition" : null
}
================================
}
================================
import cn.dev33.satoken.stp.StpUtil
return StpUtil.logoutByTokenValue(token);
// 先踢下线
StpUtil.logoutByTokenValue(StpUtil.getTokenValueByLoginId(id))
return StpUtil.disable(id, time.asLong());