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

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.framework.core.dto.AppCommand;
import com.red.circle.other.app.command.sys.query.AppOpenCountryCodeQryExe;
import com.red.circle.other.app.command.sys.query.AppPageStartQryExe;
import com.red.circle.other.app.command.sys.query.BannerQryExe;
import com.red.circle.other.app.command.sys.query.GameListConfigQryExe;
import com.red.circle.other.app.command.sys.query.GameMatchConfigQryExe;
import com.red.circle.other.app.command.sys.query.SysCountryOpenQryExe;
import com.red.circle.other.app.command.sys.query.SysCountryOpenTopQryExe;
import com.red.circle.other.app.command.sys.query.SysCustomerServiceQryExe;
import com.red.circle.other.app.command.sys.query.SysEnumConfigListQryExe;
import com.red.circle.other.app.command.sys.query.SysNoticeMessageLastOneMonthQryExe;
import com.red.circle.other.app.dto.clientobject.sys.AppCountryCodeCO;
import com.red.circle.other.app.dto.clientobject.sys.AppStartPageCO;
import com.red.circle.other.app.dto.clientobject.sys.BannerCO;
import com.red.circle.other.app.dto.clientobject.sys.CountryCodeCO;
import com.red.circle.other.app.dto.clientobject.sys.GameListConfigCO;
import com.red.circle.other.app.dto.clientobject.sys.GameMatchModelConfigGroupCO;
import com.red.circle.other.app.dto.clientobject.sys.NoticeMessageCO;
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
import java.util.List;
import java.util.Map;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * app配置相关实现.
 *
 * @author pengliang on 2022/6/10
 */
@Service
@RequiredArgsConstructor
public class AppConfigServiceImpl implements AppConfigService {

  private final BannerQryExe bannerQryExe;

  private final AppPageStartQryExe appPageStartQryExe;

  private final SysCountryOpenQryExe sysCountryOpenQryExe;

  private final GameListConfigQryExe gameListConfigQryExe;

  private final GameMatchConfigQryExe gameMatchConfigQryExe;

  private final SysEnumConfigListQryExe sysEnumConfigListQryExe;

  private final SysCountryOpenTopQryExe sysCountryOpenTopQryExe;

  private final SysCustomerServiceQryExe sysCustomerServiceQryExe;

  private final AppOpenCountryCodeQryExe appOpenCountryCodeQryExe;

  private final SysNoticeMessageLastOneMonthQryExe sysNoticeMessageLastOneMonthQryExe;


  @Override
  public List<GameListConfigCO> listGameConfig(AppExtCommand cmd) {
    return gameListConfigQryExe.execute(cmd);
  }

  @Override
  public GameMatchModelConfigGroupCO getMatchGameConfig(AppExtCommand cmd) {
    return gameMatchConfigQryExe.execute(cmd);
  }

  @Override
  public List<CountryCodeCO> listOpenTopSix() {
    return sysCountryOpenTopQryExe.execute();
  }

  @Override
  public List<CountryCodeCO> listOpenCountry() {
    return sysCountryOpenQryExe.execute();
  }

  @Override
  public AppCountryCodeCO getAppCountryCode() {
    return appOpenCountryCodeQryExe.execute();
  }

  @Override
  public UserProfileDTO getCustomerService(AppExtCommand cmd) {
    return sysCustomerServiceQryExe.execute(cmd);
  }

  @Override
  public List<BannerCO> listBanner(AppExtCommand cmd, String bannerType) {
    return bannerQryExe.execute(cmd, bannerType);
  }

  @Override
  public List<AppStartPageCO> listAppPageStart(AppExtCommand cmd) {
    return appPageStartQryExe.execute(cmd);
  }

  @Override
  public Map<String, String> listSysEnumConfig(AppCommand cmd) {
    return sysEnumConfigListQryExe.execute(cmd);
  }

  @Override
  public List<NoticeMessageCO> listNoticeMessageLastMonth(AppExtCommand cmd) {
    return sysNoticeMessageLastOneMonthQryExe.execute(cmd);
  }

}
