liuxiaolong
2021-02-01 d3b72f9587126ab6b4b7424934afcfa187a6c8a4
本地摄像机和国标摄像机的FindAll添加参数
2个文件已修改
18 ■■■■ 已修改文件
cameraApi.go 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gb28181Api.go 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cameraApi.go
@@ -145,15 +145,20 @@
    return res.Success
}
func (api CameraApi) FindAll() (cameras []protomsg.Camera) {
func (api CameraApi) FindAll(cameraName string, runType string, cameraId string) (cameras []protomsg.Camera) {
    url := DATA_URL_PREFIX + "/camera/showAll"
    netNode := getNetNode(url2Topic(Topic_Camera_Service, url))
    if netNode == nil {
        return nil
    }
    client := NewClient(WithNodes(netNode))
    paramQuery := map[string]string {
        "cameraName": cameraName,
        "runType": runType,
        "cameraId": cameraId,
    }
    body, err := client.DoGetRequest(url, nil, nil)
    body, err := client.DoGetRequest(url, paramQuery, nil)
    if err != nil {
        return nil
    }
gb28181Api.go
@@ -425,15 +425,20 @@
    return res.Success
}
func (api Gb28181Api) FindAll() (cameras []protomsg.Camera) {
func (api Gb28181Api) FindAll(cameraName string, runType string, cameraId string) (cameras []protomsg.Camera) {
    url := DATA_URL_PREFIX + "/gb28181/camera/showAll"
    netNode := getNetNode(url2Topic(Topic_Gb28181_Service, url))
    if netNode == nil {
        return nil
    }
    client := NewClient(WithNodes(netNode))
    paramQuery := map[string]string {
        "cameraName": cameraName,
        "runType": runType,
        "cameraId": cameraId,
    }
    body, err := client.DoGetRequest(url, nil, nil)
    body, err := client.DoGetRequest(url, paramQuery, nil)
    if err != nil {
        return nil
    }