| | |
| | | func (api CameraPolygonRelationApi) FindAll() (flag bool,list []protomsg.CameraPolygonRelation) { |
| | | url := DATA_URL_PREFIX + "/polygon/relation/findAll" |
| | | netNode := getNetNode(url2Topic(Topic_Scene_Service, url)) |
| | | if netNode == nil { |
| | | return false,nil |
| | | } |
| | | client := NewClient(WithNodes(netNode)) |
| | | body, err := client.DoGetRequest(url, nil, nil) |
| | | if err != nil { |
| | |
| | | func (api CameraPolygonRelationApi) Relations(paramBody map[string]interface{}) (bool,interface{}) { |
| | | url := DATA_URL_PREFIX + "/polygon/relations" |
| | | netNode := getNetNode(url2Topic(Topic_Scene_Service, url)) |
| | | if netNode == nil { |
| | | return false,nil |
| | | } |
| | | client := NewClient(WithNodes(netNode)) |
| | | body, err := client.DoPostRequest(url,CONTENT_TYPE_JSON,paramBody,nil,nil) |
| | | if err != nil { |
| | |
| | | func (api CameraPolygonRelationApi) SaveRelation(paramBody map[string]interface{}) (bool,interface{}) { |
| | | url := DATA_URL_PREFIX + "/polygon/relation/save" |
| | | netNode := getNetNode(url2Topic(Topic_Scene_Service, url)) |
| | | if netNode == nil { |
| | | return false,nil |
| | | } |
| | | client := NewClient(WithNodes(netNode)) |
| | | body, err := client.DoPostRequest(url,CONTENT_TYPE_JSON,paramBody,nil,nil) |
| | | if err != nil { |
| | |
| | | func (api CameraPolygonRelationApi) DelRelation(id string) bool { |
| | | url := DATA_URL_PREFIX + "/polygon/relation/del" |
| | | netNode := getNetNode(url2Topic(Topic_Scene_Service, url)) |
| | | if netNode == nil { |
| | | return false |
| | | } |
| | | client := NewClient(WithNodes(netNode)) |
| | | paramMap := make(map[string]string,0) |
| | | paramMap["id"] = id |