WH01243 1 год назад
Родитель
Сommit
5ea9bd76dc
2 измененных файлов с 4 добавлено и 4 удалено
  1. 1 4
      src/jfw/front/searchOptimize.go
  2. 3 0
      src/jfw/front/swordfish.go

+ 1 - 4
src/jfw/front/searchOptimize.go

@@ -552,7 +552,6 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
 			arr = append(arr, fmt.Sprintf(`"%s"`, v))
 		}
 		musts = append(musts, fmt.Sprintf(queryBoolShould, fmt.Sprintf(`{"terms":{"tag_subinformation":[%s]}}`, strings.Join(arr, ","))))
-		//musts = append(musts, fmt.Sprintf(queryBoolShould, "tag_subinformation", `"`+strings.ReplaceAll(so.Subinformation, ", ", `", "`)+`"`))
 	}
 	//价格区间
 	if so.Scale != "" && isLogin {
@@ -561,7 +560,6 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
 			arr = append(arr, fmt.Sprintf(`"%s"`, v))
 		}
 		musts = append(musts, fmt.Sprintf(queryBoolShould, fmt.Sprintf(`{"terms":{"tag_set.wuye.scale":[%s]}}`, strings.Join(arr, ","))))
-		//musts = append(musts, fmt.Sprintf(queryBoolShould, "tag_set.wuye.scale", `"`+gconv.String(so.Scale)+`"`))
 	}
 	//合同周期
 	if so.Period != "" && isLogin {
@@ -570,13 +568,12 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
 			arr = append(arr, fmt.Sprintf(`"%s"`, v))
 		}
 		musts = append(musts, fmt.Sprintf(queryBoolShould, fmt.Sprintf(`{"terms":{"tag_set.wuye.period":[%s]}}`, strings.Join(arr, ","))))
-		//musts = append(musts, fmt.Sprintf(queryBoolShould, "tag_set.wuye.period", `"`+gconv.String(so.Period)+`"`))
 	}
 	//换手率
 	if so.Changehand != 0 && isLogin {
 		if so.Changehand > 0 {
 			//存在
-			musts = append(musts, `{"range":{"tag_set.wuye.changehand":{"gte":0}}}`)
+			musts = append(musts, `{"range":{"tag_set.wuye.changehand":{"gt":0.3}}}`)
 		}
 	}
 	if so.Isfile != 0 && isLogin {

+ 3 - 0
src/jfw/front/swordfish.go

@@ -135,6 +135,7 @@ func (m *Front) PcAjaxReq() {
 	isfile, _ := m.GetInteger("isfile")
 	//换手率 changehand
 	changehand, _ := m.GetInteger("changehand")
+	log.Println("1111", userId, searchGroup, subtype)
 	if userId == "" {
 		//未登录用户访问全部信息类型 需要过滤掉 拟建和采购意向
 		// p397 未登录用户收回查看拟建权限
@@ -152,6 +153,7 @@ func (m *Front) PcAjaxReq() {
 				subtype = "招标预告,招标公告,招标结果,招标信用信息"
 			}
 		}
+		log.Println("2222", userId, searchGroup, subtype)
 		//未登录用户搜索范围 标题和 正文
 		var selectTypeArr []string
 		selectTypeSplit := strings.Split(selectType, ",")
@@ -168,6 +170,7 @@ func (m *Front) PcAjaxReq() {
 			publishtime = ""
 		}
 	}
+	log.Println("2222", userId, searchGroup, subtype)
 	industry := strings.TrimSpace(m.GetString("industry"))
 	minprice := m.GetString("minprice")               //最低价格
 	maxprice := m.GetString("maxprice")               //最高价格