Răsfoiți Sursa

fix:最新标讯 付费用户逻辑调整

wangshan 3 ani în urmă
părinte
comite
49c3a0d882
1 a modificat fișierele cu 6 adăugiri și 11 ștergeri
  1. 6 11
      jyBXBase/rpc/internal/logic/newestbiddinglogic.go

+ 6 - 11
jyBXBase/rpc/internal/logic/newestbiddinglogic.go

@@ -64,6 +64,8 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				return res
 			}
 			var isPayUser bool = false
+			//vip用户
+			vipStatus := MC.IntAll((*userMap)["i_vip_status"])
 			//大会员用户
 			bigStatus := MC.Int64All((*userMap)["i_member_status"])
 			if bigStatus > 0 {
@@ -77,26 +79,20 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 					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 != "" {
+			} else if phone := MC.If((*userMap)["s_phone"] != nil, MC.ObjToString((*userMap)["s_phone"]), MC.ObjToString((*userMap)["s_m_phone"])).(string); phone != "" && in.EntUserId != "" {
+				//商机管理
 				if count := IC.MainMysql.CountBySql(`SELECT count(1) FROM entniche_user u LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone=? and u.power=1 and i.status=1`, phone); count > 0 {
-					//大会员推送历史
+					//商机管理推送历史
 					isPayUser = true
 					result := model.GetNewestInfo(in.EntUserId, "e").GetPushHistory()
 					res.Data.Count = int64(len(result))
 					if res.Data.Count > 0 {
 						res.Data.List = result
 						res.Data.SubFlag = "e"
-						return res
 					}
 				}
-			}
-			//vip用户
-			vipStatus := MC.IntAll((*userMap)["i_vip_status"])
-			if vipStatus > 0 {
+			} else if vipStatus > 0 {
 				isPayUser = true
 				o_msgset := MC.ObjToMap((*userMap)["o_vipjy"])
 				vip_items, ok := (*o_msgset)["a_items"].([]interface{})
@@ -107,7 +103,6 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				res.Data.Count = int64(len(result))
 				res.Data.List = result
 				res.Data.SubFlag = "v"
-				return res
 			}
 			//付费用户如果没有数据 直接返回 需求来源:测试
 			if isPayUser {