liuxiaolong
2021-05-10 30bbec0a251cb33a01f2693b6da3c92bd5802d50
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)
@@ -112,6 +100,10 @@
      return false, nil
   }
   if !res.Success {
      logPrint("FindAllDoingStacks ret false,res:", res)
      return false,nil
   }
   b, err := json.Marshal(res.Data)
   if err !=nil {
      logPrint("unmarshal FileStackApi FindAll.result err")
@@ -128,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,
@@ -155,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,
@@ -179,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,
@@ -204,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,
@@ -228,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)