package com.yuchen.saas.parking.api.feign.black;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.yuchen.saas.parking.api.dto.black.PageBlackListReqDTO;
import com.yuchen.saas.parking.api.feign.ParkingScreenClientFallback;
import com.yuchen.saas.parking.api.vo.OpenGateCommand;
import com.yuchen.saas.parking.api.vo.black.VehicleBlacklistRemindConfigVO;
import com.yuchen.saas.parking.api.vo.black.VehicleBlacklistVO;
import io.swagger.annotations.ApiOperation;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.mp.support.NestPage;
import org.nest.springwrap.core.tool.api.R;
import org.nest.springwrap.core.tool.utils.Func;
import org.springframework.cloud.openfeign.FeignClient;
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;

import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

/**
 * @author mqs
 * @version 1.0
 */
@FeignClient(
        value = AppNameConstant.SAAS_PARKING,
        fallback = VehicleBlacklistClientFallback.class
)
public interface VehicleBlacklistClient {

    /**
     * 车辆黑名单 新增/修改
     * @param vehicleBlacklistVO
     * @return
     */
    @PostMapping("/vehicleBlacklist/saveOrUpdate")
    R saveOrUpdate(@RequestBody VehicleBlacklistVO vehicleBlacklistVO);

    /**
     * 获取详情
     * @param id
     * @return
     */
    @GetMapping("/vehicleBlacklist/detail")
    R detail(Long id);

    /**
     * 根据主表id删除
     * @param id
     * @return
     */
    @PostMapping("/vehicleBlacklist/removeByBlackId")
    R removeByBlackId(Long id);

    /**
     * 根据停车场id查询列表
     * @param parkingId
     * @return
     */
    @GetMapping("/vehicleBlacklist/getListByParkingId")
    R getListByParkingId(Long parkingId);

    /**
     * 黑名单车辆列表 分页
     */
    @PostMapping("/vehicleBlacklist/page")
    R<NestPage<VehicleBlacklistVO>> page(@Valid @RequestBody PageBlackListReqDTO reqDTO);

//    /**
//     * 导出 黑名单车辆列表
//     * @param reqDTO
//     * @param response
//     */
//    @PostMapping("/vehicleBlacklist/exportBlacklist")
//    void exportVisitor(PageBlackListReqDTO reqDTO, HttpServletResponse response);

}
