浏览代码

feat:未登录用户逻辑判断添加

duxin 2 年之前
父节点
当前提交
973902f729
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      jyBXCore/rpc/internal/logic/getsearchlistlogic.go

+ 10 - 0
jyBXCore/rpc/internal/logic/getsearchlistlogic.go

@@ -80,10 +80,20 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 	if in.KeyWords != "" {
 		res.InterceptKeywords, res.InterceptWord, in.KeyWords = util.InterceptSearchKW(in.KeyWords, MC.IntAllDef(IC.C.KeywordsLimit, 35), len(in.Industry) == 0)
 	}
+	if in.UserId == "" {
+		//未登录用户访信息类型 需要过滤掉 拟建和采购意向问全部
+		if in.Subtype == "" {
+			in.Subtype = "招标预告,招标公告,招标结果,招标信用信息"
+		}
+	}
 	//查询数据
 	if in.KeyWords != "" || in.Industry != "" {
 		//查询数据
 		searchLimit := util.IsSearchLimit(strings.Split(in.SelectType, ","))
+		//未登录用户标题、正文都限制,已登录用户只限制正文
+		if in.UserId == "" {
+			searchLimit = true
+		}
 		//全文检索限制
 		if searchLimit {
 			res.IsLimit = util.IsLimited(in.LimitFlag, in.UserId, in.UserType != "fType", in.IsNew)