liuxiaolong
2019-07-04 6d903ff16054f6fb1c03a7341b9ad7337fc2e17a
controllers/dbtableperson.go
@@ -209,7 +209,7 @@
   if tableId == "all" || tableId == "" {
      // / 所有人员
   } else {
      syncTerm = ",{\"term\":{\"tableId\":\"" + tableId + "\"}}" // 底库人员
      syncTerm = "{\"term\":{\"tableId\":\"" + tableId + "\"}}" // 底库人员
   }
   if contentValue != "" {
      contentParam = ",\"must\":[{\"multi_match\":{\"query\":\"" + contentValue + "\",\"type\":\"best_fields\"," +
@@ -280,7 +280,7 @@
   if tableId == "all" || tableId == "" {
      // / 所有人员
   } else {
      syncTerm = ",{\"term\":{\"tableId\":\"" + tableId + "\"}}" // 底库人员
      syncTerm = "{\"term\":{\"tableId\":\"" + tableId + "\"}}" // 底库人员
   }
   if orderType == "desc" {
      orderType = "desc"
@@ -288,8 +288,10 @@
      orderType = "asc"
   }
   params := "{\"query\":{\"bool\":{\"filter\":[" +
      "{\"term\":{\"isDelete\":\"0\"}}" + syncTerm + "]" + contentParam + "}},\"from\":" + strconv.Itoa(from) + ",\"size\":" + strconv.Itoa(size) + ",\"sort\":{\"" + orderName + "\":{\"order\":\"" + orderType + "\"}}}"
   //params := "{\"query\":{\"bool\":{\"filter\":[" +
   //   "{\"term\":{\"isDelete\":\"0\"}}" + syncTerm + "]" + contentParam + "}},\"from\":" + strconv.Itoa(from) + ",\"size\":" + strconv.Itoa(size) + ",\"sort\":{\"" + orderName + "\":{\"order\":\"" + orderType + "\"}}}"
   params := "{\"query\":{\"bool\":{\"must_not\":[" +
      "{\"term\":{\"isDelete\":\"1\"}}],\"filter\":[" + syncTerm + "]" + contentParam + "}},\"from\":" + strconv.Itoa(from) + ",\"size\":" + strconv.Itoa(size) + ",\"sort\":{\"" + orderName + "\":{\"order\":\"" + orderType + "\"}}}"
   fmt.Print("请求url:%s;\n 请求参数params:%s", url, params)
   data := esutil.GetEsDataReq(url, params, true)
   featByte := make([]byte, 0, 1024)