package com.ozs.controller.upload;

import com.ozs.entity.BaseCameraManagement;
import com.ozs.entity.vo.CamerasVo;
import com.ozs.service.BaseCameraManagementService;
import com.ozs.utils.CameraUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Administrator
 */
@RestController
@Slf4j
public class PressureController {

    @Autowired
    private CameraUtil cameraUtil;
    @Autowired
    private BaseCameraManagementService baseCameraManagementService;

    /**
     * 天网数据压测
     */
    @GetMapping("/api/pressurePreviewURLs")
    public void getWebToken() {
        List<BaseCameraManagement> list = baseCameraManagementService.list();
        for (int i = 0; i < 2; i++) {
            for (BaseCameraManagement baseCameraManagement : list) {
                CamerasVo camerasVo = new CamerasVo();
                camerasVo.setCameraIndexCode(baseCameraManagement.getCameraCode());
//                String msg = cameraUtil.apiPreviewURLs(camerasVo);
//                log.info(msg);
                System.out.println(camerasVo);
            }   
        }
    }
}
