package com.red.circle.other.inner.endpoint.user.user.api;

import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.inner.model.cmd.user.UserCustomGiftQryCmd;
import com.red.circle.other.inner.model.dto.user.UserCustomGiftRecordDTO;
import java.util.Map;
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 zongpubin on 2024/1/31
 */
public interface UserCustomGiftClientApi {

  String API_PREFIX = "/user-custom-gift/client";

  @PostMapping("/getCustomGift")
  ResultResponse<PageResult<UserCustomGiftRecordDTO>> getCustomGift(
      @RequestBody UserCustomGiftQryCmd query);

  @GetMapping("/switchStatus")
  ResultResponse<Void> switchStatus(@RequestParam("id") Long id,
      @RequestParam("status") Boolean status);

  @GetMapping("/userCustomGift")
  ResultResponse<UserCustomGiftRecordDTO> userCustomGift(@RequestParam("id") Long id);

  @PostMapping("/updateSelectiveById")
  ResultResponse<Void> updateSelectiveById(@RequestBody UserCustomGiftRecordDTO cmd);

  @PostMapping("/saveCustomGift")
  ResultResponse<Void> saveCustomGift(@RequestBody UserCustomGiftRecordDTO setAmount);

  @GetMapping("/mapByAmount")
  ResultResponse<Map<Integer, UserCustomGiftRecordDTO>> mapByAmount(
      @RequestParam("userId") Long userId);
}
