package com.xhpc.user.controller;

import com.xhpc.common.core.domain.R;
import com.xhpc.common.core.web.controller.BaseController;
import com.xhpc.user.domain.XhpcUserVehicle;
import io.swagger.annotations.ApiOperation;
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 java.util.Map;

/**
 * 道闸日志
 */
@RestController
@RequestMapping("/app/barrierGateLog")
public class XhpcBarrierGateLog extends BaseController {


    @ApiOperation("添加车辆出站信息")
    @PostMapping("/massage")
    public R massage(@RequestBody Map<String, Object> map){

        if(map.get("plateNo") ==null || "".equals(map.get("plateNo").toString())){
            return R.fail(40003,"车牌号为空");
        }
        if(map.get("inTime") ==null || "".equals(map.get("inTime").toString())){
            return R.fail(40003,"进场为空");
        }
        if(map.get("outTime") ==null || "".equals(map.get("outTime").toString())){
            return R.fail(40003,"出场为空");
        }

        return R.ok(null,"数据已接受");
    }


}
