From cc9d7e2dfad7c634e8ce69d02ce5fc4065e809e4 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期日, 25 四月 2021 11:34:47 +0800
Subject: [PATCH] 使用bhsgo  by  lichao

---
 fileStack.go |   27 ---------------------------
 1 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/fileStack.go b/fileStack.go
index 8b7611f..4ccd4c8 100644
--- a/fileStack.go
+++ b/fileStack.go
@@ -13,9 +13,6 @@
 func (api FileStackApi) Save(paramBody map[string]interface{}) bool {
 	url := DATA_URL_PREFIX + "/fileStack/save"
 	netNode := getNetNode(url2Topic(Topic_Stack_Service, url))
-	if netNode == nil {
-		return false
-	}
 	client := NewClient(WithNodes(netNode))
 	body,err := client.DoPostRequest(url,CONTENT_TYPE_JSON, paramBody,nil,nil)
 	if err != nil {
@@ -34,9 +31,6 @@
 func (api FileStackApi) Show(id string) (b bool,sck protomsg.FileStack) {
 	url := DATA_URL_PREFIX + "/fileStack/show"
 	netNode := getNetNode(url2Topic(Topic_Stack_Service, url))
-	if netNode == nil {
-		return false,sck
-	}
 	client := NewClient(WithNodes(netNode))
 	paramQuery := map[string]string {
 		"id": id,
@@ -70,9 +64,6 @@
 func (api FileStackApi) FindAllByPage(name string,fType int, page int, size int) (bool,interface{}){
 	url := DATA_URL_PREFIX + "/fileStack/findAllByPage"
 	netNode := getNetNode(url2Topic(Topic_Stack_Service, url))
-	if netNode == nil {
-		return false,nil
-	}
 	client := NewClient(WithNodes(netNode))
 	paramQuery := map[string]string {
 		"name": name,
@@ -97,9 +88,6 @@
 func (api FileStackApi) FindAllDoingStacks() (flag bool,stacks []protomsg.FileStack){
 	url := DATA_URL_PREFIX + "/fileStack/findAllDoingStacks"
 	netNode := getNetNode(url2Topic(Topic_Stack_Service, url))
-	if netNode == nil {
-		return false,nil
-	}
 	client := NewClient(WithNodes(netNode))
 
 	body, err := client.DoGetRequest(url, nil, nil)
@@ -132,9 +120,6 @@
 func (api FileStackApi) ChangeEnable(id string,enable bool) bool {
 	url := DATA_URL_PREFIX + "/fileStack/changeEnable"
 	netNode := getNetNode(url2Topic(Topic_Stack_Service, url))
-	if netNode == nil {
-		return false
-	}
 	client := NewClient(WithNodes(netNode))
 	paramBody := map[string]interface{} {
 		"id": id,
@@ -159,9 +144,6 @@
 func (api FileStackApi) Delete(id string) bool {
 	url := DATA_URL_PREFIX + "/fileStack/delete"
 	netNode := getNetNode(url2Topic(Topic_Stack_Service, url))
-	if netNode == nil {
-		return false
-	}
 	client := NewClient(WithNodes(netNode))
 	paramBody := map[string]interface{} {
 		"id": id,
@@ -183,9 +165,6 @@
 func (api FileStackApi) UpdateStatus(idArr []string, status int) bool {
 	url := DATA_URL_PREFIX + "/fileStack/updateStatus"
 	netNode := getNetNode(url2Topic(Topic_Stack_Service, url))
-	if netNode == nil {
-		return false
-	}
 	client := NewClient(WithNodes(netNode))
 	paramBody := map[string]interface{} {
 		"ids":idArr,
@@ -208,9 +187,6 @@
 func (api FileStackApi) UpdateChannelCount(count int) bool {
 	url := DATA_URL_PREFIX + "/fileSetting/updateChannelCount"
 	netNode := getNetNode(url2Topic(Topic_Stack_Service, url))
-	if netNode == nil {
-		return false
-	}
 	client := NewClient(WithNodes(netNode))
 	paramBody := map[string]interface{} {
 		"channelCount":count,
@@ -232,9 +208,6 @@
 func (api FileStackApi) FindAll() (flag bool,stacks []protomsg.FileStack) {
 	url := DATA_URL_PREFIX + "/fileStack/findAll"
 	netNode := getNetNode(url2Topic(Topic_Stack_Service, url))
-	if netNode == nil {
-		return false,nil
-	}
 	client := NewClient(WithNodes(netNode))
 
 	body, err := client.DoGetRequest(url, nil, nil)

--
Gitblit v1.8.0