浏览代码

feat:注释

wangshan 2 年之前
父节点
当前提交
ea963b6e69
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      jyBXCore/rpc/entity/search.go

+ 4 - 4
jyBXCore/rpc/entity/search.go

@@ -40,13 +40,13 @@ func (kws *KeyWordsSearch) IsEmptySearch(in *bxcore.SearchReq) bool {
 func (kws *KeyWordsSearch) GetBidSearchListByCache(in *bxcore.SearchReq) (list []*bxcore.SearchList, count, total int64) {
 	//缓存数据 最大量是5000条  100页数据
 	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)
 		count = int64(redis.GetInt(util.RedisNameNew, redisCountKey))
+		//缓存数据: 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))
+		sCache, err := redis.GetNewBytes(util.RedisNameNew, redisDataKey)
+		logx.Info("-------------------------redisDataKey--------------------------------:", redisDataKey)
 		if err == nil {
 			if sCache != nil && len(*sCache) > 0 {
 				err = json.Unmarshal(*sCache, &list)