package com.red.circle.order.infra.database.rds.service.count;

import com.red.circle.framework.mybatis.service.BaseService;
import com.red.circle.order.infra.database.rds.entity.count.TotalRecharge;
import com.red.circle.order.inner.model.enums.MonthlyRechargeType;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 累计用户充值总额 服务类.
 * </p>
 *
 * @author pengshigang
 * @since 2022-05-27
 */
public interface TotalRechargeService extends BaseService<TotalRecharge> {

  /**
   * 统计金额.
   */
  void incrAmount(Long userId, BigDecimal amount, MonthlyRechargeType type);

  /**
   * 减少.
   */
  void decr(Long userId, BigDecimal amount, MonthlyRechargeType type);

  /**
   * 获取充值信息.
   */
  Map<Long, List<TotalRecharge>> mapGroup(Set<Long> userIds);

}
