| | |
| | | if reqBody.DataBases != nil { |
| | | tableIds = reqBody.DataBases |
| | | } |
| | | startDate := "";endDate := "" |
| | | startDate := "" |
| | | endDate := "" |
| | | if reqBody.SearchTime != nil && len(reqBody.SearchTime) >= 2 { |
| | | dates := reqBody.SearchTime |
| | | startDate = dates[0];endDate = dates[1] // 起始结束时间 |
| | | startDate = dates[0] |
| | | endDate = dates[1] // 起始结束时间 |
| | | } |
| | | contentValue := reqBody.InputValue //输入框内容 |
| | | /*page := 1 ;if reqBody["page"] != nil { page = int(reqBody["page"].(float64)) } // 页码 |
| | |
| | | syncTerm += ",{\"terms\":{\"tableId\":" + string(bytes) + "}}" // 底库人员 |
| | | } |
| | | if startDate != "" && endDate != "" { |
| | | syncTerm += ",{\"range\":{\"create_time\":{\"from\":\"" + startDate + "\"," + |
| | | syncTerm += ",{\"range\":{\"createTime\":{\"from\":\"" + startDate + "\"," + |
| | | "\"to\":\"" + endDate + "\",\"include_lower\":true,\"include_upper\":true,\"boost\":1}}}" // 底库人员 |
| | | } |
| | | if contentValue != "" { |
| | |
| | | "\"fields\":[\"personName\",\"sex\",\"idcard\",\"phoneNum\",\"reserved\"],\"boost\":1}}]" |
| | | } |
| | | params := "{\"query\":{\"bool\":{\"filter\":[" + |
| | | "{\"term\":{\"del_flag\":\"0\"}}" + syncTerm + "]" + contentParam + "}},\"from\":0,\"size\":10000,\"sort\":{\"uuid\":{\"order\":\"desc\"}}}" |
| | | "{\"term\":{\"isDelete\":\"0\"}}" + syncTerm + "]" + contentParam + "}},\"from\":0,\"size\":10000,\"sort\":{\"uuid\":{\"order\":\"desc\"}}}" |
| | | fmt.Print("查询全部底库人员 请求url:%s;\n 请求参数params:%s", url, params) |
| | | data := esutil.GetEsDataReq(url, params, true) |
| | | return data |
| | | } |
| | | |
| | | |