From 4c9b4ac26d6dcaaf1bb1ff79c135feae6fdb48bc Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期五, 26 十一月 2021 14:22:20 +0800 Subject: [PATCH] 增加接口 GetUserProfile --- timePgnApi.go | 27 --------------------------- 1 files changed, 0 insertions(+), 27 deletions(-) diff --git a/timePgnApi.go b/timePgnApi.go index 0145343..7390201 100644 --- a/timePgnApi.go +++ b/timePgnApi.go @@ -12,9 +12,6 @@ func (api TimePgnApi) SaveCameraPolygon(paramBody map[string]interface{}) (bool,interface{}) { url := DATA_URL_PREFIX + "/polygon/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 { @@ -33,9 +30,6 @@ func (api TimePgnApi) DeleteCameraPolygon(id string) (bool,interface{}){ url := DATA_URL_PREFIX + "/polygon/delete" netNode := getNetNode(url2Topic(Topic_Scene_Service, url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) paramQuery := make(map[string]string,0) paramQuery["id"]=id @@ -54,9 +48,6 @@ func (api TimePgnApi) FindAllPolygons() ([]protomsg.CameraPolygon) { url := DATA_URL_PREFIX + "/polygon/findAll" netNode := getNetNode(url2Topic(Topic_Scene_Service, url)) - if netNode == nil { - return nil - } polygons := make([]protomsg.CameraPolygon,0) client := NewClient(WithNodes(netNode)) @@ -80,9 +71,6 @@ func (api TimePgnApi) FindPolygonsByCameraId(cameraId string) (bool,interface{}) { url := DATA_URL_PREFIX + "/polygon/findByCameraId" netNode := getNetNode(url2Topic(Topic_Scene_Service, url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) paramQuery := make(map[string]string,0) paramQuery["cameraId"] = cameraId @@ -102,9 +90,6 @@ func (api TimePgnApi) SaveCameraTimerule(paramBody map[string]interface{}) (bool,interface{}) { url := DATA_URL_PREFIX + "/cameraTimerule/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 { @@ -123,9 +108,6 @@ func (api TimePgnApi) DeleteCameraTimerule (id string) bool { url := DATA_URL_PREFIX + "/cameraTimerule/delete" netNode := getNetNode(url2Topic(Topic_Scene_Service, url)) - if netNode == nil { - return false - } client := NewClient(WithNodes(netNode)) paramQuery := make(map[string]string,0) paramQuery["id"]=id @@ -145,9 +127,6 @@ func (api TimePgnApi) FindAllTimeRules() (flag bool,rules []protomsg.CameraTimerule) { url := DATA_URL_PREFIX + "/cameraTimerule/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 { @@ -168,9 +147,6 @@ func (api TimePgnApi) UpdateDefenceStateByPolygonId(polygonId string,state string) (bool,interface{}){ url := DATA_URL_PREFIX + "/polygon/updateDefenceStateByPolygonId" netNode := getNetNode(url2Topic(Topic_Scene_Service, url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) paramQuery :=make(map[string]string,0) paramQuery["polygonId"] = polygonId @@ -190,9 +166,6 @@ func (api TimePgnApi) UpdateDefenceStateByCameraId(cameraId string,state string) (bool,interface{}){ url := DATA_URL_PREFIX + "/polygon/updateDefenceStateByCameraId" netNode := getNetNode(url2Topic(Topic_Scene_Service, url)) - if netNode == nil { - return false,nil - } client := NewClient(WithNodes(netNode)) paramQuery :=make(map[string]string,0) paramQuery["cameraId"] = cameraId -- Gitblit v1.8.0