WH01243 9 months ago
parent
commit
3612cc26f4
3 changed files with 82 additions and 58 deletions
  1. 28 42
      api/internal/handler/routes.go
  2. 39 0
      api/internal/types/types.go
  3. 15 16
      api/networkmanage.api

+ 28 - 42
api/internal/handler/routes.go

@@ -13,88 +13,74 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 	server.AddRoutes(
 	server.AddRoutes(
 		[]rest.Route{
 		[]rest.Route{
 			{
 			{
-				// 情报详情
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/infomation/detail",
-				Handler: infoDetailHandler(serverCtx),
+				Path:    "/networkManage/owner/list",
+				Handler: ownerListHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 人脉库-添加/修改人脉
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/network/addOrUpdate",
-				Handler: addOrUpdateHandler(serverCtx),
+				Path:    "/networkManage/network/project/list",
+				Handler: projectListHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 人脉库-全部人脉项目
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/network/allProject",
-				Handler: allProjectHandler(serverCtx),
+				Path:    "/networkManage/pr/pname/ass",
+				Handler: PrPnameAssHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 人脉库-业主名称联想
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/network/associate",
-				Handler: associateHandler(serverCtx),
+				Path:    "/networkManage/pr/project/analyse",
+				Handler: CoopHistoryListHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 人脉库-列表
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/network/networkList",
-				Handler: networkListHandler(serverCtx),
+				Path:    "/networkManage/network/addOrUpdate",
+				Handler: addOrUpdateHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 人脉可达商机列表
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/network/project/list",
-				Handler: projectListHandler(serverCtx),
+				Path:    "/networkManage/network/associate",
+				Handler: associateHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 可介绍业主合作次数
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/owner/cooperate",
-				Handler: ownerCooperateHandler(serverCtx),
+				Path:    "/networkManage/network/allProject",
+				Handler: allProjectHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 人脉可达潜客业主列表
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/owner/list",
-				Handler: ownerListHandler(serverCtx),
+				Path:    "/networkManage/network/networkList",
+				Handler: networkListHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 可介绍业主路径
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/owner/route",
-				Handler: ownerRouteHandler(serverCtx),
+				Path:    "/networkManage/infomation/detail",
+				Handler: infoDetailHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 公关渠道-标讯收藏项目找人脉
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/pr/collect/list",
-				Handler: PrCollectListHandler(serverCtx),
+				Path:    "/networkManage/pr/project/history",
+				Handler: projectHistoryHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 公关渠道-业主监控项目找人脉
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/pr/monitor/list",
-				Handler: PrMonitorListHandler(serverCtx),
+				Path:    "/networkManage/owner/route",
+				Handler: ownerRouteHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 项目公关渠道分析-项目名称联想
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/pr/pname/ass",
-				Handler: PrPnameAssHandler(serverCtx),
+				Path:    "/networkManage/owner/cooperate",
+				Handler: ownerCooperateHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 项目公关渠道分析-与业主合作历史
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/pr/project/analyse",
-				Handler: CoopHistoryListHandler(serverCtx),
+				Path:    "/networkManage/pr/monitor/list",
+				Handler: PrMonitorListHandler(serverCtx),
 			},
 			},
 			{
 			{
-				// 人脉项目分析-业主合作历史
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,
-				Path:    "/networkManage/pr/project/history",
-				Handler: projectHistoryHandler(serverCtx),
+				Path:    "/networkManage/pr/collect/list",
+				Handler: PrCollectListHandler(serverCtx),
 			},
 			},
 			{
 			{
 				Method:  http.MethodPost,
 				Method:  http.MethodPost,

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

@@ -143,3 +143,42 @@ type CooperateOwnerListReq struct {
 	CooperateType string `json:"cooperateType,optional"`
 	CooperateType string `json:"cooperateType,optional"`
 	PositionId    int64  `header:"positionId,optional"`
 	PositionId    int64  `header:"positionId,optional"`
 }
 }
+
+type UpdateInitInfoReq struct {
+	BusinessType string `json:"businessType,optional"`
+	Company      string `json:"company,optional"`
+	EntId        int64  `header:"entId,optional"`
+	MgoUserId    string `header:"mgoUserId,optional"` //原userId
+	NewUserId    int64  `header:"newUserId"`
+	AccountId    int64  `header:"accountId,optional"`
+	PositionId   int64  `header:"positionId,optional"`
+	PositionType int64  `header:"positionType,optional"`
+	EntUserId    int64  `header:"entUserId,optional"`
+}
+
+type FindInitInfoReq struct {
+	EntId        int64  `header:"entId,optional"`
+	MgoUserId    string `header:"mgoUserId,optional"` //原userId
+	PositionType int64  `header:"positionType,optional"`
+	NewUserId    int64  `header:"newUserId"`
+	AccountId    int64  `header:"accountId,optional"`
+	PositionId   int64  `header:"positionId,optional"`
+	EntUserId    int64  `header:"entUserId,optional"`
+}
+
+type PrMonitorListReq struct {
+	MgoUserId  string `header:"mgoUserId,optional"`
+	PositionId int64  `header:"positionId,optional"`
+	EntId      int64  `header:"entId,optional"`
+	PageSize   int    `json:"pageSize"`
+	PageNum    int    `json:"pageNum"`
+}
+
+type PrCollectListReq struct {
+	UserId     string `header:"userId,optional"`
+	MgoUserId  string `header:"mgoUserId,optional"`
+	PositionId int64  `header:"positionId,optional"`
+	EntId      int64  `header:"entId,optional"`
+	PageSize   int    `json:"pageSize"`
+	PageNum    int    `json:"pageNum"`
+}

+ 15 - 16
api/networkmanage.api

@@ -152,15 +152,15 @@ type (
 		EntUserId    int64  `header:"entUserId,optional"`
 		EntUserId    int64  `header:"entUserId,optional"`
 	}
 	}
 	PrMonitorListReq {
 	PrMonitorListReq {
-		MgoUserId  string `header:mgoUserId,optional`
+		MgoUserId  string `header:"mgoUserId,optional"`
 		PositionId int64  `header:"positionId,optional"`
 		PositionId int64  `header:"positionId,optional"`
 		EntId      int64  `header:"entId,optional"`
 		EntId      int64  `header:"entId,optional"`
 		PageSize   int    `json:"pageSize"`
 		PageSize   int    `json:"pageSize"`
 		PageNum    int    `json:"pageNum"`
 		PageNum    int    `json:"pageNum"`
 	}
 	}
 	PrCollectListReq {
 	PrCollectListReq {
-		UserId     string `header:userId,optional`
-		MgoUserId  string `header:mgoUserId,optional`
+		UserId     string `header:"userId,optional"`
+		MgoUserId  string `header:"mgoUserId,optional"`
 		PositionId int64  `header:"positionId,optional"`
 		PositionId int64  `header:"positionId,optional"`
 		EntId      int64  `header:"entId,optional"`
 		EntId      int64  `header:"entId,optional"`
 		PageSize   int    `json:"pageSize"`
 		PageSize   int    `json:"pageSize"`
@@ -172,47 +172,47 @@ service networkManage {
 	@doc "人脉可达潜客业主列表"
 	@doc "人脉可达潜客业主列表"
 	@handler ownerList
 	@handler ownerList
 	post /networkManage/owner/list (OwnerListReq) returns (Reply)
 	post /networkManage/owner/list (OwnerListReq) returns (Reply)
-	
+
 	@doc "人脉可达商机列表"
 	@doc "人脉可达商机列表"
 	@handler projectList
 	@handler projectList
 	post /networkManage/network/project/list (ProjectListReq) returns (Reply)
 	post /networkManage/network/project/list (ProjectListReq) returns (Reply)
-	
+
 	@doc "项目公关渠道分析-项目名称联想"
 	@doc "项目公关渠道分析-项目名称联想"
 	@handler PrPnameAss
 	@handler PrPnameAss
 	post /networkManage/pr/pname/ass (PnameAssReq) returns (Reply)
 	post /networkManage/pr/pname/ass (PnameAssReq) returns (Reply)
-	
+
 	@doc "项目公关渠道分析-与业主合作历史"
 	@doc "项目公关渠道分析-与业主合作历史"
 	@handler CoopHistoryList
 	@handler CoopHistoryList
 	post /networkManage/pr/project/analyse (CoopHistoryReq) returns (Reply)
 	post /networkManage/pr/project/analyse (CoopHistoryReq) returns (Reply)
-	
+
 	@doc "人脉库-添加/修改人脉"
 	@doc "人脉库-添加/修改人脉"
 	@handler addOrUpdate
 	@handler addOrUpdate
 	post /networkManage/network/addOrUpdate (AddOrUpdateReq) returns (Reply)
 	post /networkManage/network/addOrUpdate (AddOrUpdateReq) returns (Reply)
-	
+
 	@doc "人脉库-业主名称联想"
 	@doc "人脉库-业主名称联想"
 	@handler associate
 	@handler associate
 	post /networkManage/network/associate (AssociateReq) returns (Reply)
 	post /networkManage/network/associate (AssociateReq) returns (Reply)
-	
+
 	@doc "人脉库-全部人脉项目"
 	@doc "人脉库-全部人脉项目"
 	@handler allProject
 	@handler allProject
 	post /networkManage/network/allProject (AllprojectReq) returns (Reply)
 	post /networkManage/network/allProject (AllprojectReq) returns (Reply)
-	
+
 	@doc "人脉库-列表"
 	@doc "人脉库-列表"
 	@handler networkList
 	@handler networkList
 	post /networkManage/network/networkList (NetWorkListReq) returns (Reply)
 	post /networkManage/network/networkList (NetWorkListReq) returns (Reply)
-	
+
 	@doc "情报详情"
 	@doc "情报详情"
 	@handler infoDetail
 	@handler infoDetail
 	post /networkManage/infomation/detail (InfoDetailReq) returns (Reply)
 	post /networkManage/infomation/detail (InfoDetailReq) returns (Reply)
-	
+
 	@doc "人脉项目分析-业主合作历史"
 	@doc "人脉项目分析-业主合作历史"
 	@handler projectHistory
 	@handler projectHistory
 	post /networkManage/pr/project/history (PrjectHistoryReq) returns (Reply)
 	post /networkManage/pr/project/history (PrjectHistoryReq) returns (Reply)
-	
+
 	@doc "可介绍业主路径"
 	@doc "可介绍业主路径"
 	@handler ownerRoute
 	@handler ownerRoute
 	post /networkManage/owner/route (RouteOwnerListReq) returns (Reply)
 	post /networkManage/owner/route (RouteOwnerListReq) returns (Reply)
-	
+
 	@doc "可介绍业主合作次数"
 	@doc "可介绍业主合作次数"
 	@handler ownerCooperate
 	@handler ownerCooperate
 	post /networkManage/owner/cooperate (CooperateOwnerListReq) returns (Reply)
 	post /networkManage/owner/cooperate (CooperateOwnerListReq) returns (Reply)
@@ -232,5 +232,4 @@ service networkManage {
 	@doc "初始化设置"
 	@doc "初始化设置"
 	@handler updateInitInfo
 	@handler updateInitInfo
 	post /networkManage/init/updateInitInfo (UpdateInitInfoReq) returns (Reply)
 	post /networkManage/init/updateInitInfo (UpdateInitInfoReq) returns (Reply)
-}
-
+}