package com.red.circle.other.infra.database.mongo.service.user.count;

import com.red.circle.other.infra.database.mongo.entity.user.count.WeekFriendshipCardCount;
import java.util.List;
import org.apache.commons.lang3.tuple.ImmutableTriple;

/**
 * 每周用户关系卡片统计.
 *
 * @author pengshigang on 2022/7/11
 */
public interface WeekFriendshipCardCountService {

  /**
   * 累计本周统计.
   */
  void incrThisWeekQuantity(String sysOrigin, String cardType, Long userIdOne, Long userIdTwo,
      Long quantity);

  /**
   * 获取本周统计记录top.
   */
  List<WeekFriendshipCardCount> listThisWeekTop(String sysOrigin, Integer size);

  /**
   * 获取上周统计记录top.
   */
  List<WeekFriendshipCardCount> listLastWeekTop(String sysOrigin, Integer size);

  /**
   * 移除本周卡片贡献值.
   */
  void removeThisWeek(String cardType, Long userIdOne, Long userIdTwo);

  /**
   * 解析id中用户id.
   */
  ImmutableTriple<Long, Long, String> parseUserIdPair(String id);

}
