Jianghan 9 tháng trước cách đây
mục cha
commit
58ee93f8b3
5 tập tin đã thay đổi với 10 bổ sung11 xóa
  1. 10 11
      api/internal/service/prListService.go
  2. 0 0
      api/logs/error.log
  3. 0 0
      api/logs/severe.log
  4. 0 0
      api/logs/slow.log
  5. 0 0
      api/logs/stat.log

+ 10 - 11
api/internal/service/prListService.go

@@ -39,18 +39,17 @@ func GetMonitorList(req *types.PrMonitorListReq) (resultList []map[string]interf
 				should = append(should, fmt.Sprintf(shouldMul, v))
 			}
 			esQuery1 = fmt.Sprintf(esQ1, strings.ReplaceAll(strings.Join(bName, ","), ",", `","`), strings.Join(should, ","), strings.ReplaceAll(strings.Join(fields, ","), ",", `","`), pageStart, req.PageSize)
-		} else {
-			esQuery1 = fmt.Sprintf(esQ2, strings.ReplaceAll(strings.Join(bName, ","), ",", `","`), strings.ReplaceAll(strings.Join(fields, ","), ",", `","`), pageStart, req.PageSize)
-		}
-		logx.Info("esQuery1---", esQuery1)
-		total, result := elastic.GetWithCount("bidding", "bidding", "", esQuery1)
-		if total == 0 {
-			return nil, 0, hasMonitor
-		}
-		for _, m := range *result {
-			resultList = append(resultList, GetInfoData(m))
+			logx.Info("esQuery1---", esQuery1)
+			total, result := elastic.GetWithCount("bidding", "bidding", "", esQuery1)
+			if total == 0 {
+				return nil, 0, hasMonitor
+			}
+			for _, m := range *result {
+				resultList = append(resultList, GetInfoData(m))
+			}
+			return resultList, total, hasMonitor
 		}
-		return resultList, total, hasMonitor
+		return nil, 0, hasMonitor
 	} else {
 		return nil, 0, false
 	}

+ 0 - 0
api/logs/error.log


+ 0 - 0
api/logs/severe.log


+ 0 - 0
api/logs/slow.log


+ 0 - 0
api/logs/stat.log