wangshan 3 rokov pred
rodič
commit
405531d746

+ 12 - 8
jyBXBase/rpc/internal/logic/newestbiddinglogic.go

@@ -70,11 +70,13 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				big_items, ok := (*o_msgset)["a_items"].([]interface{})
 				//大会员推送历史
 				result := model.GetNewestInfo(rks, "m").GetPushHistory()
-				res.Data.HasSubKeys = ok && len(big_items) > 0
 				res.Data.Count = int64(len(result))
-				res.Data.List = result
-				res.Data.SubFlag = "m"
-				return res
+				if res.Data.Count > 0 {
+					res.Data.HasSubKeys = ok && len(big_items) > 0
+					res.Data.List = result
+					res.Data.SubFlag = "m"
+					return res
+				}
 			}
 			//商机管理
 			if phone := MC.If((*userMap)["s_phone"] != nil, MC.ObjToString((*userMap)["s_phone"]), MC.ObjToString((*userMap)["s_m_phone"])).(string); phone != "" && in.EntUserId != "" {
@@ -82,9 +84,11 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 					//大会员推送历史
 					result := model.GetNewestInfo(in.EntUserId, "e").GetPushHistory()
 					res.Data.Count = int64(len(result))
-					res.Data.List = result
-					res.Data.SubFlag = "e"
-					return res
+					if res.Data.Count > 0 {
+						res.Data.List = result
+						res.Data.SubFlag = "e"
+						return res
+					}
 				}
 			}
 			//vip用户
@@ -115,7 +119,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				return res
 			}
 			//搜索历史-关键词
-			hKeys := redis.GetStr("other", fmt.Sprintf("s_%", in.UserId, in.UserId))
+			hKeys := redis.GetStr("other", fmt.Sprintf("s_%s", in.UserId))
 			if hKeys != "" && len(strings.Split(hKeys, ",")) > 0 {
 				//历史搜索
 				res.Data.History = strings.Split(hKeys, ",")