Forráskód Böngészése

fix:查询范围修改

wangkaiyue 2 éve
szülő
commit
64fd1a18b7
1 módosított fájl, 4 hozzáadás és 2 törlés
  1. 4 2
      src/jfw/front/tags.go

+ 4 - 2
src/jfw/front/tags.go

@@ -635,6 +635,8 @@ func LimitedConcurrency() int {
 	return ExecutionState
 }
 
+// GetBidding
+// 金额限制在"1000"~"100000000";需求因es压力过大,只返回60%的数据
 func (this *Tags) GetBidding(industry, area, city, stype, keyword string, request *http.Request, responseWriter http.ResponseWriter, session *httpsession.Session) ([]map[string]interface{}, int64, bool) {
 	rediskey := fmt.Sprintf("pcseo_getbidding_%s_%s_%s_%s_%s", industry, area, city, stype, keyword)
 	rediskeyCount := fmt.Sprintf("pcseo_getbidding_count_%s_%s_%s_%s_%s", industry, area, city, stype, keyword)
@@ -683,7 +685,7 @@ func (this *Tags) GetBidding(industry, area, city, stype, keyword string, reques
 			currentPage := 5
 			limitCount := qu.IntAllDef(config.Seoconfig["tagsLimitCount"], 50)
 			if keyword == "" {
-				query := bidsearch.GetSearchQuery("", industry, "1000", "50000", "", "", "", "", bidsearch.GetBidSearchQuery(area, city, fmt.Sprintf("%s_%s", starttime, endtime), stype, "", ""), "", false, seoBidField)
+				query := bidsearch.GetSearchQuery("", industry, "0.1", "1000", "", "", "", "", bidsearch.GetBidSearchQuery(area, city, fmt.Sprintf("%s_%s", starttime, endtime), stype, "", ""), "", false, seoBidField)
 				count = elastic.Count(INDEX, TYPE, query)
 				if count == 0 {
 					return nil, 0, false
@@ -695,7 +697,7 @@ func (this *Tags) GetBidding(industry, area, city, stype, keyword string, reques
 				}
 				datas = elastic.GetPage(INDEX, TYPE, query, bidSearch_sort, seoBidField, startPage, limitCount)
 			} else {
-				count, _, datas = bidsearch.GetPcBidSearchData(keyword, area, city, fmt.Sprintf("%s_%s", starttime, endtime), stype, industry, "1000", "50000", "", "", "", "", "", 0, true, []string{"title", "detail", "purchasing"}, seoBidField, "", false, false, "", limitCount, "")
+				count, _, datas = bidsearch.GetPcBidSearchData(keyword, area, city, fmt.Sprintf("%s_%s", starttime, endtime), stype, industry, "0.1", "1000", "", "", "", "", "", 0, true, []string{"title", "detail", "purchasing"}, seoBidField, "", false, false, "", limitCount, "")
 				if datas != nil && len(*datas) > limitCount {
 					*datas = (*datas)[0:limitCount]
 				}