|
@@ -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) {
|
|
func (kws *KeyWordsSearch) GetBidSearchListByCache(in *bxcore.SearchReq) (list []*bxcore.SearchList, count, total int64) {
|
|
//缓存数据 最大量是5000条 100页数据
|
|
//缓存数据 最大量是5000条 100页数据
|
|
l, c := func(in *bxcore.SearchReq) (list []*bxcore.SearchList, count int64) {
|
|
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))
|
|
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))
|
|
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 err == nil {
|
|
if sCache != nil && len(*sCache) > 0 {
|
|
if sCache != nil && len(*sCache) > 0 {
|
|
err = json.Unmarshal(*sCache, &list)
|
|
err = json.Unmarshal(*sCache, &list)
|