wangshan %!s(int64=2) %!d(string=hai) anos
pai
achega
02cbd898fe
Modificáronse 1 ficheiros con 9 adicións e 3 borrados
  1. 9 3
      jyBXBase/rpc/internal/logic/newestbiddinglogic.go

+ 9 - 3
jyBXBase/rpc/internal/logic/newestbiddinglogic.go

@@ -66,11 +66,13 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 		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())
+				logx.Info(fmt.Sprintf("读取缓存 序列化异常,err:%s", err.Error()))
+			}
+			if len(res.Data.List) > 0 {
+				return res, 1
 			}
-			return res, 1
 		}
+		logx.Info("------------------------00---------------")
 		var subtype string
 		//登录用户
 		if in.UserId != "" {
@@ -107,6 +109,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				}
 				return res, 0
 			}
+			logx.Info("------------------------11---------------")
 			if phone := MC.If((*userMap)["s_phone"] != nil, MC.ObjToString((*userMap)["s_phone"]), MC.ObjToString((*userMap)["s_m_phone"])).(string); phone != "" && in.EntUserId != "" && in.EntId != "" {
 				//商机管理
 				entNicheInfos := IC.MainMysql.SelectBySql(`SELECT i.power_source,u.power FROM entniche_user u LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone=? and  i.status=1 AND i.id = ?`, phone, in.EntId)
@@ -128,6 +131,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 					}
 				}
 			}
+			logx.Info("------------------------22---------------")
 			if vipStatus > 0 {
 				o_msgset := MC.ObjToMap((*userMap)["o_vipjy"])
 				vip_items, ok := (*o_msgset)["a_items"].([]interface{})
@@ -146,6 +150,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				return res, 0
 			}
 
+			logx.Info("------------------------33---------------")
 			//普通用户用户- 有关键词
 			o_msgset := MC.ObjToMap((*userMap)["o_jy"])
 			items, ok := (*o_msgset)["a_key"].([]interface{})
@@ -164,6 +169,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				res.Data.SubFlag = "f"
 				return res, 0
 			}
+			logx.Info("------------------------44---------------")
 			//搜索历史-关键词
 			hKeys := redis.GetStr("other", fmt.Sprintf("s_%s", in.UserId))
 			if hKeys != "" && len(strings.Split(hKeys, ",")) > 0 {