From 402c5bd93be92be97677b0d8db92589a5b3e13f2 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 19 六月 2019 17:34:32 +0800
Subject: [PATCH] fix bug
---
dicApi.go | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/dicApi.go b/dicApi.go
index ddff79b..0bdd17d 100644
--- a/dicApi.go
+++ b/dicApi.go
@@ -1 +1,27 @@
package dbapi
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+type DicApi struct {
+
+}
+
+func (api DicApi) FindByType(dicType string) (bool,interface{}) {
+ url := BASIC_URL + DATA_URL_PREFIX + "/dictionary/findByType"
+ client := NewClient()
+ paramMap := make(map[string]string)
+ paramMap["type"] = dicType
+ respBody, err := client.DoGetRequest(url, paramMap, nil)
+ if err !=nil {
+ return false,nil
+ }
+ var res Result
+ if err = json.Unmarshal(respBody, &res); err != nil {
+ fmt.Println(err)
+ return false,nil
+ }
+ return res.Success,res.Data
+}
--
Gitblit v1.8.0