|
|
|
@ -15,6 +15,7 @@ import com.zhehekeji.web.pojo.street.StreetSearch;
|
|
|
|
import com.zhehekeji.web.service.CameraService;
|
|
|
|
import com.zhehekeji.web.service.CameraService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
|
|
@ -25,6 +26,7 @@ import java.util.List;
|
|
|
|
@Api(value = "camera",tags = "球机管理")
|
|
|
|
@Api(value = "camera",tags = "球机管理")
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/camera")
|
|
|
|
@RequestMapping("/camera")
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
public class CameraController {
|
|
|
|
public class CameraController {
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
@ -125,9 +127,13 @@ public class CameraController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/downloadConfig")
|
|
|
|
@GetMapping("/downloadConfig")
|
|
|
|
@ApiOperation(value = "下载")
|
|
|
|
@ApiOperation(value = "视频直播配置")
|
|
|
|
public Result downloadConfig() throws IOException {
|
|
|
|
public Result downloadConfig() throws IOException {
|
|
|
|
File file = new File("./config.json");
|
|
|
|
File directory = new File("D:\\hzleaper_auto_install/rtsp2webRTC");
|
|
|
|
|
|
|
|
if(!directory.exists()){
|
|
|
|
|
|
|
|
directory.mkdirs();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
File file = new File("D:\\hzleaper_auto_install/rtsp2webRTC/config.json");
|
|
|
|
if (file.exists()) { // 如果已存在,删除旧文件
|
|
|
|
if (file.exists()) { // 如果已存在,删除旧文件
|
|
|
|
file.delete();
|
|
|
|
file.delete();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -156,6 +162,7 @@ public class CameraController {
|
|
|
|
write.write(jsonObject.toJSONString());
|
|
|
|
write.write(jsonObject.toJSONString());
|
|
|
|
write.flush();
|
|
|
|
write.flush();
|
|
|
|
write.close();
|
|
|
|
write.close();
|
|
|
|
|
|
|
|
log.info("downloadConfig");
|
|
|
|
return Result.success();
|
|
|
|
return Result.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|