|
@@ -326,21 +326,26 @@ func SearchMaxReportIdWithRange(key string, reportIds []int) (total int64) {
|
|
|
}
|
|
|
count := re.Count
|
|
|
total = int64(count)
|
|
|
- if total > 0 {
|
|
|
- request = match(key, 0, count, sort)
|
|
|
- re, err = elastic().Search(request)
|
|
|
- if err != nil {
|
|
|
- logger.Error("es搜索异常:%v", err)
|
|
|
- }
|
|
|
- hits := elastic().GetSource(re.Hits)
|
|
|
- data := hits[0].Source
|
|
|
- report := ReportDTO{}
|
|
|
- err = json.Unmarshal(data, &report)
|
|
|
- if err != nil {
|
|
|
- logger.Error("获取当前最大研报id失败:%v", err)
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
+ //if total > 0 {
|
|
|
+ // if count < 10000 {
|
|
|
+ // request = match(key, 0, count, sort)
|
|
|
+ // } else {
|
|
|
+ //
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // re, err = elastic().Search(request)
|
|
|
+ // if err != nil {
|
|
|
+ // logger.Error("es搜索异常:%v", err)
|
|
|
+ // }
|
|
|
+ // hits := elastic().GetSource(re.Hits)
|
|
|
+ // data := hits[0].Source
|
|
|
+ // report := ReportDTO{}
|
|
|
+ // err = json.Unmarshal(data, &report)
|
|
|
+ // if err != nil {
|
|
|
+ // logger.Error("获取当前最大研报id失败:%v", err)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ //}
|
|
|
return
|
|
|
}
|
|
|
|