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

import com.red.circle.other.app.command.bd.query.BdPermissionCheckQryExe;
import com.red.circle.other.app.command.bd.query.BdTeamMemberDetailQryExe;
import com.red.circle.other.app.command.bd.query.BdTeamQryExe;
import com.red.circle.other.app.command.bd.query.BdTeamSummaryQryExe;
import com.red.circle.other.app.dto.clientobject.BdPermissionCO;
import com.red.circle.other.app.dto.clientobject.BdTeamMemberDetailCO;
import com.red.circle.other.app.dto.clientobject.BdTeamOverviewCO;
import com.red.circle.other.app.dto.clientobject.BdTeamSummaryCO;
import com.red.circle.other.app.dto.cmd.BdTeamMemberDetailQueryCmd;
import com.red.circle.other.app.dto.cmd.BdTeamQueryCmd;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * BD团队服务实现
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class BdTeamServiceImpl implements BdTeamService {

    private final BdTeamQryExe bdTeamQryExe;
    private final BdTeamMemberDetailQryExe bdTeamMemberDetailQryExe;
    private final BdTeamSummaryQryExe bdTeamSummaryQryExe;
    private final BdPermissionCheckQryExe bdPermissionCheckQryExe;

    @Override
    public BdTeamOverviewCO queryTeamOverview(BdTeamQueryCmd cmd) {
        return bdTeamQryExe.execute(cmd);
    }

    @Override
    public BdTeamMemberDetailCO queryMemberDetail(BdTeamMemberDetailQueryCmd cmd) {
        return bdTeamMemberDetailQryExe.execute(cmd);
    }

    @Override
    public BdTeamSummaryCO queryTeamSummary(Long userId) {
        return bdTeamSummaryQryExe.execute(userId);
    }

    @Override
    public BdPermissionCO checkPermission(Long userId) {
        return bdPermissionCheckQryExe.execute(userId);
    }
}
