瀏覽代碼

feat:地区搜索异常处理

wangshan 3 年之前
父節點
當前提交
cb95e22bf9
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 3 1
      jyBXCore/rpc/util/search.go
  2. 2 0
      jyBXCore/rpc/util/userInfo.go

+ 3 - 1
jyBXCore/rpc/util/search.go

@@ -232,7 +232,9 @@ func GetBidSearchQuery(in *bxcore.SearchReq) string {
 		}
 		query += `]}}`
 	}
-	query = fmt.Sprintf(query_bool_should, query)
+	if query != "" {
+		query = fmt.Sprintf(query_bool_should, query)
+	}
 	//发布时间
 	publishtime := in.PublishTime
 	if publishtime != "" && len(strings.Split(publishtime, "-")) > 1 {

+ 2 - 0
jyBXCore/rpc/util/userInfo.go

@@ -75,6 +75,8 @@ func (vs *VipState) GetQueryItems(selectType string, limitOldTime int64) (items
 				items = append(items, "title")
 			} else if t == "ppa" {
 				items = append(items, []string{"purchasing", "projectname.pname"}...)
+			} else if t == "file" { //dev4.7.8 标讯优化:搜索范围附件-》全部用户可用
+				items = append(items, "filetext")
 			}
 		}
 		return