瀏覽代碼

Merge branch 'dev/v4.9.17_dx' of qmx/jy into feature/v4.9.17

duxin 1 年之前
父節點
當前提交
04a6e9bc30
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      src/jfw/front/searchOptimize.go

+ 7 - 3
src/jfw/front/searchOptimize.go

@@ -100,11 +100,11 @@ type SearchOptimize struct {
 	Buyer               string        `json:"buyer"`          //采购单位
 	Winner              string        `json:"winner"`         //中标企业
 	Agency              string        `json:"agency"`         //代理机构
-
+	MobileTag           string        `json:"mobileTag"`      //融创
 }
 
 // NewSearchOptimize  初始化
-func NewSearchOptimize(userId, phone, province, city, district, subtype, topType, publishTime, selectType, price, industry, buyerClass, buyerTel, winnerTel, fileExists, keyWords, additionalWords, exclusionWords, platform, territorialization, expireTime, propertyForm, subinformation string,
+func NewSearchOptimize(mobileTag, userId, phone, province, city, district, subtype, topType, publishTime, selectType, price, industry, buyerClass, buyerTel, winnerTel, fileExists, keyWords, additionalWords, exclusionWords, platform, territorialization, expireTime, propertyForm, subinformation string,
 	pageNum, pageSize, searchGroup, searchMode, wordsMode int, period, scale string, changehand, isfile int,
 	userInfo jy.VipState, searchTypeSwitch bool, r *http.Request, accountId, entAccountId, entId, entUserId int64, buyer, winner, agency string) *SearchOptimize {
 	IsPay := userInfo.IsPayedUser()
@@ -160,6 +160,7 @@ func NewSearchOptimize(userId, phone, province, city, district, subtype, topType
 		Buyer:            buyer,
 		Winner:           winner,
 		Agency:           agency,
+		MobileTag:        mobileTag,
 	}
 	so.SearchParamsHandle()
 	return so
@@ -554,6 +555,10 @@ func (so *SearchOptimize) GetSearchQuery(mustQuery string) (qstr string) {
 	if so.BidField == "BIProperty" {
 		musts = append(musts, fmt.Sprintf(queryBoolMustA, "tag_topinformation", `"情报_物业"`))
 	}
+	//移动融创
+	if so.MobileTag != "" && isLogin {
+		musts = append(musts, fmt.Sprintf(queryBoolMustA, "mobile_tag", `"`+strings.ReplaceAll(so.MobileTag, ",", `","`)+`"`))
+	}
 	//物业业态
 	if so.PropertyForm != "" && isLogin {
 		arr := []string{}
@@ -730,7 +735,6 @@ func (so *SearchOptimize) GetBidSearchQuery() string {
 			query_bool_must_and_district := `{"bool":{"must":[{"terms":{"city":["%s"]}},{"terms":{"district":["%s"]}}]}}`
 			query += fmt.Sprintf(query_bool_must_and_district, cityName, districtName)
 		}
-
 	}
 	if query != "" {
 		query = fmt.Sprintf(queryBoolShould, query)