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

import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.inner.model.cmd.sys.SysBannerConfigQryCmd;
import com.red.circle.other.inner.model.dto.sys.SysBannerConfigDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author zongpubin on 2023/10/30
 */
public interface SysBannerConfigClientApi {

  String API_PREFIX = "/sys/banner-config";

  @PostMapping("/pageBanner")
  ResultResponse<PageResult<SysBannerConfigDTO>> pageBanner(
      @RequestBody SysBannerConfigQryCmd query);

  @PostMapping("/addBanner")
  ResultResponse<Void> addBanner(@RequestBody SysBannerConfigDTO dto);

  @PostMapping("/removeBanner")
  ResultResponse<Void> removeBanner(@RequestParam("sysOrigin") String sysOrigin,
      @RequestParam("id") Long id);

  @PostMapping("/updateBanner")
  ResultResponse<Void> updateBanner(@RequestBody SysBannerConfigDTO dto);
}
