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

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.common.business.dto.cmd.app.AppAccountCmd;
import com.red.circle.common.business.dto.cmd.app.AppFlowCmd;
import com.red.circle.common.business.dto.cmd.app.AppUserIdCmd;
import com.red.circle.wallet.app.command.freight.DealerToFreightShipCmdExe;
import com.red.circle.wallet.app.command.freight.DealerToUserShipCmdExe;
import com.red.circle.wallet.app.command.freight.SendFreightShipCmdExe;
import com.red.circle.wallet.app.command.freight.UserFreightSellerAddCmdExe;
import com.red.circle.wallet.app.command.freight.UserFreightSellerUsableGoldCmdExe;
import com.red.circle.wallet.app.command.freight.query.CheckDealerQryExe;
import com.red.circle.wallet.app.command.freight.query.CheckFreightQryExe;
import com.red.circle.wallet.app.command.freight.query.CheckFreightSellerQryExe;
import com.red.circle.wallet.app.command.freight.query.DealerFreightUserSearchQryExe;
import com.red.circle.wallet.app.command.freight.query.FreightFirstRechargeCheckCmdExe;
import com.red.circle.wallet.app.command.freight.query.FreightRunningWaterFlowQryExe;
import com.red.circle.wallet.app.command.freight.query.FreightSearchUserResultQryExe;
import com.red.circle.wallet.app.command.freight.query.FreightSellerRunningWaterFlowQryExe;
import com.red.circle.wallet.app.command.freight.query.UserFreightAccountQryExe;
import com.red.circle.wallet.app.command.freight.query.UserFreightAvailableBalanceQryExe;
import com.red.circle.wallet.app.command.freight.query.UserFreightSellerInfoQryExe;
import com.red.circle.wallet.app.command.freight.query.UserFreightSellerQryExe;
import com.red.circle.wallet.app.dto.clientobject.FreightAccountCO;
import com.red.circle.wallet.app.dto.clientobject.FreightDealerUserSearchResultCO;
import com.red.circle.wallet.app.dto.clientobject.FreightRunningWaterCO;
import com.red.circle.wallet.app.dto.clientobject.FreightSearchUserResultCO;
import com.red.circle.wallet.app.dto.clientobject.FreightSellerCO;
import com.red.circle.wallet.app.dto.cmd.FreightDealerShipCmd;
import com.red.circle.wallet.app.dto.cmd.FreightDealerToUserShipCmd;
import com.red.circle.wallet.app.dto.cmd.FreightSellerCmd;
import com.red.circle.wallet.app.dto.cmd.FreightSellerQryCmd;
import com.red.circle.wallet.app.dto.cmd.FreightSellerRunningWaterQryCmd;
import com.red.circle.wallet.app.dto.cmd.FreightSellerUsableGoldCmd;
import com.red.circle.wallet.app.dto.cmd.FreightShipSendCmd;
import java.math.BigDecimal;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 经销商卖家相关 实现
 *
 * @author zongpubin on 2023/7/17
 */
@Service
@RequiredArgsConstructor
public class UserFreightServiceImpl implements UserFreightService {

  private final CheckDealerQryExe checkDealerQryExe;
  private final CheckFreightQryExe checkFreightQryExe;
  private final SendFreightShipCmdExe sendFreightShipCmdExe;
  private final DealerToUserShipCmdExe dealerToUserShipCmdExe;
  private final UserFreightSellerQryExe userFreightSellerQryExe;
  private final CheckFreightSellerQryExe checkFreightSellerQryExe;
  private final UserFreightAccountQryExe userFreightAccountQryExe;
  private final DealerToFreightShipCmdExe dealerToFreightShipCmdExe;
  private final UserFreightSellerAddCmdExe userFreightSellerAddCmdExe;
  private final UserFreightSellerInfoQryExe userFreightSellerInfoQryExe;
  private final DealerFreightUserSearchQryExe dealerFreightUserSearchQryExe;
  private final FreightSearchUserResultQryExe freightSearchUserResultQryExe;
  private final FreightRunningWaterFlowQryExe freightRunningWaterFlowQryExe;
  private final FreightFirstRechargeCheckCmdExe freightFirstRechargeCheckCmdExe;
  private final UserFreightAvailableBalanceQryExe userFreightAvailableBalanceQryExe;
  private final UserFreightSellerUsableGoldCmdExe userFreightSellerUsableGoldCmdExe;
  private final FreightSellerRunningWaterFlowQryExe freightSellerRunningWaterFlowQryExe;

  @Override
  public void addFreightSeller(FreightSellerCmd cmd) {
    userFreightSellerAddCmdExe.execute(cmd);
  }

  @Override
  public List<FreightSellerCO> listFreightSeller(AppExtCommand cmd) {
    return userFreightSellerQryExe.execute(cmd);
  }

  @Override
  public Boolean checkSeller(AppExtCommand cmd) {
    return checkFreightSellerQryExe.execute(cmd);
  }

  @Override
  public FreightAccountCO getFreightAccountInfo(AppExtCommand cmd) {
    return userFreightAccountQryExe.execute(cmd);
  }

  @Override
  public void updateUsableGold(FreightSellerUsableGoldCmd cmd) {
    userFreightSellerUsableGoldCmdExe.execute(cmd);
  }

  @Override
  public FreightSellerCO searchSellerById(FreightSellerQryCmd cmd) {
    return userFreightSellerInfoQryExe.execute(cmd);
  }

  @Override
  public List<FreightRunningWaterCO> flowFreightAssetsRunningWater(AppFlowCmd cmd) {
    return freightRunningWaterFlowQryExe.execute(cmd);
  }

  @Override
  public List<FreightRunningWaterCO> flowFreightSellerRunningWater(
      FreightSellerRunningWaterQryCmd cmd) {
    return freightSellerRunningWaterFlowQryExe.execute(cmd);
  }

  @Override
  public Boolean checkFreight(AppExtCommand cmd) {
    return checkFreightQryExe.execute(cmd);
  }

  @Override
  public Boolean checkDealer(AppExtCommand cmd) {
    return checkDealerQryExe.execute(cmd);
  }

  @Override
  public BigDecimal getFreightAvailableBalance(AppExtCommand cmd) {
    return userFreightAvailableBalanceQryExe.execute(cmd);
  }

  @Override
  public FreightSearchUserResultCO searchFreightUser(AppAccountCmd cmd) {
    return freightSearchUserResultQryExe.execute(cmd);
  }

  @Override
  public BigDecimal sendFreightShip(FreightShipSendCmd cmd) {
    return sendFreightShipCmdExe.execute(cmd);
  }

  @Override
  public FreightDealerUserSearchResultCO searchDealerFreightResult(AppAccountCmd cmd) {
    return dealerFreightUserSearchQryExe.execute(cmd);
  }

  @Override
  public BigDecimal dealerToFreightShip(FreightDealerShipCmd cmd) {
    return dealerToFreightShipCmdExe.execute(cmd);
  }

  @Override
  public BigDecimal dealerToUserShip(FreightDealerToUserShipCmd cmd) {
    return dealerToUserShipCmdExe.execute(cmd);
  }

  @Override
  public boolean checkFreightFirstRecharge(AppUserIdCmd cmd) {
    return freightFirstRechargeCheckCmdExe.execute(cmd);
  }

}
