package com.pj.api.open.web;

import com.pj.api.open.ResultJson;
import com.pj.api.open.bo.CheckCarNumberBO;
import com.pj.api.open.service.OpenService;
import lombok.extern.slf4j.Slf4j;
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.annotation.Resource;

@RequestMapping(value = "open")
@RestController
@Slf4j
public class OpenController {
    @Resource
    OpenService openService;

    @PostMapping(value = "req")
    public ResultJson req() {
        return ResultJson.success();
    }
    @PostMapping(value = "CheckCarNumber")
    public ResultJson checkPass(@RequestBody CheckCarNumberBO checkCarNumberBO) {
        log.info("check car number");
        openService.checkCarNumber(checkCarNumberBO);
        return ResultJson.success();
    }
}
