package com.css.simulation.resource.server.adapter.controller.model_library.sensor_configuration;

import api.common.pojo.common.ResponseBodyVO;
import api.common.pojo.param.model.CameraParam;
import api.common.pojo.param.model.GpsParam;
import api.common.pojo.param.model.LidarParam;
import api.common.pojo.param.model.OgtParam;
import api.common.pojo.vo.model.SensorNewVO;
import api.common.pojo.vo.model.SensorVO;
import com.css.simulation.resource.server.app.service.CameraService;
import com.css.simulation.resource.server.app.service.GpsService;
import com.css.simulation.resource.server.app.service.LidarService;
import com.css.simulation.resource.server.app.service.OgtService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "/sensor")
public class SensorController {

    @Resource
    private CameraService cameraService;
    @Resource
    private GpsService gpsService;
    @Resource
    private LidarService lidarService;
    @Resource
    private OgtService ogtService;

    //* -------------------------------- 删除传感器 --------------------------------

    //* -------------------------------- Comment --------------------------------

    /**
     * 获取私有列表
     */
    @RequestMapping("/getMySensorList")
    public ResponseBodyVO<SensorVO> getMySensorList() {

        return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS,
                new SensorVO(
                        cameraService.getMyCameraList(new CameraParam()),
                        gpsService.getGpsList(new GpsParam()),
                        lidarService.getMyLidarList(new LidarParam()),
                        ogtService.getMyOgtList(new OgtParam())
                )
        );
    }

    /**
     * 获取私有列表
     */
    @RequestMapping("/getMySensorListNew")
    public ResponseBodyVO<SensorNewVO> getMySensorListNew() {

        return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS,
                new SensorNewVO(
                        cameraService.getMyCameraList1(new CameraParam()),
                        gpsService.getGpsList1(new GpsParam()),
                        lidarService.getMyLidarList1(new LidarParam()),
                        ogtService.getMyOgtList1(new OgtParam())
                )
        );
    }

}
