瀏覽代碼

fenzhihebing

lianbingjie 1 年之前
父節點
當前提交
c2b60b837b

+ 30 - 2
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 {
@@ -135,6 +135,22 @@ type (
 		EntUserName     string `header:"entUserName,optional"`
 		ParamData       string `json:"paramData,optional"`
 	}
+	CreateClueReq {
+		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"`
+	}
+	TransferClueReq {
+		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"`
+	}
 )
 
 @server (
@@ -211,6 +227,7 @@ service biService-api {
 	@handler upFile
 	post /biService/upFile (UpFileReq) returns (biResp)
 
+<<<<<<< HEAD
 	@doc "发送邮件"
 	@handler sendComMail
 	post /biService/sendCommonndMail (SendMailReq) returns (biResp)
@@ -219,4 +236,15 @@ service biService-api {
 	@handler addAcceptance
 	post /biService/addAcceptance (AcceptanceReq) returns (biResp)
 
-}
+}
+=======
+	@doc "创建线索"
+	@handler createClue
+	post /biService/createClueByPhone (CreateClueReq) returns (biResp)
+
+	@doc "客成线索移交"
+	@handler transferClueSucc
+	post /biService/transferClueByPhone (TransferClueReq) returns (biResp)
+}
+
+>>>>>>> master

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

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

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

@@ -14,8 +14,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 		[]rest.Route{
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/myDataAsset",
-				Handler: MyDataAssetHandler(serverCtx),
+				Path:    "/biService/ClueAdd",
+				Handler: ClueAddHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
@@ -24,19 +24,39 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/getInfoId",
-				Handler: GetInfoIdHandler(serverCtx),
+				Path:    "/biService/allInfoExport",
+				Handler: allInfoExportHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/drawClue",
-				Handler: DrawClueHandler(serverCtx),
+				Path:    "/biService/allProjectExport",
+				Handler: allProjectExportHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/autoFollow",
+				Handler: AutoFollowHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
 				Path:    "/biService/call",
 				Handler: CallHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/clueImport",
+				Handler: ClueImportHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/clueImportTt",
+				Handler: ClueImportTlHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/createClueByPhone",
+				Handler: createClueHandler(serverCtx),
+			},
 			{
 				Method:  http.MethodPost,
 				Path:    "/biService/distributeClue",
@@ -49,28 +69,28 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/clueImport",
-				Handler: ClueImportHandler(serverCtx),
+				Path:    "/biService/drawClue",
+				Handler: DrawClueHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/ClueAdd",
-				Handler: ClueAddHandler(serverCtx),
+				Path:    "/biService/getCompanyType",
+				Handler: getCompanyTypeHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/clueImportTt",
-				Handler: ClueImportTlHandler(serverCtx),
+				Path:    "/biService/getInfoId",
+				Handler: GetInfoIdHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/autoFollow",
-				Handler: AutoFollowHandler(serverCtx),
+				Path:    "/biService/infoOperate",
+				Handler: infoOperateHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/sqlManage",
-				Handler: sqlManageHandler(serverCtx),
+				Path:    "/biService/myDataAsset",
+				Handler: MyDataAssetHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
@@ -84,28 +104,18 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/allProjectExport",
-				Handler: allProjectExportHandler(serverCtx),
-			},
-			{
-				Method:  http.MethodPost,
-				Path:    "/biService/allInfoExport",
-				Handler: allInfoExportHandler(serverCtx),
-			},
-			{
-				Method:  http.MethodPost,
-				Path:    "/biService/infoOperate",
-				Handler: infoOperateHandler(serverCtx),
+				Path:    "/biService/sendMail",
+				Handler: sendMailHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/getCompanyType",
-				Handler: getCompanyTypeHandler(serverCtx),
+				Path:    "/biService/sqlManage",
+				Handler: sqlManageHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,
-				Path:    "/biService/sendMail",
-				Handler: sendMailHandler(serverCtx),
+				Path:    "/biService/transferClueByPhone",
+				Handler: transferClueSuccHandler(serverCtx),
 			},
 			{
 				Method:  http.MethodPost,

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

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

+ 39 - 0
api/internal/logic/createcluelogic.go

@@ -0,0 +1,39 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
+	"context"
+	"github.com/gogf/gf/v2/util/gconv"
+
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type CreateClueLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewCreateClueLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateClueLogic {
+	return &CreateClueLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *CreateClueLogic) CreateClue(req *types.CreateClueReq) (resp *types.BiResp, err error) {
+	if req.Phone == "" {
+		return &types.BiResp{Error_code: -1, Error_msg: "手机号不能为空", Data: nil}, err
+	}
+	res, err := l.svcCtx.BiServiceRpc.CreateClueByPhone(l.ctx, &biservice.CreateCuleReq{
+		AppId:      req.AppId,
+		PositionId: req.PositionId,
+		UserId:     req.UserId,
+		Phone:      req.Phone,
+	})
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: gconv.Map(gconv.UnsafeBytesToStr(res.Data))}, err
+}

+ 39 - 0
api/internal/logic/transfercluesucclogic.go

@@ -0,0 +1,39 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
+	"context"
+	"github.com/gogf/gf/v2/util/gconv"
+
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type TransferClueSuccLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewTransferClueSuccLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TransferClueSuccLogic {
+	return &TransferClueSuccLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *TransferClueSuccLogic) TransferClueSucc(req *types.TransferClueReq) (resp *types.BiResp, err error) {
+	if req.Phone == "" && req.OrderNo == "" {
+		return &types.BiResp{Error_code: -1, Error_msg: "手机号或者订单号不能为空", Data: nil}, err
+	}
+	res, err := l.svcCtx.BiServiceRpc.TransferClueByPhone(l.ctx, &biservice.TransferClueReq{
+		PositionId: req.PositionId,
+		UserId:     req.UserId,
+		Phone:      req.Phone,
+		OrderNo:    req.OrderNo,
+	})
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: gconv.Map(gconv.UnsafeBytesToStr(res.Data))}, err
+}

+ 95 - 77
api/internal/types/types.go

@@ -1,42 +1,34 @@
 // Code generated by goctl. DO NOT EDIT.
 package types
 
-type BiResp struct {
-	Error_code int64       `json:"error_code"` //响应代码
-	Error_msg  string      `json:"error_msg"`  //响应消息
-	Data       interface{} `json:"data"`
-}
-
-type MyDataAssetReq struct {
-	UserId    string `header:"userId,optional"`
-	NewUserId int64  `header:"newUserId,optional"`
-	EntUserId int64  `header:"entUserId,optional"`
-}
-
-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 GetInfoIdReq struct {
-	PositionId int64 `header:"positionId,optional"`
+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 DrawClueReq struct {
-	PositionId int64 `header:"positionId,optional"`
-	Count      int64 `json:"count,optional"`
+type ClueImportReq struct {
+	PositionId int64  `header:"positionId,optional"`
+	Pcbh       string `json:"pcbh"`
 }
 
-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"`
 }
 
@@ -57,31 +49,29 @@ type DistributeClueShowReq struct {
 	UpdatePositionID int64                    `json:"updatePositionID"`
 }
 
-type ClueImportReq struct {
-	PositionId int64  `header:"positionId,optional"`
-	Pcbh       string `json:"pcbh"`
+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 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 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 MyInfoReq struct {
+	Bid string `json:"bid,optional"`
+	Sid string `json:"sid"`
+}
+
+type OperateReq struct {
+	NewId string `json:"newId"`
+	Type  int64  `json:"type"`
 }
 
 type Param struct {
@@ -89,11 +79,6 @@ 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"`
@@ -102,28 +87,18 @@ type ResEmpowerReq struct {
 	PositionId   string `json:"positionId"`
 }
 
-type ExportReq struct {
-	Mail       string   `json:"mail"`
-	Mapping    []string `json:"mapping"`
-	PositionId int64    `header:"positionId,optional"`
-}
-
-type OperateReq struct {
-	NewId string `json:"newId"`
-	Type  int64  `json:"type"`
-}
-
-type GetCompanyTypeReq struct {
-	CompanyName string `json:"companyName"`
+type SqlManageReq struct {
+	Id     float64 `json:"id"`
+	Params []Param `json:"params"`
 }
 
-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 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 UpFileReq struct {
@@ -155,3 +130,46 @@ type AcceptanceReq struct {
 	EntUserName     string `header:"entUserName,optional"`
 	ParamData       string `json:"paramData,optional"`
 }
+
+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 BiResp struct {
+	Error_code int64       `json:"error_code"` //响应代码
+	Error_msg  string      `json:"error_msg"`  //响应消息
+	Data       interface{} `json:"data"`
+}
+
+type CallReq struct {
+	PositionId int64  `header:"positionId,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 GetInfoIdReq struct {
+	PositionId int64 `header:"positionId,optional"`
+}
+
+type MyDataAssetReq struct {
+	UserId    string `header:"userId,optional"`
+	NewUserId int64  `header:"newUserId,optional"`
+	EntUserId int64  `header:"entUserId,optional"`
+}

+ 19 - 0
rpc/biService.proto

@@ -239,6 +239,20 @@ message SendMailReq {
 	string mails = 3;
 }
 
+message CreateCuleReq {
+	string appId = 1;
+	int64 positionId = 2;
+	string userId = 3;
+	string phone = 4;
+}
+
+message TransferClueReq {
+	int64 positionId = 1;
+	string userId = 2;
+	string phone = 3;
+	string orderNo = 4;
+}
+
 service BiService {
 	rpc myDataAsset (MyDataAssetReq) returns (MyDataAssetResp); //我的数据资产
 	rpc addProject (AddProjectReq) returns (AddProjectResp); //添加项目
@@ -259,6 +273,11 @@ service BiService {
 	rpc distributeClueShow (DistributeClueShowReq) returns (DistributeClueShowResp); //批量分配展示
 	rpc sendMail (ExportByDbReq) returns (BiReply); //数据导出(通用)
 	rpc upFile (UpFileReq) returns(BiReply);
+<<<<<<< HEAD
 	rpc sendCommonMail (SendMailReq) returns(BiReply);
 	rpc addAcceptance (AcceptanceReq) returns(AcceptanceResp);
+=======
+	rpc createClueByPhone(CreateCuleReq) returns(BiReply);
+	rpc transferClueByPhone(TransferClueReq) returns(BiReply);
+>>>>>>> master
 }

+ 18 - 0
rpc/biservice/biservice.go

@@ -28,6 +28,7 @@ type (
 	ClueImportResp         = pb.ClueImportResp
 	CompanyReq             = pb.CompanyReq
 	CompanyResp            = pb.CompanyResp
+	CreateCuleReq          = pb.CreateCuleReq
 	DistributeClueReq      = pb.DistributeClueReq
 	DistributeClueShowReq  = pb.DistributeClueShowReq
 	DistributeClueShowResp = pb.DistributeClueShowResp
@@ -47,6 +48,7 @@ type (
 	Param                  = pb.Param
 	SendMailReq            = pb.SendMailReq
 	SqlManageReq           = pb.SqlManageReq
+	TransferClueReq        = pb.TransferClueReq
 	UpFileReq              = pb.UpFileReq
 
 	BiService interface {
@@ -69,8 +71,13 @@ type (
 		DistributeClueShow(ctx context.Context, in *DistributeClueShowReq, opts ...grpc.CallOption) (*DistributeClueShowResp, error)
 		SendMail(ctx context.Context, in *ExportByDbReq, opts ...grpc.CallOption) (*BiReply, error)
 		UpFile(ctx context.Context, in *UpFileReq, opts ...grpc.CallOption) (*BiReply, error)
+<<<<<<< HEAD
 		SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error)
 		AddAcceptance(ctx context.Context, in *AcceptanceReq, opts ...grpc.CallOption) (*AcceptanceResp, error)
+=======
+		CreateClueByPhone(ctx context.Context, in *CreateCuleReq, opts ...grpc.CallOption) (*BiReply, error)
+		TransferClueByPhone(ctx context.Context, in *TransferClueReq, opts ...grpc.CallOption) (*BiReply, error)
+>>>>>>> master
 	}
 
 	defaultBiService struct {
@@ -179,6 +186,7 @@ func (m *defaultBiService) UpFile(ctx context.Context, in *UpFileReq, opts ...gr
 	return client.UpFile(ctx, in, opts...)
 }
 
+<<<<<<< HEAD
 func (m *defaultBiService) SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error) {
 	client := pb.NewBiServiceClient(m.cli.Conn())
 	return client.SendCommonMail(ctx, in, opts...)
@@ -187,4 +195,14 @@ func (m *defaultBiService) SendCommonMail(ctx context.Context, in *SendMailReq,
 func (m *defaultBiService) AddAcceptance(ctx context.Context, in *AcceptanceReq, opts ...grpc.CallOption) (*AcceptanceResp, error) {
 	client := pb.NewBiServiceClient(m.cli.Conn())
 	return client.AddAcceptance(ctx, in, opts...)
+=======
+func (m *defaultBiService) CreateClueByPhone(ctx context.Context, in *CreateCuleReq, opts ...grpc.CallOption) (*BiReply, error) {
+	client := pb.NewBiServiceClient(m.cli.Conn())
+	return client.CreateClueByPhone(ctx, in, opts...)
+}
+
+func (m *defaultBiService) TransferClueByPhone(ctx context.Context, in *TransferClueReq, opts ...grpc.CallOption) (*BiReply, error) {
+	client := pb.NewBiServiceClient(m.cli.Conn())
+	return client.TransferClueByPhone(ctx, in, opts...)
+>>>>>>> master
 }

+ 29 - 0
rpc/internal/logic/createcluebyphonelogic.go

@@ -0,0 +1,29 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
+	"bp.jydev.jianyu360.cn/BaseService/biService/service"
+	"context"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type CreateClueByPhoneLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewCreateClueByPhoneLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CreateClueByPhoneLogic {
+	return &CreateClueByPhoneLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *CreateClueByPhoneLogic) CreateClueByPhone(in *pb.CreateCuleReq) (*pb.BiReply, error) {
+	result, err := service.CreateClue(in)
+	return result, err
+}

+ 30 - 0
rpc/internal/logic/transfercluebyphonelogic.go

@@ -0,0 +1,30 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/service"
+	"context"
+
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type TransferClueByPhoneLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewTransferClueByPhoneLogic(ctx context.Context, svcCtx *svc.ServiceContext) *TransferClueByPhoneLogic {
+	return &TransferClueByPhoneLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *TransferClueByPhoneLogic) TransferClueByPhone(in *pb.TransferClueReq) (*pb.BiReply, error) {
+	result, err := service.TransferClue(in)
+	return result, err
+}

+ 11 - 0
rpc/internal/server/biserviceserver.go

@@ -117,6 +117,7 @@ func (s *BiServiceServer) UpFile(ctx context.Context, in *pb.UpFileReq) (*pb.BiR
 	return l.UpFile(in)
 }
 
+<<<<<<< HEAD
 func (s *BiServiceServer) SendCommonMail(ctx context.Context, in *pb.SendMailReq) (*pb.BiReply, error) {
 	l := logic.NewSendCommonMailLogic(ctx, s.svcCtx)
 	return l.SendCommonMail(in)
@@ -125,4 +126,14 @@ func (s *BiServiceServer) SendCommonMail(ctx context.Context, in *pb.SendMailReq
 func (s *BiServiceServer) AddAcceptance(ctx context.Context, in *pb.AcceptanceReq) (*pb.AcceptanceResp, error) {
 	l := logic.NewAddAcceptanceLogic(ctx, s.svcCtx)
 	return l.AddAcceptance(in)
+=======
+func (s *BiServiceServer) CreateClueByPhone(ctx context.Context, in *pb.CreateCuleReq) (*pb.BiReply, error) {
+	l := logic.NewCreateClueByPhoneLogic(ctx, s.svcCtx)
+	return l.CreateClueByPhone(in)
+}
+
+func (s *BiServiceServer) TransferClueByPhone(ctx context.Context, in *pb.TransferClueReq) (*pb.BiReply, error) {
+	l := logic.NewTransferClueByPhoneLogic(ctx, s.svcCtx)
+	return l.TransferClueByPhone(in)
+>>>>>>> master
 }

+ 255 - 0
rpc/pb/biService.pb.go

@@ -2173,11 +2173,16 @@ func (x *UpFileReq) GetFileSize() string {
 	return ""
 }
 
+<<<<<<< HEAD
 type AcceptanceReq struct {
+=======
+type CreateCuleReq struct {
+>>>>>>> master
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
+<<<<<<< HEAD
 	ProposeType    int64  `protobuf:"varint,1,opt,name=ProposeType,proto3" json:"ProposeType,omitempty"`
 	ProposeTime    string `protobuf:"bytes,2,opt,name=Propose_time,json=ProposeTime,proto3" json:"Propose_time,omitempty"`
 	Channel        string `protobuf:"bytes,3,opt,name=Channel,proto3" json:"Channel,omitempty"`
@@ -2193,6 +2198,16 @@ type AcceptanceReq struct {
 
 func (x *AcceptanceReq) Reset() {
 	*x = AcceptanceReq{}
+=======
+	AppId      string `protobuf:"bytes,1,opt,name=appId,proto3" json:"appId,omitempty"`
+	PositionId int64  `protobuf:"varint,2,opt,name=positionId,proto3" json:"positionId,omitempty"`
+	UserId     string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"`
+	Phone      string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"`
+}
+
+func (x *CreateCuleReq) Reset() {
+	*x = CreateCuleReq{}
+>>>>>>> master
 	if protoimpl.UnsafeEnabled {
 		mi := &file_biService_proto_msgTypes[31]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -2200,6 +2215,7 @@ func (x *AcceptanceReq) Reset() {
 	}
 }
 
+<<<<<<< HEAD
 func (x *AcceptanceReq) String() string {
 	return protoimpl.X.MessageStringOf(x)
 }
@@ -2207,6 +2223,15 @@ func (x *AcceptanceReq) String() string {
 func (*AcceptanceReq) ProtoMessage() {}
 
 func (x *AcceptanceReq) ProtoReflect() protoreflect.Message {
+=======
+func (x *CreateCuleReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateCuleReq) ProtoMessage() {}
+
+func (x *CreateCuleReq) ProtoReflect() protoreflect.Message {
+>>>>>>> master
 	mi := &file_biService_proto_msgTypes[31]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -2218,6 +2243,7 @@ func (x *AcceptanceReq) ProtoReflect() protoreflect.Message {
 	return mi.MessageOf(x)
 }
 
+<<<<<<< HEAD
 // Deprecated: Use AcceptanceReq.ProtoReflect.Descriptor instead.
 func (*AcceptanceReq) Descriptor() ([]byte, []int) {
 	return file_biService_proto_rawDescGZIP(), []int{31}
@@ -2240,10 +2266,21 @@ func (x *AcceptanceReq) GetProposeTime() string {
 func (x *AcceptanceReq) GetChannel() string {
 	if x != nil {
 		return x.Channel
+=======
+// Deprecated: Use CreateCuleReq.ProtoReflect.Descriptor instead.
+func (*CreateCuleReq) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *CreateCuleReq) GetAppId() string {
+	if x != nil {
+		return x.AppId
+>>>>>>> master
 	}
 	return ""
 }
 
+<<<<<<< HEAD
 func (x *AcceptanceReq) GetAcceptanceType() int64 {
 	if x != nil {
 		return x.AcceptanceType
@@ -2273,26 +2310,42 @@ func (x *AcceptanceReq) GetRemark() string {
 }
 
 func (x *AcceptanceReq) GetPositionId() int64 {
+=======
+func (x *CreateCuleReq) GetPositionId() int64 {
+>>>>>>> master
 	if x != nil {
 		return x.PositionId
 	}
 	return 0
 }
 
+<<<<<<< HEAD
 func (x *AcceptanceReq) GetDeptId() string {
 	if x != nil {
 		return x.DeptId
+=======
+func (x *CreateCuleReq) GetUserId() string {
+	if x != nil {
+		return x.UserId
+>>>>>>> master
 	}
 	return ""
 }
 
+<<<<<<< HEAD
 func (x *AcceptanceReq) GetEntUserName() string {
 	if x != nil {
 		return x.EntUserName
+=======
+func (x *CreateCuleReq) GetPhone() string {
+	if x != nil {
+		return x.Phone
+>>>>>>> master
 	}
 	return ""
 }
 
+<<<<<<< HEAD
 func (x *AcceptanceReq) GetParamData() string {
 	if x != nil {
 		return x.ParamData
@@ -2301,10 +2354,14 @@ func (x *AcceptanceReq) GetParamData() string {
 }
 
 type AcceptanceResp struct {
+=======
+type TransferClueReq struct {
+>>>>>>> master
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
+<<<<<<< HEAD
 	ErrorCode int64       `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
 	ErrorMsg  string      `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
 	Data      *Acceptance `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
@@ -2312,6 +2369,16 @@ type AcceptanceResp struct {
 
 func (x *AcceptanceResp) Reset() {
 	*x = AcceptanceResp{}
+=======
+	PositionId int64  `protobuf:"varint,1,opt,name=positionId,proto3" json:"positionId,omitempty"`
+	UserId     string `protobuf:"bytes,2,opt,name=userId,proto3" json:"userId,omitempty"`
+	Phone      string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`
+	OrderNo    string `protobuf:"bytes,4,opt,name=orderNo,proto3" json:"orderNo,omitempty"`
+}
+
+func (x *TransferClueReq) Reset() {
+	*x = TransferClueReq{}
+>>>>>>> master
 	if protoimpl.UnsafeEnabled {
 		mi := &file_biService_proto_msgTypes[32]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -2319,6 +2386,7 @@ func (x *AcceptanceResp) Reset() {
 	}
 }
 
+<<<<<<< HEAD
 func (x *AcceptanceResp) String() string {
 	return protoimpl.X.MessageStringOf(x)
 }
@@ -2326,6 +2394,15 @@ func (x *AcceptanceResp) String() string {
 func (*AcceptanceResp) ProtoMessage() {}
 
 func (x *AcceptanceResp) ProtoReflect() protoreflect.Message {
+=======
+func (x *TransferClueReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TransferClueReq) ProtoMessage() {}
+
+func (x *TransferClueReq) ProtoReflect() protoreflect.Message {
+>>>>>>> master
 	mi := &file_biService_proto_msgTypes[32]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -2337,6 +2414,7 @@ func (x *AcceptanceResp) ProtoReflect() protoreflect.Message {
 	return mi.MessageOf(x)
 }
 
+<<<<<<< HEAD
 // Deprecated: Use AcceptanceResp.ProtoReflect.Descriptor instead.
 func (*AcceptanceResp) Descriptor() ([]byte, []int) {
 	return file_biService_proto_rawDescGZIP(), []int{32}
@@ -2345,10 +2423,21 @@ func (*AcceptanceResp) Descriptor() ([]byte, []int) {
 func (x *AcceptanceResp) GetErrorCode() int64 {
 	if x != nil {
 		return x.ErrorCode
+=======
+// Deprecated: Use TransferClueReq.ProtoReflect.Descriptor instead.
+func (*TransferClueReq) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *TransferClueReq) GetPositionId() int64 {
+	if x != nil {
+		return x.PositionId
+>>>>>>> master
 	}
 	return 0
 }
 
+<<<<<<< HEAD
 func (x *AcceptanceResp) GetErrorMsg() string {
 	if x != nil {
 		return x.ErrorMsg
@@ -2455,20 +2544,37 @@ func (*SendMailReq) Descriptor() ([]byte, []int) {
 func (x *SendMailReq) GetTitle() string {
 	if x != nil {
 		return x.Title
+=======
+func (x *TransferClueReq) GetUserId() string {
+	if x != nil {
+		return x.UserId
+>>>>>>> master
 	}
 	return ""
 }
 
+<<<<<<< HEAD
 func (x *SendMailReq) GetContent() string {
 	if x != nil {
 		return x.Content
+=======
+func (x *TransferClueReq) GetPhone() string {
+	if x != nil {
+		return x.Phone
+>>>>>>> master
 	}
 	return ""
 }
 
+<<<<<<< HEAD
 func (x *SendMailReq) GetMails() string {
 	if x != nil {
 		return x.Mails
+=======
+func (x *TransferClueReq) GetOrderNo() string {
+	if x != nil {
+		return x.OrderNo
+>>>>>>> master
 	}
 	return ""
 }
@@ -2726,6 +2832,7 @@ var file_biService_proto_rawDesc = []byte{
 	0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66,
 	0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53,
 	0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53,
+<<<<<<< HEAD
 	0x69, 0x7a, 0x65, 0x22, 0xdc, 0x02, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e,
 	0x63, 0x65, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65,
 	0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x70,
@@ -2823,6 +2930,83 @@ var file_biService_proto_rawDesc = []byte{
 	0x63, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e,
 	0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06,
 	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+=======
+	0x69, 0x7a, 0x65, 0x22, 0x73, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x6c,
+	0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f,
+	0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a,
+	0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73,
+	0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72,
+	0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x79, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e,
+	0x73, 0x66, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x70,
+	0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75,
+	0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
+	0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64,
+	0x65, 0x72, 0x4e, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65,
+	0x72, 0x4e, 0x6f, 0x32, 0xa1, 0x07, 0x0a, 0x09, 0x42, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+	0x65, 0x12, 0x30, 0x0a, 0x0b, 0x6d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74,
+	0x12, 0x0f, 0x2e, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65,
+	0x71, 0x1a, 0x10, 0x2e, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+	0x74, 0x12, 0x0e, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
+	0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x2b, 0x0a, 0x09, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x12,
+	0x0e, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a,
+	0x0e, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x29, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6c, 0x75, 0x65, 0x12, 0x0c, 0x2e, 0x44, 0x72,
+	0x61, 0x77, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50,
+	0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x04, 0x43, 0x61,
+	0x6c, 0x6c, 0x12, 0x08, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x07, 0x2e, 0x42,
+	0x69, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62,
+	0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69,
+	0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64,
+	0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a,
+	0x63, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0e, 0x2e, 0x43, 0x6c, 0x75,
+	0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x43, 0x6c, 0x75,
+	0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x63,
+	0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x12, 0x0b, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64,
+	0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f,
+	0x72, 0x74, 0x54, 0x74, 0x12, 0x0e, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72,
+	0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72,
+	0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x46, 0x6f, 0x6c,
+	0x6c, 0x6f, 0x77, 0x12, 0x08, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e,
+	0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24,
+	0x0a, 0x09, 0x73, 0x71, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x12, 0x0d, 0x2e, 0x53, 0x71,
+	0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52,
+	0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0a,
+	0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52,
+	0x65, 0x70, 0x6c, 0x79, 0x12, 0x25, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x45,
+	0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0a, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65,
+	0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x61,
+	0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12,
+	0x0a, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
+	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x66, 0x6f, 0x4f, 0x70, 0x65,
+	0x72, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65,
+	0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2b, 0x0a, 0x0e, 0x67,
+	0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x2e,
+	0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x43, 0x6f, 0x6d,
+	0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x74,
+	0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x16,
+	0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53,
+	0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62,
+	0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x24, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x2e, 0x45, 0x78,
+	0x70, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x44, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
+	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x75, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x12,
+	0x0a, 0x2e, 0x55, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
+	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2d, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43,
+	0x6c, 0x75, 0x65, 0x42, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x0e, 0x2e, 0x43, 0x72, 0x65,
+	0x61, 0x74, 0x65, 0x43, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52,
+	0x65, 0x70, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72,
+	0x43, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x10, 0x2e, 0x54, 0x72,
+	0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e,
+	0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
+	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+>>>>>>> master
 }
 
 var (
@@ -2837,7 +3021,11 @@ func file_biService_proto_rawDescGZIP() []byte {
 	return file_biService_proto_rawDescData
 }
 
+<<<<<<< HEAD
 var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 35)
+=======
+var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
+>>>>>>> master
 var file_biService_proto_goTypes = []interface{}{
 	(*MyDataAssetReq)(nil),         // 0: MyDataAssetReq
 	(*MyDataAssetResp)(nil),        // 1: MyDataAssetResp
@@ -2870,10 +3058,15 @@ var file_biService_proto_goTypes = []interface{}{
 	(*ExportByDbReq)(nil),          // 28: ExportByDbReq
 	(*FilesData)(nil),              // 29: FilesData
 	(*UpFileReq)(nil),              // 30: UpFileReq
+<<<<<<< HEAD
 	(*AcceptanceReq)(nil),          // 31: AcceptanceReq
 	(*AcceptanceResp)(nil),         // 32: AcceptanceResp
 	(*Acceptance)(nil),             // 33: Acceptance
 	(*SendMailReq)(nil),            // 34: SendMailReq
+=======
+	(*CreateCuleReq)(nil),          // 31: CreateCuleReq
+	(*TransferClueReq)(nil),        // 32: TransferClueReq
+>>>>>>> master
 }
 var file_biService_proto_depIdxs = []int32{
 	2,  // 0: MyDataAssetResp.data:type_name -> MyDataAsset
@@ -2884,6 +3077,7 @@ var file_biService_proto_depIdxs = []int32{
 	25, // 5: DistributeClueShowReq.datas:type_name -> DistributeClueShows
 	26, // 6: DistributeClueShowResp.data:type_name -> DistributeClueShowss
 	29, // 7: ExportByDbReq.datas:type_name -> FilesData
+<<<<<<< HEAD
 	33, // 8: AcceptanceResp.data:type_name -> Acceptance
 	0,  // 9: BiService.myDataAsset:input_type -> MyDataAssetReq
 	3,  // 10: BiService.addProject:input_type -> AddProjectReq
@@ -2932,6 +3126,55 @@ var file_biService_proto_depIdxs = []int32{
 	9,  // [9:9] is the sub-list for extension type_name
 	9,  // [9:9] is the sub-list for extension extendee
 	0,  // [0:9] is the sub-list for field type_name
+=======
+	0,  // 8: BiService.myDataAsset:input_type -> MyDataAssetReq
+	3,  // 9: BiService.addProject:input_type -> AddProjectReq
+	3,  // 10: BiService.getInfoId:input_type -> AddProjectReq
+	7,  // 11: BiService.drawClue:input_type -> DrawClueReq
+	8,  // 12: BiService.Call:input_type -> CallReq
+	11, // 13: BiService.distributeClue:input_type -> DistributeClueReq
+	13, // 14: BiService.clueImport:input_type -> ClueImportReq
+	16, // 15: BiService.clueAdd:input_type -> ClueAddReq
+	13, // 16: BiService.clueImportTt:input_type -> ClueImportReq
+	8,  // 17: BiService.autoFollow:input_type -> CallReq
+	17, // 18: BiService.sqlManage:input_type -> SqlManageReq
+	18, // 19: BiService.myInfo:input_type -> MyInfoReq
+	20, // 20: BiService.allInfoExport:input_type -> ExportReq
+	20, // 21: BiService.allProjectExport:input_type -> ExportReq
+	21, // 22: BiService.infoOperate:input_type -> OperateReq
+	22, // 23: BiService.getCompanyType:input_type -> CompanyReq
+	24, // 24: BiService.distributeClueShow:input_type -> DistributeClueShowReq
+	28, // 25: BiService.sendMail:input_type -> ExportByDbReq
+	30, // 26: BiService.upFile:input_type -> UpFileReq
+	31, // 27: BiService.createClueByPhone:input_type -> CreateCuleReq
+	32, // 28: BiService.transferClueByPhone:input_type -> TransferClueReq
+	1,  // 29: BiService.myDataAsset:output_type -> MyDataAssetResp
+	4,  // 30: BiService.addProject:output_type -> AddProjectResp
+	6,  // 31: BiService.getInfoId:output_type -> GetInfoIdResp
+	4,  // 32: BiService.drawClue:output_type -> AddProjectResp
+	9,  // 33: BiService.Call:output_type -> BiResp
+	4,  // 34: BiService.distributeClue:output_type -> AddProjectResp
+	14, // 35: BiService.clueImport:output_type -> ClueImportResp
+	4,  // 36: BiService.clueAdd:output_type -> AddProjectResp
+	14, // 37: BiService.clueImportTt:output_type -> ClueImportResp
+	14, // 38: BiService.autoFollow:output_type -> ClueImportResp
+	10, // 39: BiService.sqlManage:output_type -> BiReply
+	10, // 40: BiService.myInfo:output_type -> BiReply
+	10, // 41: BiService.allInfoExport:output_type -> BiReply
+	10, // 42: BiService.allProjectExport:output_type -> BiReply
+	10, // 43: BiService.infoOperate:output_type -> BiReply
+	23, // 44: BiService.getCompanyType:output_type -> CompanyResp
+	27, // 45: BiService.distributeClueShow:output_type -> DistributeClueShowResp
+	10, // 46: BiService.sendMail:output_type -> BiReply
+	10, // 47: BiService.upFile:output_type -> BiReply
+	10, // 48: BiService.createClueByPhone:output_type -> BiReply
+	10, // 49: BiService.transferClueByPhone:output_type -> BiReply
+	29, // [29:50] is the sub-list for method output_type
+	8,  // [8:29] is the sub-list for method input_type
+	8,  // [8:8] is the sub-list for extension type_name
+	8,  // [8:8] is the sub-list for extension extendee
+	0,  // [0:8] is the sub-list for field type_name
+>>>>>>> master
 }
 
 func init() { file_biService_proto_init() }
@@ -3313,7 +3556,11 @@ func file_biService_proto_init() {
 			}
 		}
 		file_biService_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+<<<<<<< HEAD
 			switch v := v.(*AcceptanceReq); i {
+=======
+			switch v := v.(*CreateCuleReq); i {
+>>>>>>> master
 			case 0:
 				return &v.state
 			case 1:
@@ -3325,6 +3572,7 @@ func file_biService_proto_init() {
 			}
 		}
 		file_biService_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+<<<<<<< HEAD
 			switch v := v.(*AcceptanceResp); i {
 			case 0:
 				return &v.state
@@ -3350,6 +3598,9 @@ func file_biService_proto_init() {
 		}
 		file_biService_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*SendMailReq); i {
+=======
+			switch v := v.(*TransferClueReq); i {
+>>>>>>> master
 			case 0:
 				return &v.state
 			case 1:
@@ -3367,7 +3618,11 @@ func file_biService_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_biService_proto_rawDesc,
 			NumEnums:      0,
+<<<<<<< HEAD
 			NumMessages:   35,
+=======
+			NumMessages:   33,
+>>>>>>> master
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 95 - 0
rpc/pb/biService_grpc.pb.go

@@ -19,6 +19,7 @@ import (
 const _ = grpc.SupportPackageIsVersion7
 
 const (
+<<<<<<< HEAD
 	BiService_MyDataAsset_FullMethodName        = "/BiService/myDataAsset"
 	BiService_AddProject_FullMethodName         = "/BiService/addProject"
 	BiService_GetInfoId_FullMethodName          = "/BiService/getInfoId"
@@ -40,6 +41,29 @@ const (
 	BiService_UpFile_FullMethodName             = "/BiService/upFile"
 	BiService_SendCommonMail_FullMethodName     = "/BiService/sendCommonMail"
 	BiService_AddAcceptance_FullMethodName      = "/BiService/addAcceptance"
+=======
+	BiService_MyDataAsset_FullMethodName         = "/BiService/myDataAsset"
+	BiService_AddProject_FullMethodName          = "/BiService/addProject"
+	BiService_GetInfoId_FullMethodName           = "/BiService/getInfoId"
+	BiService_DrawClue_FullMethodName            = "/BiService/drawClue"
+	BiService_Call_FullMethodName                = "/BiService/Call"
+	BiService_DistributeClue_FullMethodName      = "/BiService/distributeClue"
+	BiService_ClueImport_FullMethodName          = "/BiService/clueImport"
+	BiService_ClueAdd_FullMethodName             = "/BiService/clueAdd"
+	BiService_ClueImportTt_FullMethodName        = "/BiService/clueImportTt"
+	BiService_AutoFollow_FullMethodName          = "/BiService/autoFollow"
+	BiService_SqlManage_FullMethodName           = "/BiService/sqlManage"
+	BiService_MyInfo_FullMethodName              = "/BiService/myInfo"
+	BiService_AllInfoExport_FullMethodName       = "/BiService/allInfoExport"
+	BiService_AllProjectExport_FullMethodName    = "/BiService/allProjectExport"
+	BiService_InfoOperate_FullMethodName         = "/BiService/infoOperate"
+	BiService_GetCompanyType_FullMethodName      = "/BiService/getCompanyType"
+	BiService_DistributeClueShow_FullMethodName  = "/BiService/distributeClueShow"
+	BiService_SendMail_FullMethodName            = "/BiService/sendMail"
+	BiService_UpFile_FullMethodName              = "/BiService/upFile"
+	BiService_CreateClueByPhone_FullMethodName   = "/BiService/createClueByPhone"
+	BiService_TransferClueByPhone_FullMethodName = "/BiService/transferClueByPhone"
+>>>>>>> master
 )
 
 // BiServiceClient is the client API for BiService service.
@@ -65,8 +89,13 @@ type BiServiceClient interface {
 	DistributeClueShow(ctx context.Context, in *DistributeClueShowReq, opts ...grpc.CallOption) (*DistributeClueShowResp, error)
 	SendMail(ctx context.Context, in *ExportByDbReq, opts ...grpc.CallOption) (*BiReply, error)
 	UpFile(ctx context.Context, in *UpFileReq, opts ...grpc.CallOption) (*BiReply, error)
+<<<<<<< HEAD
 	SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error)
 	AddAcceptance(ctx context.Context, in *AcceptanceReq, opts ...grpc.CallOption) (*AcceptanceResp, error)
+=======
+	CreateClueByPhone(ctx context.Context, in *CreateCuleReq, opts ...grpc.CallOption) (*BiReply, error)
+	TransferClueByPhone(ctx context.Context, in *TransferClueReq, opts ...grpc.CallOption) (*BiReply, error)
+>>>>>>> master
 }
 
 type biServiceClient struct {
@@ -248,18 +277,30 @@ func (c *biServiceClient) UpFile(ctx context.Context, in *UpFileReq, opts ...grp
 	return out, nil
 }
 
+<<<<<<< HEAD
 func (c *biServiceClient) SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error) {
 	out := new(BiReply)
 	err := c.cc.Invoke(ctx, BiService_SendCommonMail_FullMethodName, in, out, opts...)
+=======
+func (c *biServiceClient) CreateClueByPhone(ctx context.Context, in *CreateCuleReq, opts ...grpc.CallOption) (*BiReply, error) {
+	out := new(BiReply)
+	err := c.cc.Invoke(ctx, BiService_CreateClueByPhone_FullMethodName, in, out, opts...)
+>>>>>>> master
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
+<<<<<<< HEAD
 func (c *biServiceClient) AddAcceptance(ctx context.Context, in *AcceptanceReq, opts ...grpc.CallOption) (*AcceptanceResp, error) {
 	out := new(AcceptanceResp)
 	err := c.cc.Invoke(ctx, BiService_AddAcceptance_FullMethodName, in, out, opts...)
+=======
+func (c *biServiceClient) TransferClueByPhone(ctx context.Context, in *TransferClueReq, opts ...grpc.CallOption) (*BiReply, error) {
+	out := new(BiReply)
+	err := c.cc.Invoke(ctx, BiService_TransferClueByPhone_FullMethodName, in, out, opts...)
+>>>>>>> master
 	if err != nil {
 		return nil, err
 	}
@@ -289,8 +330,13 @@ type BiServiceServer interface {
 	DistributeClueShow(context.Context, *DistributeClueShowReq) (*DistributeClueShowResp, error)
 	SendMail(context.Context, *ExportByDbReq) (*BiReply, error)
 	UpFile(context.Context, *UpFileReq) (*BiReply, error)
+<<<<<<< HEAD
 	SendCommonMail(context.Context, *SendMailReq) (*BiReply, error)
 	AddAcceptance(context.Context, *AcceptanceReq) (*AcceptanceResp, error)
+=======
+	CreateClueByPhone(context.Context, *CreateCuleReq) (*BiReply, error)
+	TransferClueByPhone(context.Context, *TransferClueReq) (*BiReply, error)
+>>>>>>> master
 	mustEmbedUnimplementedBiServiceServer()
 }
 
@@ -355,11 +401,19 @@ func (UnimplementedBiServiceServer) SendMail(context.Context, *ExportByDbReq) (*
 func (UnimplementedBiServiceServer) UpFile(context.Context, *UpFileReq) (*BiReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UpFile not implemented")
 }
+<<<<<<< HEAD
 func (UnimplementedBiServiceServer) SendCommonMail(context.Context, *SendMailReq) (*BiReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SendCommonMail not implemented")
 }
 func (UnimplementedBiServiceServer) AddAcceptance(context.Context, *AcceptanceReq) (*AcceptanceResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method AddAcceptance not implemented")
+=======
+func (UnimplementedBiServiceServer) CreateClueByPhone(context.Context, *CreateCuleReq) (*BiReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method CreateClueByPhone not implemented")
+}
+func (UnimplementedBiServiceServer) TransferClueByPhone(context.Context, *TransferClueReq) (*BiReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method TransferClueByPhone not implemented")
+>>>>>>> master
 }
 func (UnimplementedBiServiceServer) mustEmbedUnimplementedBiServiceServer() {}
 
@@ -716,12 +770,18 @@ func _BiService_UpFile_Handler(srv interface{}, ctx context.Context, dec func(in
 	return interceptor(ctx, in, info, handler)
 }
 
+<<<<<<< HEAD
 func _BiService_SendCommonMail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(SendMailReq)
+=======
+func _BiService_CreateClueByPhone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(CreateCuleReq)
+>>>>>>> master
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
+<<<<<<< HEAD
 		return srv.(BiServiceServer).SendCommonMail(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
@@ -730,16 +790,32 @@ func _BiService_SendCommonMail_Handler(srv interface{}, ctx context.Context, dec
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).SendCommonMail(ctx, req.(*SendMailReq))
+=======
+		return srv.(BiServiceServer).CreateClueByPhone(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: BiService_CreateClueByPhone_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BiServiceServer).CreateClueByPhone(ctx, req.(*CreateCuleReq))
+>>>>>>> master
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
+<<<<<<< HEAD
 func _BiService_AddAcceptance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(AcceptanceReq)
+=======
+func _BiService_TransferClueByPhone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(TransferClueReq)
+>>>>>>> master
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
+<<<<<<< HEAD
 		return srv.(BiServiceServer).AddAcceptance(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
@@ -748,6 +824,16 @@ func _BiService_AddAcceptance_Handler(srv interface{}, ctx context.Context, dec
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(BiServiceServer).AddAcceptance(ctx, req.(*AcceptanceReq))
+=======
+		return srv.(BiServiceServer).TransferClueByPhone(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: BiService_TransferClueByPhone_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BiServiceServer).TransferClueByPhone(ctx, req.(*TransferClueReq))
+>>>>>>> master
 	}
 	return interceptor(ctx, in, info, handler)
 }
@@ -836,12 +922,21 @@ var BiService_ServiceDesc = grpc.ServiceDesc{
 			Handler:    _BiService_UpFile_Handler,
 		},
 		{
+<<<<<<< HEAD
 			MethodName: "sendCommonMail",
 			Handler:    _BiService_SendCommonMail_Handler,
 		},
 		{
 			MethodName: "addAcceptance",
 			Handler:    _BiService_AddAcceptance_Handler,
+=======
+			MethodName: "createClueByPhone",
+			Handler:    _BiService_CreateClueByPhone_Handler,
+		},
+		{
+			MethodName: "transferClueByPhone",
+			Handler:    _BiService_TransferClueByPhone_Handler,
+>>>>>>> master
 		},
 	},
 	Streams:  []grpc.StreamDesc{},

+ 281 - 0
service/clueByPhone.go

@@ -0,0 +1,281 @@
+package service
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+	"bp.jydev.jianyu360.cn/BaseService/biService/entity"
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
+	"database/sql"
+	"encoding/json"
+	"github.com/gogf/gf/v2/util/gconv"
+	"go.mongodb.org/mongo-driver/bson"
+	"time"
+)
+
+// @Author jianghan
+// @Description 根据手机号查询线索, 线索不存在创建线索并插入记录
+// @Date 2024/5/28
+func CreateClue(in *pb.CreateCuleReq) (result *pb.BiReply, err error) {
+	info := entity.JyBiTidb.FindOne("dwd_f_userbase_contacts", bson.M{"phone": in.Phone}, "id, baseinfo_id", "")
+	if info == nil || len(*info) == 0 {
+		return &pb.BiReply{
+			ErrorCode: -1,
+			ErrorMsg:  "手机号不存在",
+			Data:      nil,
+		}, nil
+	}
+	uId := common.ObjToString((*info)["baseinfo_id"])
+	userId := ""
+	clueInfo := entity.JyBiTidb.FindOne("dwd_f_crm_clue_info", bson.M{"uid": uId}, "", "")
+	if clueInfo != nil && len(*clueInfo) > 0 {
+		return &pb.BiReply{
+			ErrorCode: -1,
+			ErrorMsg:  "线索已经存在",
+			Data:      nil,
+		}, nil
+	}
+	userInfo := entity.JyBiTidb.FindOne("dwd_f_userbase_baseinfo", bson.M{"phone": in.Phone}, "userid", "")
+	if userInfo != nil && len(*userInfo) > 0 {
+		userId = common.ObjToString((*userInfo)["userid"])
+	}
+	isGroup, isCommerce := CompanyType(in.Phone) //判断是否集团公司、工商库
+	clueId := int64(0)
+	if entity.JyBiTidb.ExecTx("保存线索", func(tx *sql.Tx) bool {
+		nowTime := time.Now().Format("2006-01-02 15:04:05")
+		clueId = entity.JyBiTidb.InsertByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{
+			"userid":               userId,
+			"uid":                  uId,
+			"is_assign":            0,
+			"createtime":           nowTime,
+			"updatetime":           nowTime,
+			"cluename":             in.Phone,
+			"top_cluetype":         "4",
+			"sub_cluetype":         "154",
+			"trailstatus":          "01",
+			"name":                 in.Phone,
+			"phone":                in.Phone,
+			"company_nature":       isGroup,
+			"company_verification": isCommerce,
+			"comeintime_open":      nowTime,
+		})
+		uodateId1 := entity.JyBiTidb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
+			"clue_id":       clueId,
+			"position_id":   -1,
+			"change_type":   "创建线索",
+			"new_value":     "系统自动创建",
+			"createtime":    nowTime,
+			"BCPCID":        common.GetRandom(32),
+			"operator_id":   -1,
+			"change_reason": "根据手机号创建线索(接口)",
+		})
+		uodateId2 := entity.JyBiTidb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
+			"clue_id":       clueId,
+			"change_field":  "top_cluetype",
+			"position_id":   -1,
+			"change_type":   "基本信息变更",
+			"old_value":     "/",
+			"new_value":     "新增注册",
+			"createtime":    nowTime,
+			"BCPCID":        common.GetRandom(32),
+			"operator_id":   -1,
+			"change_reason": "根据手机号创建线索(接口)",
+		})
+		uodateId3 := entity.JyBiTidb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
+			"clue_id":       clueId,
+			"change_field":  "sub_cluetype",
+			"position_id":   0,
+			"change_type":   "基本信息变更",
+			"old_value":     "/",
+			"new_value":     "新增注册用户",
+			"createtime":    nowTime,
+			"BCPCID":        common.GetRandom(32),
+			"operator_id":   -1,
+			"change_reason": "根据手机号创建线索(接口)",
+		})
+		return clueId > -1 && uodateId1 > -1 && uodateId2 > -1 && uodateId3 > -1
+	}) {
+		return &pb.BiReply{
+			ErrorCode: 0,
+			ErrorMsg:  "线索创建成功",
+			Data:      gconv.Bytes(bson.M{"id": clueId}),
+		}, nil
+	} else {
+		return &pb.BiReply{
+			ErrorCode: -1,
+			ErrorMsg:  "线索创建失败",
+			Data:      nil,
+		}, nil
+	}
+}
+
+// @Author jianghan
+// @Description 客成移交线索
+// @Date 2024/5/28
+func TransferClue(in *pb.TransferClueReq) (result *pb.BiReply, err error) {
+	uId, entId, product := "", "", 0
+	query := make(map[string]interface{})
+	if in.OrderNo != "" {
+		query["order_code"] = in.OrderNo
+	} else if in.Phone != "" {
+		query["phone"] = in.Phone
+	}
+	orderInfo := entity.JyBiTidb.FindOne("dwd_f_userbase_order_info", query, "", "")
+	if orderInfo == nil || len(*orderInfo) == 0 {
+		return &pb.BiReply{
+			ErrorCode: -1,
+			ErrorMsg:  "订单编号或手机号不存在",
+			Data:      nil,
+		}, nil
+	}
+
+	uId = common.ObjToString((*orderInfo)["uid"])
+	company_name := common.ObjToString((*orderInfo)["company_name"])
+	starttime := common.ObjToString((*orderInfo)["vip_starttime"])
+	endtime := common.ObjToString((*orderInfo)["vip_endtime"])
+	t, _ := time.Parse(date.Date_Full_Layout, endtime)
+
+	isExpired := false // 即将过期
+	if time.Now().Unix() > t.Unix()+3*30*24*3600 {
+		return &pb.BiReply{
+			ErrorCode: 1,
+			ErrorMsg:  "订单已经过期",
+			Data:      nil,
+		}, nil
+	} else if t.Unix() > time.Now().Unix() && time.Now().Unix()+3*30*24*3600 > t.Unix() {
+		isExpired = true
+	}
+	buy_subject := common.IntAll((*orderInfo)["buy_subject"])
+	product_type := common.ObjToString((*orderInfo)["product_type"])
+	data_spec := common.ObjToString((*orderInfo)["data_spec"])
+	if buy_subject == 1 || buy_subject == 0 {
+		entId = common.ObjToString((*orderInfo)["userid"])
+	}
+	productMap := map[string]int{
+		"dhy6":   1,
+		"dhy7":   2,
+		"dhy3":   4,
+		"dhy1":   5,
+		"dhy2":   6,
+		"dhy5":   7,
+		"企业商机管理": 8,
+	}
+	if product_type == "企业商机管理" {
+		product = productMap[product_type]
+	} else {
+		if data_spec == "dhy6" {
+			product = 1
+			filter := common.ObjToString((*orderInfo)["filter"])
+			filterMap := map[string]interface{}{}
+			json.Unmarshal([]byte(filter), &filterMap)
+			if len(filterMap) > 0 {
+				areaCount := common.IntAll(filterMap["areaCount"])
+				if areaCount == 1 {
+					product = 3
+				}
+			}
+		} else {
+			product = productMap[data_spec]
+		}
+	}
+	clueData := entity.JyBiTidb.FindOne("dwd_f_crm_clue_info", bson.M{"uid": uId}, "", "")
+	if clueData != nil && len(*clueData) > 0 {
+		clueId := (*clueData)["id"]
+		userName := common.ObjToString((*clueData)["name"])
+		nowTime := time.Now().Format("2006-01-02 15:04:05")
+		csmdata := entity.JyBiTidb.FindOne("dwd_f_csm_customer_info", bson.M{"clue_id": clueId}, "", "")
+		if csmdata != nil && len(*csmdata) > 0 {
+			if common.IntAll((*csmdata)["is_transfer"]) == 0 {
+				return &pb.BiReply{
+					ErrorCode: 0,
+					ErrorMsg:  "线索已经移交至客成",
+					Data:      gconv.Bytes(bson.M{"id": clueId}),
+				}, nil
+			} else {
+				entity.JyBiTidb.Update("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}, bson.M{
+					"is_transfer":           0,
+					"is_renewal_protection": 0,
+					"product_access":        product,
+					"buy_subject":           buy_subject,
+					"transfertime":          nowTime,
+					"service_starttime":     starttime,
+					"service_endtime":       endtime,
+					"ent_id":                entId,
+					"company_name":          company_name,
+				})
+				entity.JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+					"clue_id":       clueId,
+					"position_id":   (*csmdata)["position_id"],
+					"change_type":   "成交客户移交",
+					"new_value":     "移交至客户成功组",
+					"createtime":    nowTime,
+					"BCPCID":        common.GetRandom(32),
+					"operator_id":   -1,
+					"change_reason": "根据手机号或者订单号移交线索(接口)",
+				})
+				entity.JyBiTidb.Update("dwd_f_crm_clue_info", bson.M{"id": clueId}, map[string]interface{}{"is_transfer": 1, "updatetime": nowTime, "name": userName})
+				return &pb.BiReply{
+					ErrorCode: 0,
+					ErrorMsg:  "线索移交成功",
+					Data:      gconv.Bytes(bson.M{"id": clueId, "isExpired": isExpired}),
+				}, nil
+			}
+		} else {
+			saveMap := map[string]interface{}{
+				"clue_id":                   clueId,
+				"transfertime":              nowTime,
+				"position_id":               in.PositionId,
+				"name":                      "",
+				"service_starttime":         starttime,
+				"service_endtime":           endtime,
+				"ent_id":                    entId,
+				"is_task":                   1,
+				"tasktime":                  nowTime,
+				"taskstatus":                0,
+				"tasksource":                "1",
+				"is_admin":                  1,
+				"product_access":            product,
+				"buy_subject":               buy_subject,
+				"relationship_building_way": 1,
+				"inventory_way":             1,
+				"training_way":              1,
+				"is_pre_sales_training":     0,
+				"service_stage":             1,
+				"company_name":              company_name,
+			}
+			cId, ok, updateId1 := int64(-1), false, int64(-1)
+			if entity.JyBiTidb.ExecTx("保存客户", func(tx *sql.Tx) bool {
+				cId = entity.JyBiTidb.InsertByTx(tx, "dwd_f_csm_customer_info", saveMap)
+				ok = entity.JyBiTidb.UpdateByTx(tx, "dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, map[string]interface{}{"is_transfer": 1, "updatetime": nowTime, "name": userName})
+				updateId1 = entity.JyBiTidb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
+					"clue_id":       clueId,
+					"position_id":   in.PositionId,
+					"change_type":   "成交客户移交",
+					"new_value":     "移交至客户成功组",
+					"createtime":    nowTime,
+					"BCPCID":        common.GetRandom(32),
+					"operator_id":   -1,
+					"change_reason": "根据手机号或者订单号移交线索(接口)",
+				})
+				return cId > -1 && ok && updateId1 > -1
+			}) {
+				return &pb.BiReply{
+					ErrorCode: 0,
+					ErrorMsg:  "线索移交成功",
+					Data:      gconv.Bytes(bson.M{"id": clueId, "isExpired": isExpired}),
+				}, nil
+			} else {
+				return &pb.BiReply{
+					ErrorCode: -1,
+					ErrorMsg:  "线索移交失败",
+					Data:      nil,
+				}, nil
+			}
+		}
+	} else {
+		return &pb.BiReply{
+			ErrorCode: -1,
+			ErrorMsg:  "线索查询失败",
+			Data:      nil,
+		}, nil
+	}
+}