Przeglądaj źródła

物业搜索修改

WH01243 1 rok temu
rodzic
commit
c875d08b3e

+ 21 - 5
src/jfw/front/searchOptimize.go

@@ -153,6 +153,7 @@ func NewSearchOptimize(userId, phone, province, city, district, subtype, topType
 		Period:           period,
 		Changehand:       changehand,
 		Scale:            scale,
+		Isfile:           isfile,
 	}
 	so.SearchParamsHandle()
 	return so
@@ -457,9 +458,9 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
 		} else {
 			wordsMusts = append(wordsMusts, keyWordsMusts...)
 		}
-	}
-	//附加词
-	if so.AdditionalWords != "" {
+		//附加词
+		if so.AdditionalWords != "" {
+		}
 		//多组附加词,每组间,号隔开。每组内如果关键词中间有空格,自动分词
 		var (
 			addWordsMusts []string
@@ -553,10 +554,20 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
 	}
 	//换手率
 	if so.Changehand != 0 && isLogin {
-		musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.changehand", `"`+gconv.String(so.Changehand)+`"`))
+		/*musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.changehand", `"`+gconv.String(so.Changehand)+`"`))
+		  if so.Changehand > 0 {
+		      //存在
+		      musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.isfile", `"63"`))
+		  } */
 	}
 	if so.Isfile != 0 && isLogin {
-		musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.isfile", `"`+gconv.String(so.Isfile)+`"`))
+		if so.Isfile > 0 {
+			//存在
+			musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_set.wuye.isfile", `"63"`))
+		} else {
+			//不存在
+			mustNot = append(mustNot, fmt.Sprintf(queryExists, "tag_set.wuye.isfile"))
+		}
 	}
 	//价格
 	if so.Price != "" && len(strings.Split(so.Price, "-")) > 1 && isLogin {
@@ -1028,6 +1039,7 @@ func SearchListFormat(industry string, repl []map[string]interface{}, b bool, bi
 
 		}
 		if bidField == "BIProperty" {
+			v["fileExists"] = false
 			//物业数据处理
 			subinformationArr := gconv.SliceStr(v["tag_subinformation"])
 			if len(subinformationArr) > 0 {
@@ -1042,9 +1054,13 @@ func SearchListFormat(industry string, repl []map[string]interface{}, b bool, bi
 				wuye := gconv.Map(tag["wuye"])
 				if tag != nil {
 					isFile := gconv.Int64(wuye["isfile"])
+					propertyForm := gconv.Int64(wuye["property_form"])
 					if isFile == 63 {
 						v["fileExists"] = true
 					}
+					if propertyForm != 0 {
+						v["property_form"] = propertyForm
+					}
 				}
 			}
 			delete(v, "tag_set")

+ 3 - 1
src/jfw/front/supsearch.go

@@ -410,6 +410,8 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 		if territorialization == "" {
 			territorialization = "0101"
 		}
+	case "BIProperty":
+		territorialization = territorialization
 	default:
 		territorialization = ""
 	}
@@ -517,7 +519,7 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 		searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
 		so := NewSearchOptimize(userId, phone, area, city, district, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, "", "", "",
 			0, pageSize, searchGroup, searchMode, wordsMode, 0, 0, 0, 0,
-			*userInfo, searchTypeSwitch, p.Request)
+			*userInfo, searchTypeSwitch, p.Request, accountId, entAccountId, entId, entUserId)
 		heightKeys = so.HeightKeys //主关键词和附加词合并,多组空格隔开,作为前端渲染高亮关键词使用
 		//关键词  行业 附加词
 		//放开用户不输入关键词可搜索 --P297需求

+ 1 - 1
src/jfw/front/swordfish.go

@@ -41,7 +41,7 @@ var (
 	BidSearchFieldOfVip    = BidSearchFieldBase + `,"buyertel","buyerperson","agency","agencytel","agencyperson","s_winner","winnertel","winnerperson","signendtime","bidendtime","projectinfo","entidlist","district","sinendtime","buyeraddr"`    //付费列表字段
 	BidSearchFieldFile     = `,"isValidFile"`
 	BidSearchDomainField   = BidSearchFieldOfVip + `,"purchasing"` //领域数据字段基本字段
-	BidSearchFieldProperty = BidSearchFieldBase + `,"tag_topinformation","tag_subinformation","tag_set.wuye.isfile"`
+	BidSearchFieldProperty = BidSearchFieldBase + `,"tag_topinformation","tag_subinformation","tag_set.wuye.property_form","tag_set.wuye.isfile"`
 )
 
 // Praise 剑鱼标讯推送三级页点赞暂弃 改成剑鱼标讯实验室点赞功能