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

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.common.business.dto.cmd.UserIdCmd;
import com.red.circle.other.app.command.user.query.UserRegionExchangeGoldTableQryExe;
import com.red.circle.other.app.command.user.query.UserRegionMetadataQryExe;
import com.red.circle.other.app.command.user.query.UserRegionQryExe;
import com.red.circle.other.app.dto.clientobject.user.user.SysExchangeGoldTableCO;
import com.red.circle.other.app.dto.clientobject.user.user.UserRegionCO;
import com.red.circle.other.infra.database.mongo.entity.user.region.SysRegionConfig;
import com.red.circle.other.infra.database.mongo.service.user.region.SysRegionConfigService;
import com.red.circle.other.infra.database.rds.entity.user.user.BaseInfo;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 用户区域服务.
 *
 * @author pengliang on 2023/6/11
 */
@Service
@RequiredArgsConstructor
public class UserRegionServiceImpl implements UserRegionService {

  private final UserRegionQryExe userRegionQryExe;
  private final UserRegionMetadataQryExe userRegionMetadataQryExe;
  private final UserRegionExchangeGoldTableQryExe userRegionExchangeGoldTableQryExe;


  @Override
  public UserRegionCO getUserRegionSetting(UserIdCmd cmd) {
    return userRegionQryExe.execute(cmd);
  }

  @Override
  public Map<String, String> getUserRegionMetadata(AppExtCommand cmd) {
    return userRegionMetadataQryExe.execute(cmd);
  }

  @Override
  public Map<String, String> getUserRegionDiamondMetadata(AppExtCommand cmd) {
    return userRegionMetadataQryExe.executeDiamondMetadata(cmd);
  }

  @Override
  public List<SysExchangeGoldTableCO> listRegionExchangeGoldTable(AppExtCommand cmd) {
    return userRegionExchangeGoldTableQryExe.execute(cmd);
  }


}
