From a2a93e906ffbef9289873cb69613b3c00b7853ea Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期四, 16 一月 2020 10:24:26 +0800
Subject: [PATCH] add UpdateIsRunningAll,use in pollcontrol
---
fileAnalysis.go | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/fileAnalysis.go b/fileAnalysis.go
index bd2a110..a11148e 100644
--- a/fileAnalysis.go
+++ b/fileAnalysis.go
@@ -25,11 +25,30 @@
return "http://"+api.Ip+":"+strconv.Itoa(api.Port)
}
-func (api FileAnalysisApi) FindAllFile(fileName string) (bool,interface{}){
+func (api FileAnalysisApi) Show(id string) (bool,interface{}) {
+ url := api.getBasicUrl() + DATA_URL_PREFIX + "/fileAnalysis/show/"+id
+ client := NewClient()
+ body, err := client.DoGetRequest(url, nil, nil)
+ if err != nil {
+ return false, nil
+ }
+
+ var res Result
+ if err = json.Unmarshal(body, &res); err != nil {
+ return false, nil
+ }
+
+ return res.Success, res.Data
+}
+
+func (api FileAnalysisApi) FindAllFile(fileName string,fType int, page int, size int) (bool,interface{}){
url := api.getBasicUrl() + DATA_URL_PREFIX + "/fileAnalysis/findAllFile"
client := NewClient()
paramQuery := map[string]string {
"fileName": fileName,
+ "type": strconv.Itoa(fType),
+ "page": strconv.Itoa(page),
+ "size": strconv.Itoa(size),
}
body, err := client.DoGetRequest(url, paramQuery, nil)
if err != nil {
--
Gitblit v1.8.0