feat: 更新登录状态处理逻辑,添加登录时间记录功能,优化状态更新时间
This commit is contained in:
@@ -1036,9 +1036,13 @@ private UserLinkStatusResponse doGetUserLinkStatus(Long linkId, String codeNo) {
|
||||
private PollLoginResponse handleSuccessfulLogin(LinkTask linkTask, String deviceId) {
|
||||
log.info("检测到已上号,更新状态为LOGGED_IN");
|
||||
|
||||
// 更新数据库状态
|
||||
// 更新数据库状态(设置登录时间)
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
if (linkTask.getLoginAt() == null) {
|
||||
linkTask.setLoginAt(now);
|
||||
}
|
||||
linkTask.setStatus("LOGGED_IN");
|
||||
linkTask.setUpdatedAt(LocalDateTime.now());
|
||||
linkTask.setUpdatedAt(now);
|
||||
linkTaskMapper.updateById(linkTask);
|
||||
|
||||
// Record login buffer and audit
|
||||
|
||||
Reference in New Issue
Block a user