ソースを参照

feat:未登录用户搜索词长度限制

duxin 2 年 前
コミット
dd18e02ba1
1 ファイル変更5 行追加1 行削除
  1. 5 1
      jyBXCore/rpc/internal/logic/getsearchlistlogic.go

+ 5 - 1
jyBXCore/rpc/internal/logic/getsearchlistlogic.go

@@ -78,7 +78,11 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 	res.IsLimit = 1
 	//以后可能会出现 关键词 C++ 等带+的关键词
 	if in.KeyWords != "" {
-		res.InterceptKeywords, res.InterceptWord, in.KeyWords = util.InterceptSearchKW(in.KeyWords, MC.IntAllDef(IC.C.KeywordsLimit, 35), len(in.Industry) == 0)
+		kwLimit := MC.IntAllDef(IC.C.KeywordsLimit, 35)
+		if in.UserId == "" {
+			kwLimit = 25
+		}
+		res.InterceptKeywords, res.InterceptWord, in.KeyWords = util.InterceptSearchKW(in.KeyWords, kwLimit, len(in.Industry) == 0)
 	}
 	if in.UserId == "" {
 		//未登录用户访信息类型 需要过滤掉 拟建和采购意向问全部