package com.cusc.nirvana.user.rnr.fp.controller;

import com.cusc.nirvana.common.result.Response;
import com.cusc.nirvana.user.rnr.fp.dto.VehicleUnboundVerifyRequestDTO;
import com.cusc.nirvana.user.rnr.fp.dto.VerifyVinCardResponseDTO;
import com.cusc.nirvana.user.rnr.fp.service.IVehicleRnrUnBoundService;
import com.cusc.nirvana.user.rnr.mg.dto.VehicleUnbindDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author yubo
 * @since 2022-04-24 17:07
 */
@RestController
@RequestMapping("/vehicle")
public class FpVehicleRnrUnboundController {

    @Autowired
    private IVehicleRnrUnBoundService unBoundService;

    /**
     * 车企实名解绑-校验数据接口
     * @param responseDTO
     * @return
     */
    @PostMapping("/verifyUnboundVinCardBatch")
    public Response<VerifyVinCardResponseDTO> verifyUnboundVinCardBatch(@Valid @RequestBody VehicleUnboundVerifyRequestDTO responseDTO) {
        return unBoundService.verifyUnboundVinCardBatch(responseDTO);
    }

    @PostMapping("/batchUnbound")
    public Response<VerifyVinCardResponseDTO> batchUnbound(@Valid @RequestBody VehicleUnbindDTO responseDTO) {
        return unBoundService.batchUnbound(responseDTO);
    }
}
