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

import com.red.circle.common.business.dto.cmd.IdLongCmd;
import com.red.circle.order.app.command.pay.PayApplicationQryExe;
import com.red.circle.order.app.command.pay.web.PayWebApplicationCommodityV2QueryExe;
import com.red.circle.order.app.command.pay.web.PayWebOpenPayCountryQueryExe;
import com.red.circle.order.app.command.pay.web.UserProfileAndCountryQueryExe;
import com.red.circle.order.app.dto.clientobject.pay.ApplicationCommodityCardV2CO;
import com.red.circle.order.app.dto.clientobject.pay.PayApplicationCO;
import com.red.circle.order.app.dto.clientobject.pay.PayCountryCO;
import com.red.circle.order.app.dto.clientobject.pay.UserProfileAndCountryCO;
import com.red.circle.order.app.dto.cmd.PayWebApplicationCommodityCmd;
import com.red.circle.order.app.dto.cmd.PayWebUserCmd;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * web支付 实现.
 *
 * @author pengliang on 2023/9/27
 */
@Service
@RequiredArgsConstructor
public class WebPayServiceImpl implements WebPayService {

  private final PayApplicationQryExe payApplicationQryExe;
  private final PayWebOpenPayCountryQueryExe payWebOpenPayCountryQueryExe;
  private final UserProfileAndCountryQueryExe userProfileAndCountryQueryExe;
  private final PayWebApplicationCommodityV2QueryExe payWebApplicationCommodityV2QueryExe;

  @Override
  public PayApplicationCO getApplication(IdLongCmd cmd) {
    return payApplicationQryExe.execute(cmd);
  }


  @Override
  public ApplicationCommodityCardV2CO getChannelCommodityV2(PayWebApplicationCommodityCmd cmd) {
    return payWebApplicationCommodityV2QueryExe.execute(cmd);
  }

  @Override
  public List<PayCountryCO> listOpenPayCountry() {
    return payWebOpenPayCountryQueryExe.execute();
  }

  @Override
  public UserProfileAndCountryCO getUserProfileAndCountry(PayWebUserCmd cmd) {
    return userProfileAndCountryQueryExe.execute(cmd);
  }

}
