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

import com.yuchen.saas.parking.api.vo.black.VehicleBlacklistRemindConfigVO;
import io.swagger.annotations.ApiOperation;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.tool.api.R;
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.validation.Valid;

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

    /**
     * 黑名单车辆提醒设置 新增/修改
     * @param remindConfigVO
     * @return
     */
    @PostMapping("/vehicleBlacklistRemindConfig/saveOrUpdate")
    R saveOrUpdate(@Valid @RequestBody VehicleBlacklistRemindConfigVO remindConfigVO);

    /**
     * 获取详情
     * @param id
     * @return
     */
    @GetMapping("/vehicleBlacklistRemindConfig/detail")
    @ApiOperation(value = "获取详情", notes = "获取详情")
    R detail(Long id);

    /**
     * 根据主表id删除
     * @param id
     * @return
     */
    @PostMapping("/vehicleBlacklistRemindConfig/removeByConfigId")
    @ApiOperation(value = "根据主表id删除", notes = "根据主表id删除")
    R removeByConfigId(Long id);

    /**
     * 根据停车场id查询列表
     * @param parkingId
     * @return
     */
    @GetMapping("/vehicleBlacklistRemindConfig/getByParkingId")
    @ApiOperation(value = "根据停车场id查询列表", notes = "根据停车场id查询列表")
    R getByParkingId(@RequestParam Long parkingId);
}
