feat: 查询env时 只查询最后一次创建的session
This commit is contained in:
@@ -52,7 +52,9 @@ public class EnvironmentServiceImpl extends ServiceImpl<EnvironmentDao, Environm
|
||||
environment.setCreateUser(createUser);
|
||||
environment.setUpdateUser(updateUser);
|
||||
|
||||
EnvironmentSessionEntity deviceSession = deviceSessionService.getOne(new LambdaQueryWrapper<EnvironmentSessionEntity>().eq(EnvironmentSessionEntity::getEnvId, environment.getId()));
|
||||
EnvironmentSessionEntity deviceSession = deviceSessionService.getOne(new LambdaQueryWrapper<EnvironmentSessionEntity>()
|
||||
.eq(EnvironmentSessionEntity::getEnvId, environment.getId())
|
||||
.orderByDesc(EnvironmentSessionEntity::getStartTimestamp).last("limit 1"));
|
||||
if (null != deviceSession) {
|
||||
SysUserEntity useUser = sysUserService.getById(deviceSession.getUserId());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user