package com.red.circle.order.inner.endpoint.api;

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.order.inner.model.cmd.MonthlyRechargeDatesQryCmd;
import com.red.circle.order.inner.model.cmd.MonthlyRechargeQryCmd;
import com.red.circle.order.inner.model.dto.MonthlyRechargeSummaryVO;
import com.red.circle.order.inner.model.dto.UserMonthlyRechargeDTO;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 累计用户每月充值.
 *
 * @author pengliang on 2024/1/23
 */
public interface UserMonthlyRechargeClientApi {

  String API_PREFIX = "/monthly/recharge/client";

  /**
   * 获取充值信息.
   */
  @PostMapping("/mapGroupByUserId")
  ResultResponse<Map<Long, List<UserMonthlyRechargeDTO>>> mapGroupByUserId(
      @RequestBody @Validated MonthlyRechargeQryCmd qryCmd);

  /**
   * 获取充值信息.
   */
  @PostMapping("/mapGroupByRechargeDates")
  ResultResponse<Map<Integer, List<UserMonthlyRechargeDTO>>> mapGroupByRechargeDates(
      @RequestBody @Validated MonthlyRechargeDatesQryCmd qryCmd);


  /**
   * 获取本月充值.
   */
  @GetMapping("/listThisMonth")
  ResultResponse<List<UserMonthlyRechargeDTO>> listThisMonth(@RequestParam("userId") Long userId);

    /**
     * 批量获取用户本月充值.
     */
    @GetMapping("/listThisMonthByIds")
    ResultResponse<List<UserMonthlyRechargeDTO>> listThisMonthByIds(@RequestParam("userIds") List<Long> userIds);

    /**
     * 批量获取用户本月充值.
     */
    @GetMapping("/listLastMonthByIds")
    ResultResponse<List<UserMonthlyRechargeDTO>> listLastMonthByIds(@RequestParam("userIds") List<Long> userIds);

    /**
     * 获取金币代理本月和上个月的充值汇总.
     */
    @GetMapping("/monthly-summary")
    ResultResponse<List<MonthlyRechargeSummaryVO>> getMonthlyRechargeSummary(@RequestParam("userIds") Set<Long> userIds);


}
