Browse Source

feat:合并

wangshan 1 năm trước cách đây
mục cha
commit
e857a62028
1 tập tin đã thay đổi với 9 bổ sung17 xóa
  1. 9 17
      jyBXCore/rpc/entity/search.go

+ 9 - 17
jyBXCore/rpc/entity/search.go

@@ -4,7 +4,6 @@ import (
 	MC "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/redis"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-	"bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/powercheck"
 	"encoding/json"
 	"fmt"
 	IC "jyBXCore/rpc/init"
@@ -159,26 +158,19 @@ func (kws *KeyWordsSearch) GetSearchKeyWordsQueryStr(in *bxcore.SearchReq) (sear
 
 // SearchParamsHandle 搜索条件 处理
 func (kws *KeyWordsSearch) SearchParamsHandle(in *bxcore.SearchReq) []string {
+	baseUserId, _ := strconv.ParseInt(in.NewUserId, 10, 64)
+	accountId, _ := strconv.ParseInt(in.AccountId, 10, 64)
+	positionType, _ := strconv.ParseInt(in.PositionType, 10, 64)
+	positionId, _ := strconv.ParseInt(in.PositionId, 10, 64)
 	//判断用户身份
-	var (
-		userInfo     powercheck.CheckResp
-		registerDate int64 = 0
-	)
-	if in.UserId != "" {
-		baseUserId, _ := strconv.ParseInt(in.NewUserId, 10, 64)
-		accountId, _ := strconv.ParseInt(in.AccountId, 10, 64)
-		positionType, _ := strconv.ParseInt(in.PositionType, 10, 64)
-		positionId, _ := strconv.ParseInt(in.PositionId, 10, 64)
-		userInfo = *IC.Middleground.PowerCheckCenter.Check(in.AppId, in.MgoUserId, baseUserId, accountId, in.EntId, positionType, positionId)
-		//是否是付费用户
-		in.IsPay = !userInfo.Free.IsFree
-		registerDate = userInfo.Free.Registedate
-	}
+	userInfo := IC.Middleground.PowerCheckCenter.Check(in.AppId, in.MgoUserId, baseUserId, accountId, in.EntId, positionType, positionId)
+	//是否是付费用户
+	in.IsPay = !userInfo.Free.IsFree
 	//默认搜索范围
 	if in.SelectType == "" {
 		in.SelectType = "title,content"
 	}
-	queryItems := util.GetQueryItems(in.SelectType, IC.C.BidSearchOldUserLimit, registerDate, in.IsPay)
+	queryItems := util.GetQueryItems(in.SelectType, IC.C.BidSearchOldUserLimit, userInfo.Free.Registedate, in.IsPay)
 	in.SelectType = strings.Join(queryItems, ",")
 	// in.SearchGroup 搜索分组 搜索分组:默认0:全部;1:招标采购公告;2:超前项目
 	//	详情页判断是否能使用超前项目  老版超级订阅、大会员、商机管理有权限
@@ -228,7 +220,7 @@ func (kws *KeyWordsSearch) SearchParamsHandle(in *bxcore.SearchReq) []string {
 		in.Industry = strings.TrimSpace(in.Industry)
 	}
 	//免费用户:高级筛选 采购单位类型、采购单位联系方式、中标企业联系方式、排除词、城市
-	if !in.IsPay {
+	if userInfo.Free.IsFree {
 		in.BuyerClass = ""
 		in.BuyerTel = ""
 		in.WinnerTel = ""