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

import com.red.circle.framework.dto.PageResult;
import com.red.circle.other.app.command.bd.query.TeamBdMemberBillDetailQryExe;
import com.red.circle.other.app.command.bd.query.TeamBdMemberBillListQryExe;
import com.red.circle.other.app.command.bd.query.TeamBdMonthlyIncomeQryExe;
import com.red.circle.other.app.command.bd.query.TeamBdWithdrawExe;
import com.red.circle.other.app.command.team.bd.query.BdDetailsQryExe;
import com.red.circle.other.app.dto.clientobject.TeamBdMemberBillCO;
import com.red.circle.other.app.dto.clientobject.TeamBdMemberBillDetailCO;
import com.red.circle.other.app.dto.clientobject.TeamBdMemberCO;
import com.red.circle.other.app.dto.clientobject.TeamBdMonthlyIncomeCO;
import com.red.circle.other.app.dto.clientobject.team.bd.BdDetailItemCO;
import com.red.circle.other.app.dto.cmd.TeamBdMemberBillCmd;
import com.red.circle.other.app.dto.cmd.TeamBdMemberBillDetailCmd;
import com.red.circle.other.app.dto.cmd.TeamBdMonthlyIncomeCmd;
import com.red.circle.other.app.dto.cmd.activity.LotteryWithdrawCmd;
import com.red.circle.other.app.dto.cmd.team.bd.BdDetailsQryCmd;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * BD 账单服务实现.
 *
 * @author tf
 * @since 2025-10-28
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class TeamBdBillServiceImpl implements TeamBdBillService {

    private final TeamBdMemberBillListQryExe teamBdMemberBillListQryExe;
    private final TeamBdMemberBillDetailQryExe teamBdMemberBillDetailQryExe;
    private final TeamBdMonthlyIncomeQryExe teamBdMonthlyIncomeQryExe;
    private final TeamBdWithdrawExe teamBdWithdrawExe;
    private final BdDetailsQryExe bdDetailsQryExe;

    @Override
    public TeamBdMemberCO queryMemberBillList(TeamBdMemberBillCmd cmd) {
        return teamBdMemberBillListQryExe.execute(cmd);
    }

    @Override
    public List<TeamBdMemberBillDetailCO> queryMemberBillDetailList(TeamBdMemberBillDetailCmd cmd) {
        return teamBdMemberBillDetailQryExe.execute(cmd);
    }

    @Override
    public TeamBdMonthlyIncomeCO queryMonthlyIncome(TeamBdMonthlyIncomeCmd cmd) {
        return teamBdMonthlyIncomeQryExe.execute(cmd);
    }

    @Override
    public void applyWithdraw(LotteryWithdrawCmd cmd) {
        teamBdWithdrawExe.applyWithdraw(cmd);
    }

    @Override
    public List<BdDetailItemCO> queryBdDetails(BdDetailsQryCmd cmd) {
        return bdDetailsQryExe.execute(cmd);
    }
}
