chenshijun
2019-10-11 d51c66acbfdcadc5119ed5389e219c56dedec13f
增加更新所有下级平台资源的接口
1个文件已修改
13 ■■■■ 已修改文件
gb28181Api.go 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gb28181Api.go
@@ -404,8 +404,8 @@
    return cameraSlice, true
}
//UpdateResource 更新下级平台资源
func (api Gb28181Api) UpdateResource(devID string) bool {
//updateResourceByID 更新下级平台资源
func (api Gb28181Api) updateResourceByID(devID string) bool {
    url := BASIC_URL + "/vss/get_catalog/" + devID
    client := NewClient()
@@ -428,6 +428,15 @@
    return true
}
func (api Gb28181Api) UpdateAllResource() {
    devices, b := api.GetAllDevices()
    if b && len(devices) > 0 {
        for _, device := range devices {
            api.updateResourceByID(device.PublicID)
        }
    }
}
//SetCameraPtz 2.3 PTZ云台控制
//"channelid":  (字符串)   通道20位编号
//"ptztype":   (字符串) 控制类型:上"up",下"down",左"left",右"right",左上"leftup",左下"leftdown",右上"rightup",右下"rightdown",镜头近"zoomin",镜头远"zoomout",