Browse Source

feat:userid为空条件限制修改

duxin 2 years ago
parent
commit
b9617bdfb4

+ 0 - 28
jyBXBase/rpc/internal/logic/newestbiddinglogic.go

@@ -44,34 +44,6 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				List: []*bxbase.NewestList{},
 				List: []*bxbase.NewestList{},
 			},
 			},
 		}
 		}
-		if in.UserId == "" {
-			var result []*bxbase.NewestList
-			res.Data.IsVip = false
-			res.Data.HasSubKeys = false
-			notLoggedPush := fmt.Sprintf("p1_indexMessage_new_%d_%d_%d", time.Now().Year(), time.Now().Minute(), time.Now().Day())
-			redisByte, err := redis.GetBytes("other", notLoggedPush)
-			if err == nil && redisByte != nil && len(*redisByte) > 0 {
-				err = json.Unmarshal(*redisByte, &result)
-				if err == nil {
-					res.Data.Count = int64(len(result))
-					res.Data.List = result
-					return res
-				}
-				log.Println(fmt.Sprintf("未登录用户每日数据获取缓存 序列化异常,err:%s", err.Error()))
-			}
-			query := model.NewestQuery("", "")
-			result = model.NewestES(query)
-			b, err1 := json.Marshal(result)
-			if err1 == nil {
-				err = redis.PutBytes("other", notLoggedPush, &b, 60*60*24)
-				if err != nil {
-					log.Println(fmt.Sprintf("未登录用户每日数据存入缓存 序列化异常,err:%s", err.Error()))
-				}
-			}
-			res.Data.Count = int64(len(result))
-			res.Data.List = result
-			return res
-		}
 		//主体处理(fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户)
 		//主体处理(fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户)
 		infoCount := IC.MainMysql.CountBySql("select  count(id) from  entniche_wait_empower where  ent_id=? and  end_time>NOW() and (product_type like '%VIP订阅%' or product_type like '%大会员%') ", in.EntId)
 		infoCount := IC.MainMysql.CountBySql("select  count(id) from  entniche_wait_empower where  ent_id=? and  end_time>NOW() and (product_type like '%VIP订阅%' or product_type like '%大会员%') ", in.EntId)
 		if infoCount > 0 {
 		if infoCount > 0 {

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

@@ -206,6 +206,9 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 				}
 				}
 				count, list = util.SearchCahcheData(_in)
 				count, list = util.SearchCahcheData(_in)
 				limitCount := int64(util.SearchPageSize * util.SearchMaxPageNum)
 				limitCount := int64(util.SearchPageSize * util.SearchMaxPageNum)
+				if in.UserId == "" {
+					limitCount = util.SearchMaxPageCount_NOLOGIN
+				}
 				if count > limitCount {
 				if count > limitCount {
 					count = limitCount
 					count = limitCount
 				}
 				}