package com.red.circle.other.app.command.user.query;

import com.red.circle.common.business.dto.cmd.UserIdCmd;
import com.red.circle.other.infra.database.mongo.service.user.status.OnlineUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 获取用户正在房间中的会话id.
 *
 * @author pengliang on 2021/3/26
 */
@Component
@RequiredArgsConstructor
public class OnlineUserSessionIdQryExe {

  private final OnlineUserService onlineUserService;

  public String execute(UserIdCmd cmd) {
    return onlineUserService.getSessionId(cmd.getUserId());
  }

}
