sqlite的api,便于内部使用
looper3339
2020-02-21 ba664c06923ecca2b39691cb1f4644e434886e95
fileAnalysis.go
@@ -25,6 +25,22 @@
   return "http://"+api.Ip+":"+strconv.Itoa(api.Port)
}
func (api FileAnalysisApi) Save(paramBody map[string]interface{}) bool {
   url := api.getBasicUrl() + DATA_URL_PREFIX + "/fileAnalysis/save"
   client := NewClient()
   body,err := client.DoPostRequest(url,CONTENT_TYPE_JSON, paramBody,nil,nil)
   if err != nil {
      return false
   }
   var res Result
   if err = json.Unmarshal(body, &res); err != nil {
      return false
   }
   return res.Success
}
func (api FileAnalysisApi) Show(id string) (bool,interface{}) {
   url := api.getBasicUrl() + DATA_URL_PREFIX + "/fileAnalysis/show/"+id
   client := NewClient()
@@ -41,11 +57,12 @@
   return res.Success, res.Data
}
func (api FileAnalysisApi) FindAllFile(fileName string, page int, size int) (bool,interface{}){
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),
   }