Ver código fonte

电销修改线索名称移交客成

renjiaojiao 5 horas atrás
pai
commit
52660c18ca

+ 7 - 0
api/biService.api

@@ -174,6 +174,11 @@ type (
 		CreateUser      string `json:"createUser"`
 		ImgWebpage      string `json:"imgWebpage"`
 	}
+
+	ClueTransferReq {
+		ClueId   int64  `json:"clueId"`
+		ClueName string `json:"clueName"`
+	}
 )
 
 @server (
@@ -276,4 +281,6 @@ service biService-api {
 	
 	@handler MaterialSave
 	post /biService/materialSave (MaterialSaveReq) returns (biResp)
+	@handler ClueTransfer
+	post /biService/clueTransfer (ClueTransferReq) returns (biResp)
 }

+ 28 - 0
api/internal/handler/cluetransferhandler.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 ClueTransferHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		var req types.ClueTransferReq
+		if err := httpx.Parse(r, &req); err != nil {
+			httpx.Error(w, err)
+			return
+		}
+
+		l := logic.NewClueTransferLogic(r.Context(), svcCtx)
+		resp, err := l.ClueTransfer(&req)
+		if err != nil {
+			httpx.Error(w, err)
+		} else {
+			httpx.OkJson(w, resp)
+		}
+	}
+}

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

@@ -147,6 +147,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/biService/materialSave",
 				Handler: MaterialSaveHandler(serverCtx),
 			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/clueTransfer",
+				Handler: ClueTransferHandler(serverCtx),
+			},
 		},
 	)
 }

+ 36 - 0
api/internal/logic/cluetransferlogic.go

@@ -0,0 +1,36 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/pb"
+	"context"
+	"log"
+
+	"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 ClueTransferLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewClueTransferLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ClueTransferLogic {
+	return &ClueTransferLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *ClueTransferLogic) ClueTransfer(req *types.ClueTransferReq) (resp *types.BiResp, err error) {
+	// todo: add your logic here and delete this line
+	res, err := l.svcCtx.BiServiceRpc.ClueTransfer(l.ctx, &pb.ClueTransferReq{
+		ClueId:   req.ClueId,
+		ClueName: req.ClueName,
+	})
+	log.Println("rpc返回:", res)
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg}, err
+}

+ 2 - 1
api/internal/logic/getcompanytypelogic.go

@@ -35,7 +35,8 @@ func (l *GetCompanyTypeLogic) GetCompanyType(req *types.GetCompanyTypeReq) (resp
 
 	resp = &types.BiResp{
 		Data: map[string]interface{}{
-			"status": status,
+			"status":     status,
+			"isCustomer": res.IsCustomer,
 		},
 	}
 	return resp, err

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

@@ -198,3 +198,8 @@ type MaterialSaveReq struct {
 	CreateUser      string `json:"createUser"`
 	ImgWebpage      string `json:"imgWebpage"`
 }
+
+type ClueTransferReq struct {
+	ClueId   int64  `json:"clueId"`
+	ClueName string `json:"clueName"`
+}

+ 7 - 0
rpc/biService.proto

@@ -155,6 +155,7 @@ message CompanyReq {
 
 message CompanyResp {
   int64 status = 1;
+  bool isCustomer = 2;
 }
 
 message DistributeClueShowReq {
@@ -283,6 +284,11 @@ message MaterialSaveResp {
   repeated string userIdArr = 4;
 }
 
+message ClueTransferReq {
+  int64 clueId = 1;
+  string clueName = 2;
+}
+
 service BiService {
   rpc myDataAsset (MyDataAssetReq) returns (MyDataAssetResp); //我的数据资产
   rpc addProject (AddProjectReq) returns (AddProjectResp); //添加项目
@@ -310,4 +316,5 @@ service BiService {
   rpc findClueInfo(FindClueInfoReq) returns(BiReply);
   rpc getClueInfoList(ClueInfoReq) returns(BiReply);
   rpc MaterialSave(MaterialSaveReq) returns(MaterialSaveResp);//物料分发保存
+  rpc clueTransfer(ClueTransferReq) returns(BiResp);
 }

+ 7 - 0
rpc/biservice/biservice.go

@@ -27,6 +27,7 @@ type (
 	ClueImportReq          = pb.ClueImportReq
 	ClueImportResp         = pb.ClueImportResp
 	ClueInfoReq            = pb.ClueInfoReq
+	ClueTransferReq        = pb.ClueTransferReq
 	CompanyReq             = pb.CompanyReq
 	CompanyResp            = pb.CompanyResp
 	CreateCuleReq          = pb.CreateCuleReq
@@ -82,6 +83,7 @@ type (
 		FindClueInfo(ctx context.Context, in *FindClueInfoReq, opts ...grpc.CallOption) (*BiReply, error)
 		GetClueInfoList(ctx context.Context, in *ClueInfoReq, opts ...grpc.CallOption) (*BiReply, error)
 		MaterialSave(ctx context.Context, in *MaterialSaveReq, opts ...grpc.CallOption) (*MaterialSaveResp, error)
+		ClueTransfer(ctx context.Context, in *ClueTransferReq, opts ...grpc.CallOption) (*BiResp, error)
 	}
 
 	defaultBiService struct {
@@ -224,3 +226,8 @@ func (m *defaultBiService) MaterialSave(ctx context.Context, in *MaterialSaveReq
 	client := pb.NewBiServiceClient(m.cli.Conn())
 	return client.MaterialSave(ctx, in, opts...)
 }
+
+func (m *defaultBiService) ClueTransfer(ctx context.Context, in *ClueTransferReq, opts ...grpc.CallOption) (*BiResp, error) {
+	client := pb.NewBiServiceClient(m.cli.Conn())
+	return client.ClueTransfer(ctx, in, opts...)
+}

+ 34 - 0
rpc/internal/logic/cluetransferlogic.go

@@ -0,0 +1,34 @@
+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 ClueTransferLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewClueTransferLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ClueTransferLogic {
+	return &ClueTransferLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *ClueTransferLogic) ClueTransfer(in *pb.ClueTransferReq) (*pb.BiResp, error) {
+	// todo: add your logic here and delete this line
+	status, err := service.ClueTransfer(in.ClueId, in.ClueName)
+	return &pb.BiResp{
+		ErrorCode: int64(status),
+		ErrorMsg:  err.Error(),
+	}, err
+}

+ 3 - 1
rpc/internal/logic/getcompanytypelogic.go

@@ -28,8 +28,10 @@ func (l *GetCompanyTypeLogic) GetCompanyType(in *pb.CompanyReq) (*pb.CompanyResp
 	// todo: add your logic here and delete this line
 
 	status := service.GetCompanyType(in)
+	isCustomer := service.RelatedCompanyIsCustom(in.CompanyName)
 	data := gconv.Int64(status)
 	return &pb.CompanyResp{
-		Status: data,
+		Status:     data,
+		IsCustomer: isCustomer,
 	}, nil
 }

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

@@ -151,3 +151,8 @@ func (s *BiServiceServer) MaterialSave(ctx context.Context, in *pb.MaterialSaveR
 	l := logic.NewMaterialSaveLogic(ctx, s.svcCtx)
 	return l.MaterialSave(in)
 }
+
+func (s *BiServiceServer) ClueTransfer(ctx context.Context, in *pb.ClueTransferReq) (*pb.BiResp, error) {
+	l := logic.NewClueTransferLogic(ctx, s.svcCtx)
+	return l.ClueTransfer(in)
+}

+ 193 - 106
rpc/pb/biService.pb.go

@@ -1578,7 +1578,8 @@ type CompanyResp struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Status int64 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
+	Status     int64 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
+	IsCustomer bool  `protobuf:"varint,2,opt,name=isCustomer,proto3" json:"isCustomer,omitempty"`
 }
 
 func (x *CompanyResp) Reset() {
@@ -1620,6 +1621,13 @@ func (x *CompanyResp) GetStatus() int64 {
 	return 0
 }
 
+func (x *CompanyResp) GetIsCustomer() bool {
+	if x != nil {
+		return x.IsCustomer
+	}
+	return false
+}
+
 type DistributeClueShowReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -2947,6 +2955,61 @@ func (x *MaterialSaveResp) GetUserIdArr() []string {
 	return nil
 }
 
+type ClueTransferReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ClueId   int64  `protobuf:"varint,1,opt,name=clueId,proto3" json:"clueId,omitempty"`
+	ClueName string `protobuf:"bytes,2,opt,name=clueName,proto3" json:"clueName,omitempty"`
+}
+
+func (x *ClueTransferReq) Reset() {
+	*x = ClueTransferReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[41]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ClueTransferReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ClueTransferReq) ProtoMessage() {}
+
+func (x *ClueTransferReq) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[41]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ClueTransferReq.ProtoReflect.Descriptor instead.
+func (*ClueTransferReq) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{41}
+}
+
+func (x *ClueTransferReq) GetClueId() int64 {
+	if x != nil {
+		return x.ClueId
+	}
+	return 0
+}
+
+func (x *ClueTransferReq) GetClueName() string {
+	if x != nil {
+		return x.ClueName
+	}
+	return ""
+}
+
 var File_biService_proto protoreflect.FileDescriptor
 
 var file_biService_proto_rawDesc = []byte{
@@ -3123,9 +3186,11 @@ var file_biService_proto_rawDesc = []byte{
 	0x74, 0x79, 0x70, 0x65, 0x22, 0x2e, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52,
 	0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x4e, 0x61, 0x6d,
 	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79,
-	0x4e, 0x61, 0x6d, 0x65, 0x22, 0x25, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52,
+	0x4e, 0x61, 0x6d, 0x65, 0x22, 0x45, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52,
 	0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xe3, 0x01, 0x0a, 0x15,
+	0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69,
+	0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
+	0x0a, 0x69, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x22, 0xe3, 0x01, 0x0a, 0x15,
 	0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68,
 	0x6f, 0x77, 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,
@@ -3300,80 +3365,87 @@ var file_biService_proto_rawDesc = []byte{
 	0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69,
 	0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x41, 0x72,
 	0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x41,
-	0x72, 0x72, 0x32, 0x89, 0x09, 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,
+	0x72, 0x72, 0x22, 0x45, 0x0a, 0x0f, 0x43, 0x6c, 0x75, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66,
+	0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a,
+	0x08, 0x63, 0x6c, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x08, 0x63, 0x6c, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xb4, 0x09, 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, 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, 0x28, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d,
-	0x6f, 0x6e, 0x4d, 0x61, 0x69, 0x6c, 0x12, 0x0c, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69,
-	0x6c, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30,
-	0x0a, 0x0d, 0x61, 0x64, 0x64, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12,
-	0x0e, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x1a,
-	0x0f, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
-	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, 0x12, 0x2a, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x64, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6e,
-	0x66, 0x6f, 0x12, 0x10, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x66,
-	0x6f, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x29,
-	0x0a, 0x0f, 0x67, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73,
-	0x74, 0x12, 0x0c, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a,
-	0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x33, 0x0a, 0x0c, 0x4d, 0x61, 0x74,
-	0x65, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x61, 0x76, 0x65, 0x12, 0x10, 0x2e, 0x4d, 0x61, 0x74, 0x65,
-	0x72, 0x69, 0x61, 0x6c, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x4d, 0x61,
-	0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06,
-	0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	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, 0x28, 0x0a, 0x0e, 0x73,
+	0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x61, 0x69, 0x6c, 0x12, 0x0c, 0x2e,
+	0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
+	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x41, 0x63, 0x63, 0x65,
+	0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x0e, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61,
+	0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61,
+	0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 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, 0x12, 0x2a, 0x0a, 0x0c, 0x66, 0x69, 0x6e,
+	0x64, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x2e, 0x46, 0x69, 0x6e, 0x64,
+	0x43, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
+	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x65,
+	0x49, 0x6e, 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0c, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49,
+	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79,
+	0x12, 0x33, 0x0a, 0x0c, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x61, 0x76, 0x65,
+	0x12, 0x10, 0x2e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x61, 0x76, 0x65, 0x52,
+	0x65, 0x71, 0x1a, 0x11, 0x2e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x53, 0x61, 0x76,
+	0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x65, 0x54, 0x72, 0x61,
+	0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x54, 0x72, 0x61, 0x6e,
+	0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x07, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x73, 0x70,
+	0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -3388,7 +3460,7 @@ func file_biService_proto_rawDescGZIP() []byte {
 	return file_biService_proto_rawDescData
 }
 
-var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 41)
+var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 42)
 var file_biService_proto_goTypes = []interface{}{
 	(*MyDataAssetReq)(nil),         // 0: MyDataAssetReq
 	(*MyDataAssetResp)(nil),        // 1: MyDataAssetResp
@@ -3431,6 +3503,7 @@ var file_biService_proto_goTypes = []interface{}{
 	(*ClueInfoReq)(nil),            // 38: ClueInfoReq
 	(*MaterialSaveReq)(nil),        // 39: MaterialSaveReq
 	(*MaterialSaveResp)(nil),       // 40: MaterialSaveResp
+	(*ClueTransferReq)(nil),        // 41: ClueTransferReq
 }
 var file_biService_proto_depIdxs = []int32{
 	2,  // 0: MyDataAssetResp.data:type_name -> MyDataAsset
@@ -3468,34 +3541,36 @@ var file_biService_proto_depIdxs = []int32{
 	37, // 32: BiService.findClueInfo:input_type -> FindClueInfoReq
 	38, // 33: BiService.getClueInfoList:input_type -> ClueInfoReq
 	39, // 34: BiService.MaterialSave:input_type -> MaterialSaveReq
-	1,  // 35: BiService.myDataAsset:output_type -> MyDataAssetResp
-	4,  // 36: BiService.addProject:output_type -> AddProjectResp
-	6,  // 37: BiService.getInfoId:output_type -> GetInfoIdResp
-	4,  // 38: BiService.drawClue:output_type -> AddProjectResp
-	9,  // 39: BiService.Call:output_type -> BiResp
-	4,  // 40: BiService.distributeClue:output_type -> AddProjectResp
-	14, // 41: BiService.clueImport:output_type -> ClueImportResp
-	4,  // 42: BiService.clueAdd:output_type -> AddProjectResp
-	14, // 43: BiService.clueImportTt:output_type -> ClueImportResp
-	14, // 44: BiService.autoFollow:output_type -> ClueImportResp
-	10, // 45: BiService.sqlManage:output_type -> BiReply
-	10, // 46: BiService.myInfo:output_type -> BiReply
-	10, // 47: BiService.allInfoExport:output_type -> BiReply
-	10, // 48: BiService.allProjectExport:output_type -> BiReply
-	10, // 49: BiService.infoOperate:output_type -> BiReply
-	23, // 50: BiService.getCompanyType:output_type -> CompanyResp
-	27, // 51: BiService.distributeClueShow:output_type -> DistributeClueShowResp
-	10, // 52: BiService.sendMail:output_type -> BiReply
-	10, // 53: BiService.upFile:output_type -> BiReply
-	10, // 54: BiService.sendCommonMail:output_type -> BiReply
-	32, // 55: BiService.addAcceptance:output_type -> AcceptanceResp
-	10, // 56: BiService.createClueByPhone:output_type -> BiReply
-	10, // 57: BiService.transferClueByPhone:output_type -> BiReply
-	10, // 58: BiService.findClueInfo:output_type -> BiReply
-	10, // 59: BiService.getClueInfoList:output_type -> BiReply
-	40, // 60: BiService.MaterialSave:output_type -> MaterialSaveResp
-	35, // [35:61] is the sub-list for method output_type
-	9,  // [9:35] is the sub-list for method input_type
+	41, // 35: BiService.clueTransfer:input_type -> ClueTransferReq
+	1,  // 36: BiService.myDataAsset:output_type -> MyDataAssetResp
+	4,  // 37: BiService.addProject:output_type -> AddProjectResp
+	6,  // 38: BiService.getInfoId:output_type -> GetInfoIdResp
+	4,  // 39: BiService.drawClue:output_type -> AddProjectResp
+	9,  // 40: BiService.Call:output_type -> BiResp
+	4,  // 41: BiService.distributeClue:output_type -> AddProjectResp
+	14, // 42: BiService.clueImport:output_type -> ClueImportResp
+	4,  // 43: BiService.clueAdd:output_type -> AddProjectResp
+	14, // 44: BiService.clueImportTt:output_type -> ClueImportResp
+	14, // 45: BiService.autoFollow:output_type -> ClueImportResp
+	10, // 46: BiService.sqlManage:output_type -> BiReply
+	10, // 47: BiService.myInfo:output_type -> BiReply
+	10, // 48: BiService.allInfoExport:output_type -> BiReply
+	10, // 49: BiService.allProjectExport:output_type -> BiReply
+	10, // 50: BiService.infoOperate:output_type -> BiReply
+	23, // 51: BiService.getCompanyType:output_type -> CompanyResp
+	27, // 52: BiService.distributeClueShow:output_type -> DistributeClueShowResp
+	10, // 53: BiService.sendMail:output_type -> BiReply
+	10, // 54: BiService.upFile:output_type -> BiReply
+	10, // 55: BiService.sendCommonMail:output_type -> BiReply
+	32, // 56: BiService.addAcceptance:output_type -> AcceptanceResp
+	10, // 57: BiService.createClueByPhone:output_type -> BiReply
+	10, // 58: BiService.transferClueByPhone:output_type -> BiReply
+	10, // 59: BiService.findClueInfo:output_type -> BiReply
+	10, // 60: BiService.getClueInfoList:output_type -> BiReply
+	40, // 61: BiService.MaterialSave:output_type -> MaterialSaveResp
+	9,  // 62: BiService.clueTransfer:output_type -> BiResp
+	36, // [36:63] is the sub-list for method output_type
+	9,  // [9:36] is the sub-list for method input_type
 	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
@@ -3999,6 +4074,18 @@ func file_biService_proto_init() {
 				return nil
 			}
 		}
+		file_biService_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ClueTransferReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -4006,7 +4093,7 @@ func file_biService_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_biService_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   41,
+			NumMessages:   42,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

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

@@ -48,6 +48,7 @@ type BiServiceClient interface {
 	FindClueInfo(ctx context.Context, in *FindClueInfoReq, opts ...grpc.CallOption) (*BiReply, error)
 	GetClueInfoList(ctx context.Context, in *ClueInfoReq, opts ...grpc.CallOption) (*BiReply, error)
 	MaterialSave(ctx context.Context, in *MaterialSaveReq, opts ...grpc.CallOption) (*MaterialSaveResp, error)
+	ClueTransfer(ctx context.Context, in *ClueTransferReq, opts ...grpc.CallOption) (*BiResp, error)
 }
 
 type biServiceClient struct {
@@ -292,6 +293,15 @@ func (c *biServiceClient) MaterialSave(ctx context.Context, in *MaterialSaveReq,
 	return out, nil
 }
 
+func (c *biServiceClient) ClueTransfer(ctx context.Context, in *ClueTransferReq, opts ...grpc.CallOption) (*BiResp, error) {
+	out := new(BiResp)
+	err := c.cc.Invoke(ctx, "/BiService/clueTransfer", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // BiServiceServer is the server API for BiService service.
 // All implementations must embed UnimplementedBiServiceServer
 // for forward compatibility
@@ -322,6 +332,7 @@ type BiServiceServer interface {
 	FindClueInfo(context.Context, *FindClueInfoReq) (*BiReply, error)
 	GetClueInfoList(context.Context, *ClueInfoReq) (*BiReply, error)
 	MaterialSave(context.Context, *MaterialSaveReq) (*MaterialSaveResp, error)
+	ClueTransfer(context.Context, *ClueTransferReq) (*BiResp, error)
 	mustEmbedUnimplementedBiServiceServer()
 }
 
@@ -407,6 +418,9 @@ func (UnimplementedBiServiceServer) GetClueInfoList(context.Context, *ClueInfoRe
 func (UnimplementedBiServiceServer) MaterialSave(context.Context, *MaterialSaveReq) (*MaterialSaveResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method MaterialSave not implemented")
 }
+func (UnimplementedBiServiceServer) ClueTransfer(context.Context, *ClueTransferReq) (*BiResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method ClueTransfer not implemented")
+}
 func (UnimplementedBiServiceServer) mustEmbedUnimplementedBiServiceServer() {}
 
 // UnsafeBiServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -888,6 +902,24 @@ func _BiService_MaterialSave_Handler(srv interface{}, ctx context.Context, dec f
 	return interceptor(ctx, in, info, handler)
 }
 
+func _BiService_ClueTransfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ClueTransferReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BiServiceServer).ClueTransfer(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/BiService/clueTransfer",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BiServiceServer).ClueTransfer(ctx, req.(*ClueTransferReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // BiService_ServiceDesc is the grpc.ServiceDesc for BiService service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -999,6 +1031,10 @@ var BiService_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "MaterialSave",
 			Handler:    _BiService_MaterialSave_Handler,
 		},
+		{
+			MethodName: "clueTransfer",
+			Handler:    _BiService_ClueTransfer_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "biService.proto",

+ 112 - 0
service/custom.go

@@ -0,0 +1,112 @@
+package service
+
+import (
+	"app.yhyue.com/moapp/jybase/common"
+	"bp.jydev.jianyu360.cn/BaseService/biService/entity"
+	"database/sql"
+	"errors"
+	"go.mongodb.org/mongo-driver/bson"
+	"time"
+)
+
+func RelatedCompanyIsCustom(companyName string) bool {
+	if companyName == "" {
+		return false
+	}
+	return entity.JyBiTidb.CountBySql("SELECT count(1) FROM dwd_f_csm_customer_info WHERE company_name = ? and account_type= 1", companyName) > 0
+}
+
+// 电销系统修改线索名称移交客成
+func ClueTransfer(clueId int64, clueName string) (status int, err error) {
+	//clueData := entity.JyBiTidb.FindOne("dwd_f_crm_clue_info", bson.M{"id": clueId}, "cluename", "")
+	//if clueData == nil || len(*clueData) == 0 {
+	//	return -1, errors.New("未查询到线索信息")
+	//}
+	//clueName := common.InterfaceToStr((*clueData)["cluename"])
+	//查询关联客户客成信息
+	relatedData := entity.JyBiTidb.FindOne("dwd_f_csm_customer_info", bson.M{"company_name": clueName, "account_type": 1, "is_transfer": 0}, "id,position_id,name,ent_id,company_name", "")
+	if relatedData == nil || len(*relatedData) == 0 {
+		return -1, errors.New("未查询到关联客户信息")
+	}
+	positionId := common.Int64All((*relatedData)["position_id"])
+	name := common.InterfaceToStr((*relatedData)["name"]) //客成经理名称
+	entId := common.Int64All((*relatedData)["ent_id"])
+	cusId := common.Int64All((*relatedData)["id"])
+
+	nowTime := time.Now().Format("2006-01-02 15:04:05")
+	//判断之前该线索是否移交过客成
+	cusData := entity.JyBiTidb.FindOne("dwd_f_csm_customer_info", bson.M{"clue_id": clueId}, "is_transfer", "")
+	if cusData != nil && len(*cusData) > 0 { //该线索曾经移交过客成
+		if common.IntAll((*cusData)["is_transfer"]) == 0 {
+			return 1, nil
+		} else {
+			up1 := entity.JyBiTidb.Update("dwd_f_csm_customer_info", map[string]interface{}{"clue_id": clueId}, bson.M{
+				"is_transfer":           0,
+				"is_renewal_protection": 0,
+				"transfertime":          nowTime,
+				"ent_id":                entId,
+				"company_name":          clueName,
+				"position_id":           positionId,
+				"name":                  name,
+				"is_admin":              0,
+				"primary_id":            cusId,
+				"account_type":          4,
+			})
+			in := entity.JyBiTidb.Insert("dwd_f_crm_clue_change_record", map[string]interface{}{
+				"clue_id":       clueId,
+				"position_id":   positionId,
+				"change_type":   "成交客户移交",
+				"new_value":     "移交至客户成功部",
+				"createtime":    nowTime,
+				"BCPCID":        common.GetRandom(32),
+				"operator_id":   -1,
+				"change_reason": "与主账号线索名称保持一致",
+			})
+			up2 := entity.JyBiTidb.Update("dwd_f_crm_clue_info", bson.M{"id": clueId}, map[string]interface{}{"is_transfer": 1, "updatetime": nowTime})
+			if up1 && up2 && in > 0 {
+				return 1, nil
+			}
+			return -1, errors.New("更新客成信息出错")
+		}
+	} else {
+		saveMap := map[string]interface{}{
+			"clue_id":                   clueId,
+			"transfertime":              nowTime,
+			"position_id":               positionId,
+			"name":                      name,
+			"ent_id":                    entId,
+			"is_task":                   1,
+			"tasktime":                  nowTime,
+			"taskstatus":                0,
+			"tasksource":                "1",
+			"is_admin":                  0,
+			"relationship_building_way": 1,
+			"inventory_way":             1,
+			"training_way":              1,
+			"is_pre_sales_training":     0,
+			"service_stage":             1,
+			"company_name":              clueName,
+			"primary_id":                cusId,
+			"account_type":              4,
+		}
+		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})
+			updateId1 = entity.JyBiTidb.InsertByTx(tx, "dwd_f_crm_clue_change_record", map[string]interface{}{
+				"clue_id":       clueId,
+				"position_id":   positionId,
+				"change_type":   "成交客户移交",
+				"new_value":     "移交至客户成功部",
+				"createtime":    nowTime,
+				"BCPCID":        common.GetRandom(32),
+				"operator_id":   -1,
+				"change_reason": "与主账号线索名称保持一致",
+			})
+			return cId > -1 && ok && updateId1 > -1
+		}) {
+			return 1, nil
+		}
+		return -1, errors.New("移交客成失败")
+	}
+}