WH01243 4 сар өмнө
parent
commit
4be534332d

+ 3 - 3
api/biService.api

@@ -3,7 +3,7 @@ syntax = "v1"
 type (
 	biResp {
 		Error_code int64       `json:"error_code"` //响应代码
-		Error_msg  string      `json:"error_msg"` //响应消息
+		Error_msg  string      `json:"error_msg"`  //响应消息
 		Data       interface{} `json:"data"`
 	}
 	myDataAssetReq {
@@ -153,6 +153,7 @@ type (
 	FindClueInfoReq {
 		UserId     string `header:"userId,optional"`
 		PositionId int64  `header:"positionId,optional"`
+		Phone      string `header:"phone,optional"`
 	}
 	ClueInfoReq {
 		SearchTxt  string `json:"searchTxt"`
@@ -259,5 +260,4 @@ service biService-api {
 	@doc "线索验重 列表"
 	@handler getClueInfoList
 	post /biService/getClueInfoList (ClueInfoReq) returns (biResp)
-}
-
+}

+ 47 - 64
api/internal/handler/routes.go

@@ -1,6 +1,4 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.7.6
-
 package handler
 
 import (
@@ -16,14 +14,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 		[]rest.Route{
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/ClueAdd",
-				Handler: ClueAddHandler(serverCtx),
-			},
-			{
-				// 新增受理单
-				Method:  http.MethodPost,
-				Path:    "/biService/addAcceptance",
-				Handler: addAcceptanceHandler(serverCtx),
+				Path:    "/biService/myDataAsset",
+				Handler: MyDataAssetHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
@@ -31,133 +23,124 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Handler: AddProjectReqHandler(serverCtx),
 			},
 			{
-				// 资讯全量导出
 				Method:  http.MethodPost,
-				Path:    "/biService/allInfoExport",
-				Handler: allInfoExportHandler(serverCtx),
+				Path:    "/biService/getInfoId",
+				Handler: GetInfoIdHandler(serverCtx),
 			},
 			{
-				// 项目全量导出
 				Method:  http.MethodPost,
-				Path:    "/biService/allProjectExport",
-				Handler: allProjectExportHandler(serverCtx),
+				Path:    "/biService/drawClue",
+				Handler: DrawClueHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/autoFollow",
-				Handler: AutoFollowHandler(serverCtx),
+				Path:    "/biService/call",
+				Handler: CallHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/call",
-				Handler: CallHandler(serverCtx),
+				Path:    "/biService/distributeClue",
+				Handler: DistributeClueHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/clueImport",
-				Handler: ClueImportHandler(serverCtx),
+				Path:    "/biService/distributeClueShow",
+				Handler: DistributeClueShowHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/clueImportTt",
-				Handler: ClueImportTlHandler(serverCtx),
+				Path:    "/biService/clueImport",
+				Handler: ClueImportHandler(serverCtx),
 			},
 			{
-				// 创建线索
 				Method:  http.MethodPost,
-				Path:    "/biService/createClueByPhone",
-				Handler: createClueHandler(serverCtx),
+				Path:    "/biService/ClueAdd",
+				Handler: ClueAddHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/distributeClue",
-				Handler: DistributeClueHandler(serverCtx),
+				Path:    "/biService/clueImportTt",
+				Handler: ClueImportTlHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/distributeClueShow",
-				Handler: DistributeClueShowHandler(serverCtx),
+				Path:    "/biService/autoFollow",
+				Handler: AutoFollowHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/drawClue",
-				Handler: DrawClueHandler(serverCtx),
+				Path:    "/biService/sqlManage",
+				Handler: sqlManageHandler(serverCtx),
 			},
 			{
-				// 线索查询
 				Method:  http.MethodPost,
-				Path:    "/biService/findClueInfo",
-				Handler: findClueInfoHandler(serverCtx),
+				Path:    "/biService/myInfo",
+				Handler: MyinfoHandler(serverCtx),
 			},
 			{
-				// 线索验重 列表
 				Method:  http.MethodPost,
-				Path:    "/biService/getClueInfoList",
-				Handler: getClueInfoListHandler(serverCtx),
+				Path:    "/biService/resEmpower",
+				Handler: ResEmpowerHandler(serverCtx),
 			},
 			{
-				// 公司类型
 				Method:  http.MethodPost,
-				Path:    "/biService/getCompanyType",
-				Handler: getCompanyTypeHandler(serverCtx),
+				Path:    "/biService/allProjectExport",
+				Handler: allProjectExportHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/getInfoId",
-				Handler: GetInfoIdHandler(serverCtx),
+				Path:    "/biService/allInfoExport",
+				Handler: allInfoExportHandler(serverCtx),
 			},
 			{
-				// 资讯操作
 				Method:  http.MethodPost,
 				Path:    "/biService/infoOperate",
 				Handler: infoOperateHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/myDataAsset",
-				Handler: MyDataAssetHandler(serverCtx),
+				Path:    "/biService/getCompanyType",
+				Handler: getCompanyTypeHandler(serverCtx),
 			},
 			{
-				// 用户身份
 				Method:  http.MethodPost,
-				Path:    "/biService/myInfo",
-				Handler: MyinfoHandler(serverCtx),
+				Path:    "/biService/sendMail",
+				Handler: sendMailHandler(serverCtx),
 			},
 			{
-				// 资源中台授权
 				Method:  http.MethodPost,
-				Path:    "/biService/resEmpower",
-				Handler: ResEmpowerHandler(serverCtx),
+				Path:    "/biService/upFile",
+				Handler: upFileHandler(serverCtx),
 			},
 			{
-				// 发送邮件
 				Method:  http.MethodPost,
 				Path:    "/biService/sendCommonndMail",
 				Handler: sendComMailHandler(serverCtx),
 			},
 			{
-				// 数据导出(通用),发邮件
 				Method:  http.MethodPost,
-				Path:    "/biService/sendMail",
-				Handler: sendMailHandler(serverCtx),
+				Path:    "/biService/addAcceptance",
+				Handler: addAcceptanceHandler(serverCtx),
 			},
 			{
-				// bi通用接口
 				Method:  http.MethodPost,
-				Path:    "/biService/sqlManage",
-				Handler: sqlManageHandler(serverCtx),
+				Path:    "/biService/createClueByPhone",
+				Handler: createClueHandler(serverCtx),
 			},
 			{
-				// 客成线索移交
 				Method:  http.MethodPost,
 				Path:    "/biService/transferClueByPhone",
 				Handler: transferClueSuccHandler(serverCtx),
 			},
 			{
-				// 附件上传
 				Method:  http.MethodPost,
-				Path:    "/biService/upFile",
-				Handler: upFileHandler(serverCtx),
+				Path:    "/biService/findClueInfo",
+				Handler: findClueInfoHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/getClueInfoList",
+				Handler: getClueInfoListHandler(serverCtx),
 			},
 		},
 		rest.WithMaxBytes(104857600),

+ 107 - 108
api/internal/types/types.go

@@ -1,57 +1,42 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.7.6
-
 package types
 
-type AcceptanceReq struct {
-	ProposeType     int64  `json:"proposeType,optional"`
-	Propose_time    string `json:"proposeTime,optional"`
-	Channel         string `json:"channel,optional"`
-	Acceptance_type int64  `json:"acceptanceType,optional"`
-	Status          int64  `json:"status,optional"`
-	Over_time       string `json:"overTime,optional"`
-	Remark          string `json:"remark,optional"`
-	PositionId      int64  `header:"positionId,optional"`
-	DeptId          string `header:"entDeptId,optional"` //部门id
-	EntUserName     string `header:"entUserName,optional"`
-	ParamData       string `json:"paramData,optional"`
+type BiResp struct {
+	Error_code int64       `json:"error_code"` //响应代码
+	Error_msg  string      `json:"error_msg"`  //响应消息
+	Data       interface{} `json:"data"`
 }
 
-type ClueAddReq struct {
-	Phone            string `json:"phone"`
-	Username         string `json:"username,optional"`
-	Source           string `json:"source"`
-	Status999        string `json:"status999"`
-	Owner            string `json:"owner"`
-	EmpNo            string `json:"empNo"`
-	Company          string `json:"company,optional"`
-	IsPolicymaker    string `json:"isPolicymaker,optional"`
-	BelongToIndustry string `json:"belongToIndustry,optional"`
-	Job              string `json:"job,optional"`
-	CustomerNeeds    string `json:"customerNeeds,optional"`
-	BelongTo         string `json:"belongTo,optional"`
-	WantGoods        string `json:"wantGoods,optional"`
-	CustomerBudget   string `json:"customerBudget,optional"`
+type MyDataAssetReq struct {
+	UserId    string `header:"userId,optional"`
+	NewUserId int64  `header:"newUserId,optional"`
+	EntUserId int64  `header:"entUserId,optional"`
 }
 
-type ClueImportReq struct {
-	PositionId int64  `header:"positionId,optional"`
-	Pcbh       string `json:"pcbh"`
+type AddProjectReq struct {
+	PositionId   int64  `header:"positionId,optional"`
+	Source       int64  `json:"source,optional"`
+	InfoId       string `json:"info_id,optional"`
+	PositionType int64  `header:"positionType,optional"`
+	AccountId    int64  `header:"accountId,optional"`
+	CompanyName  string `header:"entName,optional"`
+	UserName     string `header:"userName,optional"`
+	UserId       int64  `header:"newUserId,optional"`
+	EntId        int64  `header:"entId,optional"`
+	EntUserName  string `header:"entUserName,optional"`
 }
 
-type ClueInfoReq struct {
-	SearchTxt  string `json:"searchTxt"`
-	SearchType string `json:"searchType"` // 0: 线索名称,1: 联系方式,2: 联系人
-	PageSize   int64  `json:"pageSize"`
-	PageNum    int64  `json:"pageNum"`
+type GetInfoIdReq struct {
+	PositionId int64 `header:"positionId,optional"`
 }
 
-type CreateClueReq struct {
-	AppId      string `header:"appId,default=10000"`
-	UserId     string `header:"userId,optional"`
-	BaseUserId int64  `header:"newUserId"`
+type DrawClueReq struct {
+	PositionId int64 `header:"positionId,optional"`
+	Count      int64 `json:"count,optional"`
+}
+
+type CallReq struct {
 	PositionId int64  `header:"positionId,optional"`
-	EntUserId  int64  `header:"entUserId,optional"`
 	Phone      string `json:"phone"`
 }
 
@@ -72,34 +57,31 @@ type DistributeClueShowReq struct {
 	UpdatePositionID int64                    `json:"updatePositionID"`
 }
 
-type ExportByDbReq struct {
-	Token    string                   `json:"token"`
-	Title    string                   `json:"title"`
-	Content  string                   `json:"content"`
-	Mails    string                   `json:"mails"`
-	FileName string                   `json:"filename"`
-	Datas    []map[string]interface{} `json:"datas"`
-}
-
-type ExportReq struct {
-	Mail       string   `json:"mail"`
-	Mapping    []string `json:"mapping"`
-	PositionId int64    `header:"positionId,optional"`
-}
-
-type FindClueInfoReq struct {
-	UserId     string `header:"userId,optional"`
+type ClueImportReq struct {
 	PositionId int64  `header:"positionId,optional"`
+	Pcbh       string `json:"pcbh"`
 }
 
-type MyInfoReq struct {
-	Bid string `json:"bid,optional"`
-	Sid string `json:"sid"`
+type ClueAddReq struct {
+	Phone            string `json:"phone"`
+	Username         string `json:"username,optional"`
+	Source           string `json:"source"`
+	Status999        string `json:"status999"`
+	Owner            string `json:"owner"`
+	EmpNo            string `json:"empNo"`
+	Company          string `json:"company,optional"`
+	IsPolicymaker    string `json:"isPolicymaker,optional"`
+	BelongToIndustry string `json:"belongToIndustry,optional"`
+	Job              string `json:"job,optional"`
+	CustomerNeeds    string `json:"customerNeeds,optional"`
+	BelongTo         string `json:"belongTo,optional"`
+	WantGoods        string `json:"wantGoods,optional"`
+	CustomerBudget   string `json:"customerBudget,optional"`
 }
 
-type OperateReq struct {
-	NewId string `json:"newId"`
-	Type  int64  `json:"type"`
+type SqlManageReq struct {
+	Id     float64 `json:"id"`
+	Params []Param `json:"params"`
 }
 
 type Param struct {
@@ -107,6 +89,11 @@ type Param struct {
 	Type  string `json:"type"`
 }
 
+type MyInfoReq struct {
+	Bid string `json:"bid,optional"`
+	Sid string `json:"sid"`
+}
+
 type ResEmpowerReq struct {
 	EntId        int64  `header:"entId"`
 	ReqType      int64  `json:"reqType"`
@@ -115,24 +102,28 @@ type ResEmpowerReq struct {
 	PositionId   string `json:"positionId"`
 }
 
-type SendMailReq struct {
-	Title   string `json:"title"`
-	Content string `json:"content"`
-	Mails   string `json:"mails"`
+type ExportReq struct {
+	Mail       string   `json:"mail"`
+	Mapping    []string `json:"mapping"`
+	PositionId int64    `header:"positionId,optional"`
 }
 
-type SqlManageReq struct {
-	Id     float64 `json:"id"`
-	Params []Param `json:"params"`
+type OperateReq struct {
+	NewId string `json:"newId"`
+	Type  int64  `json:"type"`
 }
 
-type TransferClueReq struct {
-	UserId     string `header:"userId,optional"`
-	BaseUserId int64  `header:"newUserId"`
-	PositionId int64  `header:"positionId,optional"`
-	EntUserId  int64  `header:"entUserId,optional"`
-	Phone      string `json:"phone"`
-	OrderNo    string `json:"orderNo"`
+type GetCompanyTypeReq struct {
+	CompanyName string `json:"companyName"`
+}
+
+type ExportByDbReq struct {
+	Token    string                   `json:"token"`
+	Title    string                   `json:"title"`
+	Content  string                   `json:"content"`
+	Mails    string                   `json:"mails"`
+	FileName string                   `json:"filename"`
+	Datas    []map[string]interface{} `json:"datas"`
 }
 
 type UpFileReq struct {
@@ -144,45 +135,53 @@ type UpFileReq struct {
 	FileType   string `form:"fileType"`
 }
 
-type AddProjectReq struct {
-	PositionId   int64  `header:"positionId,optional"`
-	Source       int64  `json:"source,optional"`
-	InfoId       string `json:"info_id,optional"`
-	PositionType int64  `header:"positionType,optional"`
-	AccountId    int64  `header:"accountId,optional"`
-	CompanyName  string `header:"entName,optional"`
-	UserName     string `header:"userName,optional"`
-	UserId       int64  `header:"newUserId,optional"`
-	EntId        int64  `header:"entId,optional"`
-	EntUserName  string `header:"entUserName,optional"`
+type SendMailReq struct {
+	Title   string `json:"title"`
+	Content string `json:"content"`
+	Mails   string `json:"mails"`
 }
 
-type BiResp struct {
-	Error_code int64       `json:"error_code"` //响应代码
-	Error_msg  string      `json:"error_msg"`  //响应消息
-	Data       interface{} `json:"data"`
+type AcceptanceReq struct {
+	ProposeType     int64  `json:"proposeType,optional"`
+	Propose_time    string `json:"proposeTime,optional"`
+	Channel         string `json:"channel,optional"`
+	Acceptance_type int64  `json:"acceptanceType,optional"`
+	Status          int64  `json:"status,optional"`
+	Over_time       string `json:"overTime,optional"`
+	Remark          string `json:"remark,optional"`
+	PositionId      int64  `header:"positionId,optional"`
+	DeptId          string `header:"entDeptId,optional"` //部门id
+	EntUserName     string `header:"entUserName,optional"`
+	ParamData       string `json:"paramData,optional"`
 }
 
-type CallReq struct {
+type CreateClueReq struct {
+	AppId      string `header:"appId,default=10000"`
+	UserId     string `header:"userId,optional"`
+	BaseUserId int64  `header:"newUserId"`
 	PositionId int64  `header:"positionId,optional"`
+	EntUserId  int64  `header:"entUserId,optional"`
 	Phone      string `json:"phone"`
 }
 
-type DrawClueReq struct {
-	PositionId int64 `header:"positionId,optional"`
-	Count      int64 `json:"count,optional"`
-}
-
-type GetCompanyTypeReq struct {
-	CompanyName string `json:"companyName"`
+type TransferClueReq struct {
+	UserId     string `header:"userId,optional"`
+	BaseUserId int64  `header:"newUserId"`
+	PositionId int64  `header:"positionId,optional"`
+	EntUserId  int64  `header:"entUserId,optional"`
+	Phone      string `json:"phone"`
+	OrderNo    string `json:"orderNo"`
 }
 
-type GetInfoIdReq struct {
-	PositionId int64 `header:"positionId,optional"`
+type FindClueInfoReq struct {
+	UserId     string `header:"userId,optional"`
+	PositionId int64  `header:"positionId,optional"`
+	Phone      string `header:"phone,optional"`
 }
 
-type MyDataAssetReq struct {
-	UserId    string `header:"userId,optional"`
-	NewUserId int64  `header:"newUserId,optional"`
-	EntUserId int64  `header:"entUserId,optional"`
+type ClueInfoReq struct {
+	SearchTxt  string `json:"searchTxt"`
+	SearchType string `json:"searchType"` // 0: 线索名称,1: 联系方式,2: 联系人
+	PageSize   int64  `json:"pageSize"`
+	PageNum    int64  `json:"pageNum"`
 }