package com.yuchen.saas.manage.user.api.feign;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.yuchen.saas.manage.user.api.entity.UserVehicleData;
import com.yuchen.saas.manage.user.api.request.dto.*;
import com.yuchen.saas.manage.user.api.vo.*;
import com.yuchen.saas.manage.user.api.vo.user.IdCardOcrVO;
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.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * @Author 蔡文强
 * @Date 2023/5/6 15:56
 * @Description 用户车辆认证远程调用
 */
@FeignClient(
        value = AppNameConstant.SAAS_USER,
        fallbackFactory = UserVehicleCertificationFeignFallback.class
)
public interface UserVehicleCertificationFeign {

    @PostMapping("/userVehicle/certification/discernVehicleLicenseOcr")
    R<VehicleLicenseOcrVO> discernVehicleLicenseOcr(@RequestBody VehicleLicenseOcrDTO ocrDTO);
    @PostMapping("/userVehicle/certification/save")
    R<UserVehicleCertificationResultVO> saveUserVehicleCertification(@RequestBody UserVehicleCertificationDTO userVehicleCertificationDTO);

    @PostMapping("/userVehicle/certification/update")
    R<Boolean> updateUserVehicleCertification(@RequestBody UserVehicleCertificationChangeDTO changeDTO);

    @GetMapping("/userVehicle/certification/detail/{id}")
    R<UserVehicleCertificationVO> getUserVehicleCertificationById(@PathVariable Long id);

    @PostMapping("/userVehicle/certification/list")
    R<NestPage<UserVehicleCertificationVO>> getUserVehicleCertificationList(@RequestBody UserVehicleCertificationQueryDTO queryDTO);

    @PostMapping("/userVehicle/certification/getUserPlateAuthenticationDetail")
    R<UserPlateAuthenticationDetailVO> getUserPlateAuthenticationDetail(@RequestBody UserPlateAuthenticationReqDTO reqDTO);

    @GetMapping("/userVehicle/certification/getAuthenticationVehicleDataByPlateNo/{plateNo}")
    R<UserVehicleData> getAuthenticationVehicleDataByPlateNo(@PathVariable String plateNo);
    @PostMapping("/discernIdCardOcr")
    R<IdCardOcrVO> discernIdCardOcr(@Validated @RequestBody IdCardOcrReqDTO reqDTO);

    /**
     * @tag 1.4.0
     */
    @GetMapping("/userVehicle/certification/appeal/getUserHandingList")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "获取用户申诉处理中列表", notes = "获取用户申诉处理中列表")
    R<List<UserVehicleCertificationAppealHandingListVO>> getUserHandingList() ;

    /**
     * @tag 1.4.0
     */
    @PostMapping("/userVehicle/certification/appeal/save")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "车辆申诉", notes = "车辆申诉")
    R<Boolean> saveUserVehicleCertificationAppeal(@RequestBody @Validated UserVehicleCertificationAppealDTO userVehicleCertificationDTO) ;
}
