wangshan 3 жил өмнө
parent
commit
89799c03ae

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

@@ -63,9 +63,11 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				res.ErrMsg = fmt.Errorf("未查询到用户信息").Error()
 				return res
 			}
+			var isPayUser bool = false
 			//大会员用户
 			bigStatus := MC.Int64All((*userMap)["i_member_status"])
 			if bigStatus > 0 {
+				isPayUser = true
 				o_msgset := MC.ObjToMap((*userMap)["o_member_jy"])
 				big_items, ok := (*o_msgset)["a_items"].([]interface{})
 				//大会员推送历史
@@ -82,6 +84,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 			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 {
@@ -94,6 +97,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 			//vip用户
 			vipStatus := MC.IntAll((*userMap)["i_vip_status"])
 			if vipStatus > 0 {
+				isPayUser = true
 				o_msgset := MC.ObjToMap((*userMap)["o_vipjy"])
 				vip_items, ok := (*o_msgset)["a_items"].([]interface{})
 				//vip查询推送历史
@@ -105,6 +109,10 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				res.Data.SubFlag = "v"
 				return res
 			}
+			//付费用户如果没有数据 直接返回 需求来源:测试
+			if isPayUser {
+				return res
+			}
 			//普通用户用户- 有关键词
 			o_msgset := MC.ObjToMap((*userMap)["o_jy"])
 			items, ok := (*o_msgset)["a_key"].([]interface{})
@@ -133,7 +141,7 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 				return res
 			}
 		}
-		if in.IsSearch == 2 { //定位查询
+		if in.IsSearch == 2 { //定位查询(默认全国)
 			query := model.NewestQuery(rks, "")
 			result := model.NewestES(query)
 			res.Data.IsVip = false