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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.red.circle.framework.mybatis.dao.BaseDAO;
import com.red.circle.order.infra.database.rds.entity.count.TotalRechargeUser;
import com.red.circle.order.inner.model.dto.TotalRechargeUserDTO;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 充值过的用户 Mapper 接口.
 * </p>
 *
 * @author pengshigang
 * @since 2022-05-27
 */
public interface TotalRechargeUserDAO extends BaseDAO<TotalRechargeUser> {

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

  /**
   * 不存在插入.
   */
  void saveIfAbsent(@Param("param") TotalRechargeUser param);

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

}
