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

import com.yuchen.saas.parking.api.param.ReplacePlateNoRecordParam;
import com.yuchen.saas.parking.api.vo.ReplacePlateNoRecordPageVo;
import com.yuchen.saas.parking.api.vo.ReplacePlateNoRecordVo;
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.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;

/**
 * @Author yuanzhelin
 * @Date 2024/9/2 11:01
 * @Description TODO
 */
@FeignClient(
        value = AppNameConstant.SAAS_PARKING,
        fallbackFactory = ReplacePlateNoRecordClientFallback.class
)
public interface ReplacePlateNoRecordClient {
    /**
     * 获取更换车牌审核详情
     *
     * @return
     * @tag pauly-lyz
     */
    @GetMapping("/parking/plateNo/replace/getPage")
    R<NestPage<ReplacePlateNoRecordPageVo>> getPage(@RequestParam Long parkId, @RequestParam Integer type, @RequestParam(required = false) Long parkingId, @RequestParam(required = false) Long ruleId, @RequestParam(required = false) String personPhone, @RequestParam(required = false) String isOwner, @RequestParam(required = false) String plateNo, @RequestParam(required = false) String personName, @RequestParam(required = false) Integer  reviewState, @RequestParam(required = false, defaultValue = "false") Boolean pending, @RequestParam Integer current, @RequestParam Integer size);
    /**
     * 获取更换车牌审核详情
     *
     * @return
     * @tag pauly-lyz
     */
    @GetMapping("/parking/plateNo/replace//getReplacePlateNoDetail")
    R<ReplacePlateNoRecordVo> getReplacePlateNoDetail(@RequestParam Long id);
    /**
     * 审核月卡更换车牌
     *
     * @param param 月卡更换车牌审核数据
     * @return
     * @tag pauly-lyz
     */
    @PostMapping("/parking/plateNo/replace//auditReplace")
    R<Boolean> auditReplace(@RequestBody ReplacePlateNoRecordParam param);
}
