zhangmeng
2024-01-19 01dfd9dc8de7b19f9dfa4284722e01bbd5837801
dicApi.go
@@ -2,11 +2,10 @@
import (
   "basic.com/pubsub/protomsg.git"
   json "github.com/json-iterator/go"
   jsoniter "github.com/json-iterator/go"
)
type DicApi struct {
}
func (api DicApi) FindByType(dicType string) (bool,interface{}) {
@@ -20,6 +19,7 @@
      return false,nil
   }
   var res Result
   var json = jsoniter.ConfigCompatibleWithStandardLibrary
   if err = json.Unmarshal(respBody, &res); err != nil {
      logPrint(err)
      return false,nil
@@ -38,6 +38,7 @@
      return false,nil
   }
   var res Result
   var json = jsoniter.ConfigCompatibleWithStandardLibrary
   if err = json.Unmarshal(respBody, &res); err != nil {
      logPrint(err)
      return false,nil
@@ -56,12 +57,14 @@
      return false,nil
   }
   var res Result
   var json = jsoniter.ConfigCompatibleWithStandardLibrary
   if err = json.Unmarshal(respBody, &res); err != nil {
      logPrint(err)
      return false,nil
   }
   if res.Success {
      dataBytes, _ := json.Marshal(res.Data)
      var json = jsoniter.ConfigCompatibleWithStandardLibrary
      if err = json.Unmarshal(dataBytes, &list);err !=nil {
         return false,nil
      }