xuzhiheng 2 жил өмнө
parent
commit
7d9601f799

+ 2 - 1
rpc/biService.proto

@@ -65,12 +65,13 @@ message Resp{
 	int64 error_code = 1;
 	int64 error_code = 1;
 	string error_msg = 2;
 	string error_msg = 2;
 	int64 status =3;
 	int64 status =3;
+	int64 count = 4;
 }
 }
 
 
 service BiService {
 service BiService {
 	rpc myDataAsset (MyDataAssetReq) returns (MyDataAssetResp); //我的数据资产
 	rpc myDataAsset (MyDataAssetReq) returns (MyDataAssetResp); //我的数据资产
 	rpc addProject (AddProjectReq) returns (AddProjectResp); //添加项目
 	rpc addProject (AddProjectReq) returns (AddProjectResp); //添加项目
 	rpc getInfoId (AddProjectReq) returns (GetInfoIdResp); //获取添加过项目的信息id
 	rpc getInfoId (AddProjectReq) returns (GetInfoIdResp); //获取添加过项目的信息id
-	rpc drawClue (drawClueReq) returns (AddProjectResp); //领取线索
+	rpc drawClue (drawClueReq) returns (Resp); //领取线索
 	rpc Call (CallReq) returns (Resp); //外呼集成
 	rpc Call (CallReq) returns (Resp); //外呼集成
 }
 }

+ 2 - 2
rpc/biservice/biservice.go

@@ -28,7 +28,7 @@ type (
 		MyDataAsset(ctx context.Context, in *MyDataAssetReq, opts ...grpc.CallOption) (*MyDataAssetResp, error)
 		MyDataAsset(ctx context.Context, in *MyDataAssetReq, opts ...grpc.CallOption) (*MyDataAssetResp, error)
 		AddProject(ctx context.Context, in *AddProjectReq, opts ...grpc.CallOption) (*AddProjectResp, error)
 		AddProject(ctx context.Context, in *AddProjectReq, opts ...grpc.CallOption) (*AddProjectResp, error)
 		GetInfoId(ctx context.Context, in *AddProjectReq, opts ...grpc.CallOption) (*GetInfoIdResp, error)
 		GetInfoId(ctx context.Context, in *AddProjectReq, opts ...grpc.CallOption) (*GetInfoIdResp, error)
-		DrawClue(ctx context.Context, in *DrawClueReq, opts ...grpc.CallOption) (*AddProjectResp, error)
+		DrawClue(ctx context.Context, in *DrawClueReq, opts ...grpc.CallOption) (*Resp, error)
 		Call(ctx context.Context, in *CallReq, opts ...grpc.CallOption) (*Resp, error)
 		Call(ctx context.Context, in *CallReq, opts ...grpc.CallOption) (*Resp, error)
 	}
 	}
 
 
@@ -58,7 +58,7 @@ func (m *defaultBiService) GetInfoId(ctx context.Context, in *AddProjectReq, opt
 	return client.GetInfoId(ctx, in, opts...)
 	return client.GetInfoId(ctx, in, opts...)
 }
 }
 
 
-func (m *defaultBiService) DrawClue(ctx context.Context, in *DrawClueReq, opts ...grpc.CallOption) (*AddProjectResp, error) {
+func (m *defaultBiService) DrawClue(ctx context.Context, in *DrawClueReq, opts ...grpc.CallOption) (*Resp, error) {
 	client := pb.NewBiServiceClient(m.cli.Conn())
 	client := pb.NewBiServiceClient(m.cli.Conn())
 	return client.DrawClue(ctx, in, opts...)
 	return client.DrawClue(ctx, in, opts...)
 }
 }

+ 1 - 1
rpc/internal/logic/drawcluelogic.go

@@ -23,7 +23,7 @@ func NewDrawClueLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DrawClue
 	}
 	}
 }
 }
 
 
-func (l *DrawClueLogic) DrawClue(in *pb.DrawClueReq) (*pb.AddProjectResp, error) {
+func (l *DrawClueLogic) DrawClue(in *pb.DrawClueReq) (*pb.Resp, error) {
 	// todo: add your logic here and delete this line
 	// todo: add your logic here and delete this line
 
 
 	return service.DrawClue(in), nil
 	return service.DrawClue(in), nil

+ 1 - 1
rpc/internal/server/biserviceserver.go

@@ -37,7 +37,7 @@ func (s *BiServiceServer) GetInfoId(ctx context.Context, in *pb.AddProjectReq) (
 	return l.GetInfoId(in)
 	return l.GetInfoId(in)
 }
 }
 
 
-func (s *BiServiceServer) DrawClue(ctx context.Context, in *pb.DrawClueReq) (*pb.AddProjectResp, error) {
+func (s *BiServiceServer) DrawClue(ctx context.Context, in *pb.DrawClueReq) (*pb.Resp, error) {
 	l := logic.NewDrawClueLogic(ctx, s.svcCtx)
 	l := logic.NewDrawClueLogic(ctx, s.svcCtx)
 	return l.DrawClue(in)
 	return l.DrawClue(in)
 }
 }

+ 27 - 18
rpc/pb/biService.pb.go

@@ -635,6 +635,7 @@ type Resp struct {
 	ErrorCode int64  `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
 	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"`
 	ErrorMsg  string `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`
 	Status    int64  `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
 	Status    int64  `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
+	Count     int64  `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
 }
 }
 
 
 func (x *Resp) Reset() {
 func (x *Resp) Reset() {
@@ -690,6 +691,13 @@ func (x *Resp) GetStatus() int64 {
 	return 0
 	return 0
 }
 }
 
 
+func (x *Resp) GetCount() int64 {
+	if x != nil {
+		return x.Count
+	}
+	return 0
+}
+
 var File_biService_proto protoreflect.FileDescriptor
 var File_biService_proto protoreflect.FileDescriptor
 
 
 var file_biService_proto_rawDesc = []byte{
 var file_biService_proto_rawDesc = []byte{
@@ -766,27 +774,28 @@ var file_biService_proto_rawDesc = []byte{
 	0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
 	0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
 	0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a,
 	0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a,
 	0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68,
 	0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68,
-	0x6f, 0x6e, 0x65, 0x22, 0x5a, 0x0a, 0x04, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65,
+	0x6f, 0x6e, 0x65, 0x22, 0x70, 0x0a, 0x04, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65,
 	0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
 	0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
 	0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72,
 	0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72,
 	0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65,
 	0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65,
 	0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
 	0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
-	0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32,
-	0xdd, 0x01, 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, 0x64, 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, 0x17, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x08,
-	0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x42,
-	0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
+	0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
+	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xd3, 0x01, 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, 0x1f, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6c, 0x75, 0x65, 0x12, 0x0c, 0x2e,
+	0x64, 0x72, 0x61, 0x77, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x17, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x08, 0x2e, 0x43, 0x61, 0x6c,
+	0x6c, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e,
+	0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 }
 
 
 var (
 var (
@@ -825,7 +834,7 @@ var file_biService_proto_depIdxs = []int32{
 	1, // 7: BiService.myDataAsset:output_type -> MyDataAssetResp
 	1, // 7: BiService.myDataAsset:output_type -> MyDataAssetResp
 	4, // 8: BiService.addProject:output_type -> AddProjectResp
 	4, // 8: BiService.addProject:output_type -> AddProjectResp
 	6, // 9: BiService.getInfoId:output_type -> GetInfoIdResp
 	6, // 9: BiService.getInfoId:output_type -> GetInfoIdResp
-	4, // 10: BiService.drawClue:output_type -> AddProjectResp
+	9, // 10: BiService.drawClue:output_type -> Resp
 	9, // 11: BiService.Call:output_type -> Resp
 	9, // 11: BiService.Call:output_type -> Resp
 	7, // [7:12] is the sub-list for method output_type
 	7, // [7:12] is the sub-list for method output_type
 	2, // [2:7] is the sub-list for method input_type
 	2, // [2:7] is the sub-list for method input_type

+ 5 - 5
rpc/pb/biService_grpc.pb.go

@@ -33,7 +33,7 @@ type BiServiceClient interface {
 	MyDataAsset(ctx context.Context, in *MyDataAssetReq, opts ...grpc.CallOption) (*MyDataAssetResp, error)
 	MyDataAsset(ctx context.Context, in *MyDataAssetReq, opts ...grpc.CallOption) (*MyDataAssetResp, error)
 	AddProject(ctx context.Context, in *AddProjectReq, opts ...grpc.CallOption) (*AddProjectResp, error)
 	AddProject(ctx context.Context, in *AddProjectReq, opts ...grpc.CallOption) (*AddProjectResp, error)
 	GetInfoId(ctx context.Context, in *AddProjectReq, opts ...grpc.CallOption) (*GetInfoIdResp, error)
 	GetInfoId(ctx context.Context, in *AddProjectReq, opts ...grpc.CallOption) (*GetInfoIdResp, error)
-	DrawClue(ctx context.Context, in *DrawClueReq, opts ...grpc.CallOption) (*AddProjectResp, error)
+	DrawClue(ctx context.Context, in *DrawClueReq, opts ...grpc.CallOption) (*Resp, error)
 	Call(ctx context.Context, in *CallReq, opts ...grpc.CallOption) (*Resp, error)
 	Call(ctx context.Context, in *CallReq, opts ...grpc.CallOption) (*Resp, error)
 }
 }
 
 
@@ -72,8 +72,8 @@ func (c *biServiceClient) GetInfoId(ctx context.Context, in *AddProjectReq, opts
 	return out, nil
 	return out, nil
 }
 }
 
 
-func (c *biServiceClient) DrawClue(ctx context.Context, in *DrawClueReq, opts ...grpc.CallOption) (*AddProjectResp, error) {
-	out := new(AddProjectResp)
+func (c *biServiceClient) DrawClue(ctx context.Context, in *DrawClueReq, opts ...grpc.CallOption) (*Resp, error) {
+	out := new(Resp)
 	err := c.cc.Invoke(ctx, BiService_DrawClue_FullMethodName, in, out, opts...)
 	err := c.cc.Invoke(ctx, BiService_DrawClue_FullMethodName, in, out, opts...)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err
@@ -97,7 +97,7 @@ type BiServiceServer interface {
 	MyDataAsset(context.Context, *MyDataAssetReq) (*MyDataAssetResp, error)
 	MyDataAsset(context.Context, *MyDataAssetReq) (*MyDataAssetResp, error)
 	AddProject(context.Context, *AddProjectReq) (*AddProjectResp, error)
 	AddProject(context.Context, *AddProjectReq) (*AddProjectResp, error)
 	GetInfoId(context.Context, *AddProjectReq) (*GetInfoIdResp, error)
 	GetInfoId(context.Context, *AddProjectReq) (*GetInfoIdResp, error)
-	DrawClue(context.Context, *DrawClueReq) (*AddProjectResp, error)
+	DrawClue(context.Context, *DrawClueReq) (*Resp, error)
 	Call(context.Context, *CallReq) (*Resp, error)
 	Call(context.Context, *CallReq) (*Resp, error)
 	mustEmbedUnimplementedBiServiceServer()
 	mustEmbedUnimplementedBiServiceServer()
 }
 }
@@ -115,7 +115,7 @@ func (UnimplementedBiServiceServer) AddProject(context.Context, *AddProjectReq)
 func (UnimplementedBiServiceServer) GetInfoId(context.Context, *AddProjectReq) (*GetInfoIdResp, error) {
 func (UnimplementedBiServiceServer) GetInfoId(context.Context, *AddProjectReq) (*GetInfoIdResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetInfoId not implemented")
 	return nil, status.Errorf(codes.Unimplemented, "method GetInfoId not implemented")
 }
 }
-func (UnimplementedBiServiceServer) DrawClue(context.Context, *DrawClueReq) (*AddProjectResp, error) {
+func (UnimplementedBiServiceServer) DrawClue(context.Context, *DrawClueReq) (*Resp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method DrawClue not implemented")
 	return nil, status.Errorf(codes.Unimplemented, "method DrawClue not implemented")
 }
 }
 func (UnimplementedBiServiceServer) Call(context.Context, *CallReq) (*Resp, error) {
 func (UnimplementedBiServiceServer) Call(context.Context, *CallReq) (*Resp, error) {

+ 13 - 8
service/clue.go

@@ -11,7 +11,7 @@ import (
 	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
 	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
 )
 )
 
 
-func DrawClue(this *biservice.DrawClueReq) *biservice.AddProjectResp {
+func DrawClue(this *biservice.DrawClueReq) *biservice.Resp {
 	count1 := JyBiTidb.Count("dwd_f_crm_open_sea", map[string]interface{}{"level": 1})
 	count1 := JyBiTidb.Count("dwd_f_crm_open_sea", map[string]interface{}{"level": 1})
 	count2 := JyBiTidb.Count("dwd_f_crm_open_sea", map[string]interface{}{"level": 2})
 	count2 := JyBiTidb.Count("dwd_f_crm_open_sea", map[string]interface{}{"level": 2})
 	// count3 := JyBiTidb.Count("dwd_f_crm_open_sea", map[string]interface{}{"level": 3})
 	// count3 := JyBiTidb.Count("dwd_f_crm_open_sea", map[string]interface{}{"level": 3})
@@ -30,23 +30,24 @@ func DrawClue(this *biservice.DrawClueReq) *biservice.AddProjectResp {
 	}
 	}
 	if counts1 > count1 {
 	if counts1 > count1 {
 		counts2 += counts1 - count1
 		counts2 += counts1 - count1
+		counts1 = count1
 	}
 	}
 	if counts2 > count2 {
 	if counts2 > count2 {
 		counts3 += counts2 - count2
 		counts3 += counts2 - count2
+		counts2 = count2
 	}
 	}
 	log.Println(count1, count2)
 	log.Println(count1, count2)
 	log.Println(counts1, counts2, counts3)
 	log.Println(counts1, counts2, counts3)
-	DrawClues(this.PositionId, counts1, counts2, counts3)
-	return &biservice.AddProjectResp{
+	count := DrawClues(this.PositionId, counts1, counts2, counts3)
+	return &biservice.Resp{
 		ErrorCode: 0,
 		ErrorCode: 0,
-		Data: &biservice.AddProject{
-			Status: 1,
-		},
+		Status:    1,
+		Count:     int64(count),
 	}
 	}
 }
 }
 
 
-func DrawClues(positionId, count1, count2, count3 int64) {
-	data1, data2, data3 := &[]map[string]interface{}{}, &[]map[string]interface{}{}, &[]map[string]interface{}{}
+func DrawClues(positionId, count1, count2, count3 int64) int {
+	data1, data2, data3, count := &[]map[string]interface{}{}, &[]map[string]interface{}{}, &[]map[string]interface{}{}, 0
 	if count1 > 0 {
 	if count1 > 0 {
 		data1 = JyBiTidb.Find("dwd_f_crm_open_sea", map[string]interface{}{"level": 1}, "", "", 0, int(count1))
 		data1 = JyBiTidb.Find("dwd_f_crm_open_sea", map[string]interface{}{"level": 1}, "", "", 0, int(count1))
 	}
 	}
@@ -59,6 +60,7 @@ func DrawClues(positionId, count1, count2, count3 int64) {
 	nowTime := time.Now().Format("2006-01-02 15:04:05")
 	nowTime := time.Now().Format("2006-01-02 15:04:05")
 	seatNumber, name := getSeatNumber(positionId)
 	seatNumber, name := getSeatNumber(positionId)
 	if data1 != nil && len(*data1) > 0 {
 	if data1 != nil && len(*data1) > 0 {
+		count += len(*data1)
 		for _, v := range *data1 {
 		for _, v := range *data1 {
 			//update postionid and update record
 			//update postionid and update record
 			clueId := common.Int64All(v["clue_id"])
 			clueId := common.Int64All(v["clue_id"])
@@ -114,6 +116,7 @@ func DrawClues(positionId, count1, count2, count3 int64) {
 		}
 		}
 	}
 	}
 	if data2 != nil && len(*data2) > 0 {
 	if data2 != nil && len(*data2) > 0 {
+		count += len(*data2)
 		for _, v := range *data2 {
 		for _, v := range *data2 {
 			clueId := common.Int64All(v["clue_id"])
 			clueId := common.Int64All(v["clue_id"])
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
@@ -164,6 +167,7 @@ func DrawClues(positionId, count1, count2, count3 int64) {
 		}
 		}
 	}
 	}
 	if data3 != nil && len(*data3) > 0 {
 	if data3 != nil && len(*data3) > 0 {
+		count += len(*data3)
 		for _, v := range *data3 {
 		for _, v := range *data3 {
 			clueId := common.Int64All(v["clue_id"])
 			clueId := common.Int64All(v["clue_id"])
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
 			if JyBiMysql.ExecTx("领取线索等", func(tx *sql.Tx) bool {
@@ -213,6 +217,7 @@ func DrawClues(positionId, count1, count2, count3 int64) {
 			}
 			}
 		}
 		}
 	}
 	}
+	return count
 }
 }
 
 
 func getSeatNumber(positionId int64) (seatNumber, name string) {
 func getSeatNumber(positionId int64) (seatNumber, name string) {