瀏覽代碼

xg返回值

Jianghan 10 月之前
父節點
當前提交
3c3781f69f
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      api/internal/service/prListService.go

+ 2 - 2
api/internal/service/prListService.go

@@ -42,14 +42,14 @@ func GetMonitorList(req *types.PrMonitorListReq) (resultList []map[string]interf
 			esQuery1 = fmt.Sprintf(esQ2, strings.ReplaceAll(strings.Join(bName, ","), ",", `","`), strings.ReplaceAll(strings.Join(fields, ","), ",", `","`), pageStart, req.PageSize)
 		}
 		total, result := elastic.GetWithCount("bidding", "bidding", "", esQuery1)
-		if total == 0 {
+		if result != nil && len(*result) > 0 {
 			return nil, 0
 		}
 		for _, m := range *result {
 			resultList = append(resultList, GetInfoData(m))
 
 		}
-		return
+		return resultList, total
 	} else {
 		return nil, 0
 	}