Browse Source

人脉可达商机-人脉路径

Jianghan 1 năm trước cách đây
mục cha
commit
4931be1af2

+ 11 - 0
api/application.api

@@ -293,6 +293,13 @@ type (
 	InfoDetailReq {
 		InfoId string `json:"infoId"`
 	}
+	PListPathReq {
+		PositionId int64  `header:"positionId"`
+		EntUserId  int64  `header:"entUserId,optional"`
+		EntId      int64  `header:"entId,optional"`
+		EntDeptId  int64  `header:"entDeptId,optional"`
+		BuyerId    string `json:"buyerId"`
+	}
 )
 
 @server (
@@ -387,5 +394,9 @@ service crmApplication {
 	@doc "情报详情"
 	@handler infoDetail
 	post /crmApplication/infomation/detail (InfoDetailReq) returns (Reply)
+
+	@doc "人脉可达商机列表-人脉路径"
+	@handler plistPath
+	post /crmApplication/network/plist/pathway (PListPathReq) returns (Reply)
 }
 

+ 28 - 0
api/internal/handler/plistpathhandler.go

@@ -0,0 +1,28 @@
+package handler
+
+import (
+	"net/http"
+
+	"bp.jydev.jianyu360.cn/CRM/application/api/internal/logic"
+	"bp.jydev.jianyu360.cn/CRM/application/api/internal/svc"
+	"bp.jydev.jianyu360.cn/CRM/application/api/internal/types"
+	"github.com/zeromicro/go-zero/rest/httpx"
+)
+
+func plistPathHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.PListPathReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+			return
+		}
+
+		l := logic.NewPlistPathLogic(r.Context(), svcCtx)
+		resp, err := l.PlistPath(&req)
+		if err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+		} else {
+			httpx.OkJsonCtx(r.Context(), w, resp)
+		}
+	}
+}

+ 5 - 0
api/internal/handler/routes.go

@@ -97,6 +97,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/crmApplication/network/list",
 				Handler: listHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/crmApplication/network/plist/pathway",
+				Handler: plistPathHandler(serverCtx),
+			},
 			{
 				Method:  http.MethodPost,
 				Path:    "/crmApplication/network/project/list",

+ 30 - 0
api/internal/logic/plistpathlogic.go

@@ -0,0 +1,30 @@
+package logic
+
+import (
+	"context"
+
+	"bp.jydev.jianyu360.cn/CRM/application/api/internal/svc"
+	"bp.jydev.jianyu360.cn/CRM/application/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type PlistPathLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewPlistPathLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PlistPathLogic {
+	return &PlistPathLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *PlistPathLogic) PlistPath(req *types.PListPathReq) (resp *types.Reply, err error) {
+	// todo: add your logic here and delete this line
+
+	return
+}

+ 1 - 1
api/internal/service/plistService.go

@@ -273,7 +273,7 @@ func moreInfo(req *types.ProjectListReq, list []map[string]interface{}) (result
 		// 人脉路径
 		// 有我的人脉标签时不需要查询人脉路径信息
 		if m["my_conn"] == false {
-			//ConnectionsHandle([]string{common.ObjToString(m["buyer_id"])}, req.PositionId, false)
+			service.ConnectionsHandle([]string{common.ObjToString(m["buyer_id"])}, req.PositionId, false)
 		}
 	}
 

+ 8 - 0
api/internal/types/types.go

@@ -232,6 +232,14 @@ type OwnerListReq struct {
 	PageIndex        int64  `json:"pageIndex,optional"`
 }
 
+type PListPathReq struct {
+	PositionId int64  `header:"positionId"`
+	EntUserId  int64  `header:"entUserId,optional"`
+	EntId      int64  `header:"entId,optional"`
+	EntDeptId  int64  `header:"entDeptId,optional"`
+	BuyerId    string `json:"buyerId"`
+}
+
 type PnameAssReq struct {
 	ProjectName string `json:"projectName"`
 }