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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.mybatis.service.BaseService;
import com.red.circle.order.infra.database.rds.entity.count.TotalRechargeUser;
import com.red.circle.order.inner.model.dto.TotalRechargeUserDTO;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 充值过的用户 服务类.
 * </p>
 *
 * @author pengshigang
 * @since 2022-05-27
 */
public interface TotalRechargeUserService extends BaseService<TotalRechargeUser> {

  /**
   * 查询用户总充值金额
   */
  List<TotalRechargeUserDTO> listUserRechargeTotal(String sysOrigin);

  /**
   * 添加总额.
   */
  void incAmount(Long userId, BigDecimal amount);

  /**
   * 扣除.
   */
  void decr(Long userId, BigDecimal amount);

  /**
   * 分页查询.
   */
  PageResult<TotalRechargeUser> opsPageQuery(IPage<TotalRechargeUser> pageQuery, String sysOrigin,
      Long userId);

}
