|
@@ -42,20 +42,15 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
|
|
|
},
|
|
|
}
|
|
|
rks := MC.If(in.UserId != "", in.UserId, in.City).(string)
|
|
|
- log.Println(rks, "userid:", in.UserId)
|
|
|
redisByte, err := redis.GetBytes("other", "p1_indexMessage_new_"+rks)
|
|
|
- if err == nil {
|
|
|
- log.Println(len(*redisByte))
|
|
|
- if redisByte != nil && len(*redisByte) > 0 && err != nil {
|
|
|
- err := json.Unmarshal(*redisByte, res.Data)
|
|
|
- if err != nil {
|
|
|
- res.ErrCode = -1
|
|
|
- res.ErrMsg = fmt.Sprintf("读取缓存 序列化异常,err:%s", err.Error())
|
|
|
- }
|
|
|
- return res
|
|
|
+ if err == nil && redisByte != nil && len(*redisByte) > 0 {
|
|
|
+ err := json.Unmarshal(*redisByte, res.Data)
|
|
|
+ if err != nil {
|
|
|
+ res.ErrCode = -1
|
|
|
+ res.ErrMsg = fmt.Sprintf("读取缓存 序列化异常,err:%s", err.Error())
|
|
|
}
|
|
|
+ return res
|
|
|
}
|
|
|
- log.Println("-------------------0")
|
|
|
//登录用户
|
|
|
if in.UserId != "" {
|
|
|
//获取订阅信息
|
|
@@ -104,7 +99,6 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
|
|
|
return res
|
|
|
}
|
|
|
}
|
|
|
- log.Println("-------------------1")
|
|
|
if in.IsSearch == 2 { //定位查询
|
|
|
query := model.NewestQuery(rks, "")
|
|
|
result := model.NewestES(query)
|
|
@@ -114,7 +108,6 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
|
|
|
res.Data.List = result
|
|
|
return res
|
|
|
}
|
|
|
- log.Println("-------------------2")
|
|
|
return res
|
|
|
}(in)
|
|
|
if r.Data.Count > 0 {
|