wangshan 2 жил өмнө
parent
commit
f4216d3874

+ 2 - 2
jyBXBase/api/bxbase.api

@@ -99,9 +99,9 @@ type (
 		UserId       string `header:"userId,optional"`    //用户id
 		AppId        string `header:"appId"`              //appId
 		EntUserId    string `header:"entUserId,optional"` //商机管理用户 用户id:entUserId
-		NewUserId    int64  `header:"newUserId,optional"`
+		NewUserId    string `header:"newUserId,optional"`
 		EntId        string `header:"entId,optional"`
-		PositionType int64  `header:"positionType,optional"`
+		PositionType string `header:"positionType,optional"`
 	}
 	//公共接口返回
 	CommonRes {

+ 5 - 2
jyBXBase/api/internal/logic/newestBiddingLogic.go

@@ -5,6 +5,7 @@ import (
 	"context"
 	"jyBXBase/rpc/bxbase"
 	"net/http"
+	"strconv"
 
 	"jyBXBase/api/internal/svc"
 	"jyBXBase/api/internal/types"
@@ -29,15 +30,17 @@ func NewNewestBiddingLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *h
 }
 
 func (l *NewestBiddingLogic) NewestBidding(req *types.NewestReq) (resp *types.CommonRes, err error) {
+	newUserId, _ := strconv.ParseInt(req.NewUserId, 10, 64)
+	positionType, _ := strconv.ParseInt(req.PositionType, 10, 64)
 	res, err0 := l.svcCtx.Bxbase.NewestBidding(l.ctx, &bxbase.NewestBiddingReq{
 		UserId:       req.UserId,
 		AppId:        req.AppId,
 		City:         req.City,
 		IsSearch:     req.IsSearch,
 		EntUserId:    req.EntUserId,
-		NewUserId:    req.NewUserId,
+		NewUserId:    newUserId,
 		EntId:        req.EntId,
-		PositionType: req.PositionType,
+		PositionType: positionType,
 	})
 	if err0 != nil {
 		return &types.CommonRes{

+ 2 - 2
jyBXBase/api/internal/types/types.go

@@ -90,9 +90,9 @@ type NewestReq struct {
 	UserId       string `header:"userId,optional"`    //用户id
 	AppId        string `header:"appId"`              //appId
 	EntUserId    string `header:"entUserId,optional"` //商机管理用户 用户id:entUserId
-	NewUserId    int64  `header:"newUserId,optional"`
+	NewUserId    string `header:"newUserId,optional"`
 	EntId        string `header:"entId,optional"`
-	PositionType int64  `header:"positionType,optional"`
+	PositionType string `header:"positionType,optional"`
 }
 
 type CommonRes struct {

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

@@ -149,7 +149,12 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
 			items, ok := (*o_msgset)["a_key"].([]interface{})
 			if ok && len(items) > 0 {
 				//普通用户查询推送历史
-				result := model.GetNewestInfo(rks, "f", in.NewUserId).GetPushHistory()
+				result := []*bxbase.NewestList{}
+				if userType == "e" {
+					result = model.GetNewestInfo(rks, "e", MC.Int64All(in.EntUserId)).GetPushHistory()
+				} else {
+					result = model.GetNewestInfo(rks, "f", in.NewUserId).GetPushHistory()
+				}
 				res.Data.IsVip = false
 				res.Data.HasSubKeys = ok && len(items) > 0
 				res.Data.Count = int64(len(result))