package com.red.circle.other.infra.database.mongo.service.sys;

import com.red.circle.other.infra.database.mongo.entity.sys.SysActivityCount;
import com.red.circle.other.inner.model.dto.sys.SysActivityCountType;
import java.util.List;
import java.util.Map;

/**
 * 系统活动统计.
 *
 * @author pengliang on 2022/8/16
 */
public interface SysActivityCountService {

  /**
   * 统计活动贡献.
   */
  void incrQuantity(Long activityId, Long userId, SysActivityCountType type, Long quantity);

  /**
   * 统计活动贡献-批量.
   */
  void incrBatchQuantity(List<SysActivityCount> sysActivityCounts);

  /**
   * 获取用户贡献.
   */
  Map<SysActivityCountType, SysActivityCount> getUserCount(Long activityId, Long userId);

  /**
   * 获取活动排名.
   */
  List<SysActivityCount> listRank(Long activityId, SysActivityCountType type, Integer size);

}
