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

import com.red.circle.common.business.dto.cmd.app.AppIdLongCmd;
import com.red.circle.other.infra.database.mongo.service.team.team.TeamApplicationProcessService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 团队是否存在等待审批消息.
 *
 * @author pengliang on 2022/12/30
 */
@Component
@RequiredArgsConstructor
public class TeamCountTeamWaitApplyQryExe {

  private final TeamApplicationProcessService teamApplicationProcessService;

  public Long execute(AppIdLongCmd cmd) {
    return teamApplicationProcessService.countTeamWaitByTeamId(cmd.getId());
  }
}
