|
@@ -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
|
|
|
}
|