|
@@ -202,8 +202,10 @@ func (query *SeoBiddingQuery) GetOnceData(ctx context.Context, total int, flag s
|
|
if data != nil && len(data) > 0 {
|
|
if data != nil && len(data) > 0 {
|
|
res = query.dataFormat(data)
|
|
res = query.dataFormat(data)
|
|
}
|
|
}
|
|
- if err := g.Redis().SetEX(ctx, cacheKey, res, consts.SettingBidCacheTime); err != nil {
|
|
|
|
- g.Log().Errorf(ctx, "GetOnceData 存储redis err:%v", err)
|
|
|
|
|
|
+ if res != nil && len(res) > 0 {
|
|
|
|
+ if err := g.Redis().SetEX(ctx, cacheKey, res, consts.SettingBidCacheTime); err != nil {
|
|
|
|
+ g.Log().Errorf(ctx, "GetOnceData 存储redis err:%v", err)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
err = vars.Struct(&res)
|
|
err = vars.Struct(&res)
|