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

import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.order.inner.model.cmd.inapp.OrderAbnormalPageQryCmd;
import com.red.circle.order.inner.model.dto.inapp.OrderAbnormalLogDTO;
import com.red.circle.order.inner.model.enums.inapp.OrderAbnormalStatusEnum;
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 2023/11/3
 */
public interface OrderAbnormalLogClientApi {

  String API_PREFIX = "/order/abnormal/log/client";


  /**
   * 异常订单记录分页列表(运营后台).
   */
  @PostMapping("/pageOps")
  ResultResponse<PageResult<OrderAbnormalLogDTO>> pageOps(
      @RequestBody @Validated OrderAbnormalPageQryCmd qryCmd);

  /**
   * 获取凭证.
   */
  @GetMapping("/getCertificateById")
  ResultResponse<String> getCertificateById(@RequestParam("id") Long id);

  /**
   * 修改装态.
   */
  @GetMapping("/updateStatus")
  ResultResponse<Void> updateStatus(
      @RequestParam("id") Long id,
      @RequestParam("status") OrderAbnormalStatusEnum status
  );

}
