package com.red.circle.other.app.inner.service.team;

import com.red.circle.framework.dto.PageResult;
import com.red.circle.other.inner.model.cmd.team.BdTeamInfoCmd;
import com.red.circle.other.inner.model.cmd.team.bd.BdTeamPageQryCmd;
import com.red.circle.other.inner.model.cmd.team.bd.BdTeamUpdateOpsCmd;
import com.red.circle.other.inner.model.cmd.team.bd.BdTeamWorkStatisticsQryCmd;
import com.red.circle.other.inner.model.cmd.team.bd.ChangeBdLeaderCmd;
import com.red.circle.other.inner.model.dto.agency.bd.BdTeamInfoDTO;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * bd 团队服务.
 *
 * @author pengliang on 2023/5/26
 */
public interface BdTeamInfoClientService {

  /**
   * 是否是BD.
   *
   * @return true 是，false 否
   */
  Boolean check(Long userId);

  /**
   * 获取bd信息.
   */
  BdTeamInfoDTO getByUserId(Long userId);

  /**
   * 获取团队.
   */
  BdTeamInfoDTO getById(Long id);

  /**
   * 创建bd团队.
   */
  void addBdInfo(BdTeamInfoCmd cmd);

  /**
   * 累加成员数.
   */
  void incrMemberCount(Set<Long> userIds);

  Map<Long, Boolean> mapCheckBd(Set<Long> userIds);

  /**
   * 修改bd信息.
   */
  void updateSelectiveById(BdTeamInfoDTO dto);

  /**
   * 修改BD信息.
   */
  void updateOpsById(BdTeamUpdateOpsCmd cmd);

  /**
   * 扣除成员计算.
   */
  void decrMemberCount(Set<Long> userIds);

  /**
   * 获取BD分页列表(运营后台)
   */
  PageResult<BdTeamInfoDTO> pageOps(BdTeamPageQryCmd qryCmd);

  /**
   * 获取bd列表
   * @param qryCmd
   * @return
   */
  List<BdTeamInfoDTO> pageWorkStatistics(BdTeamWorkStatisticsQryCmd qryCmd);

  /**
   * 移除指定记录.
   */
  void deleteById(Long id);

  /**
   * 换绑BD Leader.
   */
  void changeBdLeader(ChangeBdLeaderCmd cmd);

}
