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

import com.red.circle.other.app.command.rocket.RocketEnergyAddCmdExe;
import com.red.circle.other.app.command.rocket.RocketLaunchCmdExe;
import com.red.circle.other.app.command.rocket.RocketRewardClaimCmdExe;
import com.red.circle.other.app.command.rocket.RocketStatusQryExe;
import com.red.circle.other.app.dto.clientobject.RocketRewardCO;
import com.red.circle.other.app.dto.clientobject.RocketStatusCO;
import com.red.circle.other.app.dto.cmd.RocketEnergyAddCmd;
import com.red.circle.other.app.dto.cmd.RocketRewardClaimCmd;
import com.red.circle.other.app.dto.cmd.RocketStatusQueryCmd;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 火箭服务实现
 *
 * @author system
 * @date 2025-01-15
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class RocketServiceImpl implements RocketService {

    private final RocketEnergyAddCmdExe rocketEnergyAddCmdExe;
    private final RocketStatusQryExe rocketStatusQryExe;
    private final RocketRewardClaimCmdExe rocketRewardClaimCmdExe;
    private final RocketLaunchCmdExe rocketLaunchCmdExe;

    @Override
    public void addEnergy(RocketEnergyAddCmd cmd) {
        rocketEnergyAddCmdExe.execute(cmd);
    }

    @Override
    public RocketStatusCO queryStatus(RocketStatusQueryCmd cmd) {
        return rocketStatusQryExe.execute(cmd);
    }

    @Override
    public RocketRewardCO claimReward(RocketRewardClaimCmd cmd) {
        return rocketRewardClaimCmdExe.execute(cmd);
    }
}
