package com.red.circle.order.inner.service;

import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.order.inner.model.cmd.UserRechargeDaysQryCmd;
import com.red.circle.order.inner.model.cmd.inapp.OrderPurchaseHistoryExportQryCmd;
import com.red.circle.order.inner.model.cmd.inapp.OrderPurchaseHistoryQryCmd;
import com.red.circle.order.inner.model.dto.OrderPurchaseHistoryDTO;
import java.math.BigDecimal;
import java.util.List;

/**
 * 订单历史.
 *
 * @author pengliang on 2023/11/3
 */
public interface OrderPurchaseHistoryClientService {

  /**
   * 添加订单, 历史.
   */
  void add(OrderPurchaseHistoryDTO order);

  /**
   * 运营后台,分页查询.
   */
  PageResult<OrderPurchaseHistoryDTO> pageQueryOps(OrderPurchaseHistoryQryCmd qryCmd);

  /**
   * 运营后台,导出订单.
   */
  List<OrderPurchaseHistoryDTO> exportOps(OrderPurchaseHistoryExportQryCmd qryCmd);

  /**
   * 今日内购总额.
   */
  BigDecimal purchaseTodayTotal();

  /**
   * 今日内购总额.
   *
   * @param sysOrigin 来源系统
   */
  BigDecimal purchaseTodayTotalBySysOrigin(SysOriginPlatformEnum sysOrigin);

  /**
   * 今日内购.
   */
  List<OrderPurchaseHistoryDTO> purchaseTodayBySysOrigin(UserRechargeDaysQryCmd query);

  /**
   * 根据用户ID查询购买总额
   *
   * @param userId 用户ID
   * @return 总额
   */
  BigDecimal getPurchaseTotalByUserId(Long userId);


  /**
   * 检查是否有谷歌充值
   * @param userId
   * @return
   */
  Boolean checkIsPurchaseRechargeByUserId(Long userId);

}
