增加库区

master
yiming 3 years ago
parent 9118e7b285
commit 1ac7844c36

@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@Api(value = "realTime",tags = "实时监控")
@RestController
@ -40,6 +41,13 @@ public class RealTimeController {
return Result.success(cameraService.allCameras());
}
@GetMapping("/allAreas")
@ApiOperation(value = "全部库区")
//@SessionHandler
public Result<Set<String>> allAreas() {
return Result.success(realTimeService.allAreas());
}
@GetMapping("/wallStyle")
@ApiOperation(value = "视频墙样式")
//@SessionHandler

@ -57,4 +57,9 @@ public class Street {
private Integer videoStyleRow;
private Integer videoStyleColumn;
/**
*
*/
private String area;
}

@ -0,0 +1,13 @@
package com.leaper.web.pojo.camera;
import lombok.Data;
@Data
public class AreaCamera {
private Integer id;
private String rtcServer;
private Integer rtcServerPort;
}

@ -10,10 +10,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
*
@ -64,5 +62,10 @@ public class RealTimeService {
}
public Set<String> allAreas(){
List<Street> streets = streetMapper.selectByMap(new HashMap<>());
return streets.stream().collect(Collectors.groupingBy(Street::getArea)).keySet();
}
}

Loading…
Cancel
Save