ソースを参照

feat:移动端缓存

wangshan 2 年 前
コミット
bb4f27a2b7

+ 2 - 3
jyBXCore/rpc/entity/search.go

@@ -15,8 +15,8 @@ import (
 )
 
 var (
-	SearchCacheKey   = "searchDataCache_%d_%s"
-	SearchCacheCount = "searchCountCache_%d_%s"
+	SearchCacheKey   = "searchDataCache_%d_%s_%s"
+	SearchCacheCount = "searchCountCache_%d_%s_%s"
 )
 
 type KeyWordsSearch struct{}
@@ -42,7 +42,6 @@ func (kws *KeyWordsSearch) GetBidSearchListByCache(in *bxcore.SearchReq) (list [
 	l, c := func(in *bxcore.SearchReq) (list []*bxcore.SearchList, count int64) {
 		//缓存数据: SearchGroup-全部;招标信息;超前项目信息;kws.PageNum-当前页 免费用户 or 付费用户
 		redisDataKey := fmt.Sprintf(SearchCacheKey, in.SearchGroup, MC.If(in.IsPay, "v", "f").(string), MC.If(in.BidField != "", in.BidField, "n").(string))
-		logx.Info("redisDataKey:", redisDataKey)
 		//缓存数据总量 - 当前平台
 		redisCountKey := fmt.Sprintf(SearchCacheCount, in.SearchGroup, MC.If(in.IsPay, "v", "f").(string), MC.If(in.BidField != "", in.BidField, "n").(string))
 		sCache, err := redis.GetNewBytes(util.RedisNameNew, redisDataKey)

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

@@ -45,6 +45,7 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 		InterceptLimit: int64(MC.IntAllDef(IC.C.KeywordsLimit, 35)),
 		Total:          MC.Int64All(IC.C.DefaultBidInfo.Total),
 	}
+	logx.Info(in.SearchGroup, "-----------------:", IC.C.DefaultBidInfo.Total)
 	//初始化搜索对象
 	ks := entity.NewKeyWordsSearch()
 	//处理搜索条件