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

import com.red.circle.common.business.dto.cmd.app.AppIdLongCmd;
import com.red.circle.other.app.command.sys.query.SysActivityConfQryExe;
import com.red.circle.other.app.command.sys.query.SysActivityRankQryExe;
import com.red.circle.other.app.command.sys.query.SysActivityUserCountQryExe;
import com.red.circle.other.app.dto.clientobject.sys.ActivityIndexCO;
import com.red.circle.other.app.dto.clientobject.sys.SysActivityCountRankCO;
import com.red.circle.other.app.dto.clientobject.sys.SysActivityUserCountCO;
import com.red.circle.other.app.dto.cmd.sys.SysActivityRankQryCmd;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 系统活动服务 实现.
 *
 * @author pengliang on 2022/8/16
 */
@Service
@RequiredArgsConstructor
public class SysActivityServiceImpl implements SysActivityService {

  private final SysActivityRankQryExe sysActivityRankQryExe;
  private final SysActivityConfQryExe sysActivityConfQueryExe;
  private final SysActivityUserCountQryExe sysActivityUserCountQryExe;

  @Override
  public ActivityIndexCO getActivityConfig(AppIdLongCmd cmd) {
    return sysActivityConfQueryExe.execute(cmd);
  }

  @Override
  public List<SysActivityCountRankCO> listRank(SysActivityRankQryCmd cmd) {
    return sysActivityRankQryExe.execute(cmd);
  }

  @Override
  public SysActivityUserCountCO getUserCount(AppIdLongCmd cmd) {
    return sysActivityUserCountQryExe.execute(cmd);
  }

}
