Browse Source

fenzhihebing

lianbingjie 1 year ago
parent
commit
3e0fff9398

+ 24 - 0
api/biService.api

@@ -81,12 +81,23 @@ type (
 		Bid string `json:"bid,optional"`
 		Sid string `json:"sid"`
 	}
+<<<<<<< HEAD
 	ResEmpowerReq {
 		EntId        int64  `header:"entId"`
 		ReqType      int64  `json:"reqType"`
 		FunctionCode string `json:"functionCode"`
 		EntUserId    string `json:"entUserId"`
 		PositionId   string `json:"positionId"`
+=======
+	ExportReq {
+		Mail       string   `json:"mail"`
+		Mapping    []string `json:"mapping"`
+		PositionId int64    `header:"positionId,optional"`
+	}
+	OperateReq {
+		NewId string `json:"newId"`
+		Type  int64  `json:"type"`
+>>>>>>> master
 	}
 )
 
@@ -116,8 +127,21 @@ service biService-api {
 	post /biService/sqlManage (SqlManageReq) returns (biResp)
 	@doc "用户身份"
 	@handler Myinfo
+<<<<<<< HEAD
 	post /biService/myInfo (MyInfoReq) returns (biResp)
 	@doc "资源中台授权"
 	@handler ResEmpower
 	post /biService/resEmpower (ResEmpowerReq) returns (biResp)
+=======
+	post /biService/myInfo (MyInfoReq) returns (resp)
+	@doc "项目全量导出"
+	@handler allProjectExport
+	post /biService/allProjectExport (ExportReq) returns (resp)
+	@doc "资讯全量导出"
+	@handler allInfoExport
+	post /biService/allInfoExport (ExportReq) returns (resp)
+	@doc "资讯操作"
+	@handler infoOperate
+	post /biService/infoOperate (OperateReq) returns (resp)
+>>>>>>> master
 }

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

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

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

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

@@ -74,8 +74,23 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 			{
 				Method:  http.MethodPost,
+<<<<<<< HEAD
 				Path:    "/biService/resEmpower",
 				Handler: ResEmpowerHandler(serverCtx),
+=======
+				Path:    "/biService/allProjectExport",
+				Handler: allProjectExportHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/allInfoExport",
+				Handler: allInfoExportHandler(serverCtx),
+			},
+			{
+				Method:  http.MethodPost,
+				Path:    "/biService/infoOperate",
+				Handler: infoOperateHandler(serverCtx),
+>>>>>>> master
 			},
 		},
 	)

+ 35 - 0
api/internal/logic/allinfoexportlogic.go

@@ -0,0 +1,35 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
+	"context"
+
+	"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 AllInfoExportLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewAllInfoExportLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AllInfoExportLogic {
+	return &AllInfoExportLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *AllInfoExportLogic) AllInfoExport(req *types.ExportReq) (resp *types.Resp, err error) {
+	// todo: add your logic here and delete this line
+	res, err := l.svcCtx.BiServiceRpc.AllInfoExport(l.ctx, &biservice.ExportReq{
+		Mail:       req.Mail,
+		Mapping:    req.Mapping,
+		PositionId: req.PositionId,
+	})
+	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg}, err
+}

+ 35 - 0
api/internal/logic/allprojectexportlogic.go

@@ -0,0 +1,35 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
+	"context"
+
+	"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 AllProjectExportLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewAllProjectExportLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AllProjectExportLogic {
+	return &AllProjectExportLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *AllProjectExportLogic) AllProjectExport(req *types.ExportReq) (resp *types.Resp, err error) {
+	// todo: add your logic here and delete this line
+	res, err := l.svcCtx.BiServiceRpc.AllProjectExport(l.ctx, &biservice.ExportReq{
+		Mail:       req.Mail,
+		Mapping:    req.Mapping,
+		PositionId: req.PositionId,
+	})
+	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg}, err
+}

+ 34 - 0
api/internal/logic/infooperatelogic.go

@@ -0,0 +1,34 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
+	"context"
+
+	"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 InfoOperateLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewInfoOperateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InfoOperateLogic {
+	return &InfoOperateLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *InfoOperateLogic) InfoOperate(req *types.OperateReq) (resp *types.Resp, err error) {
+	// todo: add your logic here and delete this line
+	res, err := l.svcCtx.BiServiceRpc.InfoOperate(l.ctx, &biservice.OperateReq{
+		NewId: req.NewId,
+		Type:  req.Type,
+	})
+	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+}

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

@@ -85,10 +85,22 @@ type MyInfoReq struct {
 	Sid string `json:"sid"`
 }
 
+<<<<<<< HEAD
 type ResEmpowerReq struct {
 	EntId        int64  `header:"entId"`
 	ReqType      int64  `json:"reqType"`
 	FunctionCode string `json:"functionCode"`
 	EntUserId    string `json:"entUserId"`
 	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"`
+>>>>>>> master
 }

+ 29 - 2
entity/entity.go

@@ -1,6 +1,7 @@
 package entity
 
 import (
+	"app.yhyue.com/moapp/jybase/mail"
 	"log"
 	"strings"
 
@@ -46,7 +47,12 @@ var (
 		"07": "待签署客户",
 		"08": "成交客户",
 	}
-	PublicKey = ""
+	PublicKey        = ""
+	GmailAuth        []*mail.GmailAuth
+	UpdataProjectUrl string
+	ExportDirectory  string
+	ExportUrl        string
+	ExportCount      int
 )
 
 type HlyjS struct {
@@ -62,6 +68,22 @@ type HlyjS struct {
 type Handler struct {
 }
 
+func InitMail(GmailAuthArr []struct {
+	Addr string
+	Port int
+	Pwd  string
+	User string
+}) {
+	for _, v := range GmailAuthArr {
+		mail1 := &mail.GmailAuth{
+			SmtpHost: v.Addr,
+			SmtpPort: v.Port,
+			User:     v.User,
+			Pwd:      v.Pwd,
+		}
+		GmailAuth = append(GmailAuth, mail1)
+	}
+}
 func InitMysql(n, x, y, z, s, m, a *mysql.Mysql) {
 	JyMysql = &mysql.Mysql{
 		Address:      n.Address,
@@ -202,12 +224,17 @@ func (h *Handler) HandleMessage(m *nsq.Message) error {
 	}
 	return nil
 }
+func InitConfig(directory, projectUrl, exportUrl string, count int) {
+	ExportDirectory = directory
+	UpdataProjectUrl = projectUrl
+	ExportUrl = exportUrl
+	ExportCount = count
+}
 
 // 初始化reidis
 func InitRedis(redisAddr []string) {
 	redis.InitRedisBySize(strings.Join(redisAddr, ","), 100, 30, 300)
 }
-
 func GetHlyj(appid, account, secret, tokenUrl, callUrl, integratedid string, callFlag int) {
 	Hlyj = &HlyjS{
 		Appid:        appid,

+ 46 - 0
go.mod

@@ -10,9 +10,16 @@ require (
 	github.com/gogf/gf/v2 v2.0.6
 	github.com/nsqio/go-nsq v1.1.0
 	github.com/tjfoc/gmsm v1.4.1
+<<<<<<< HEAD
 	github.com/zeromicro/go-zero v1.5.2
 	google.golang.org/grpc v1.55.0
 	google.golang.org/protobuf v1.30.0
+=======
+	github.com/xuri/excelize/v2 v2.8.0
+	github.com/zeromicro/go-zero v1.3.5
+	google.golang.org/grpc v1.51.0
+	google.golang.org/protobuf v1.28.1
+>>>>>>> master
 )
 
 require (
@@ -65,6 +72,7 @@ require (
 	github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
 	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
 	github.com/modern-go/reflect2 v1.0.2 // indirect
+	github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
 	github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
 	github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
 	github.com/olekukonko/tablewriter v0.0.5 // indirect
@@ -73,16 +81,28 @@ require (
 	github.com/openzipkin/zipkin-go v0.4.1 // indirect
 	github.com/pelletier/go-toml/v2 v2.0.7 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
+<<<<<<< HEAD
 	github.com/prometheus/client_golang v1.15.0 // indirect
 	github.com/prometheus/client_model v0.3.0 // indirect
 	github.com/prometheus/common v0.42.0 // indirect
 	github.com/prometheus/procfs v0.9.0 // indirect
+=======
+	github.com/prometheus/client_golang v1.13.0 // indirect
+	github.com/prometheus/client_model v0.2.0 // indirect
+	github.com/prometheus/common v0.37.0 // indirect
+	github.com/prometheus/procfs v0.8.0 // indirect
+	github.com/richardlehane/mscfb v1.0.4 // indirect
+	github.com/richardlehane/msoleps v1.0.3 // indirect
+>>>>>>> master
 	github.com/rivo/uniseg v0.2.0 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
 	github.com/xdg-go/pbkdf2 v1.0.0 // indirect
 	github.com/xdg-go/scram v1.1.1 // indirect
 	github.com/xdg-go/stringprep v1.0.3 // indirect
+	github.com/xuri/efp v0.0.0-20230802181842-ad255f2331ca // indirect
+	github.com/xuri/nfp v0.0.0-20230819163627-dc951e3ffe1a // indirect
 	github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
+<<<<<<< HEAD
 	go.etcd.io/etcd/api/v3 v3.5.8 // indirect
 	go.etcd.io/etcd/client/pkg/v3 v3.5.8 // indirect
 	go.etcd.io/etcd/client/v3 v3.5.8 // indirect
@@ -111,6 +131,32 @@ require (
 	golang.org/x/time v0.3.0 // indirect
 	google.golang.org/appengine v1.6.7 // indirect
 	google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
+=======
+	go.etcd.io/etcd/api/v3 v3.5.5 // indirect
+	go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
+	go.etcd.io/etcd/client/v3 v3.5.5 // indirect
+	go.mongodb.org/mongo-driver v1.10.3 // indirect
+	go.opentelemetry.io/otel v1.11.0 // indirect
+	go.opentelemetry.io/otel/exporters/jaeger v1.11.0 // indirect
+	go.opentelemetry.io/otel/exporters/zipkin v1.11.0 // indirect
+	go.opentelemetry.io/otel/sdk v1.11.0 // indirect
+	go.opentelemetry.io/otel/trace v1.11.0 // indirect
+	go.uber.org/atomic v1.9.0 // indirect
+	go.uber.org/automaxprocs v1.5.1 // indirect
+	go.uber.org/multierr v1.8.0 // indirect
+	go.uber.org/zap v1.21.0 // indirect
+	golang.org/x/crypto v0.12.0 // indirect
+	golang.org/x/net v0.14.0 // indirect
+	golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
+	golang.org/x/sync v0.1.0 // indirect
+	golang.org/x/sys v0.11.0 // indirect
+	golang.org/x/term v0.11.0 // indirect
+	golang.org/x/text v0.12.0 // indirect
+	golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
+	google.golang.org/appengine v1.6.7 // indirect
+	google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect
+	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
+>>>>>>> master
 	gopkg.in/inf.v0 v0.9.1 // indirect
 	gopkg.in/yaml.v2 v2.4.0 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect

+ 67 - 0
go.sum

@@ -440,6 +440,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
 github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
 github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
+github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
 github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0=
 github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
 github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
@@ -521,6 +523,11 @@ github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJf
 github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
 github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM=
 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
+github.com/richardlehane/mscfb v1.0.4/go.mod h1:YzVpcZg9czvAuhk9T+a3avCpcFPMUWm7gK3DypaEsUk=
+github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
+github.com/richardlehane/msoleps v1.0.3 h1:aznSZzrwYRl3rLKRT3gUk9am7T/mLNSnJINvN0AQoVM=
+github.com/richardlehane/msoleps v1.0.3/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
 github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
 github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
 github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
@@ -580,7 +587,16 @@ github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCO
 github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8=
 github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
 github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
+<<<<<<< HEAD
 github.com/yl2chen/cidranger v1.0.2/go.mod h1:9U1yz7WPYDwf0vpNWFaeRh0bjwz5RVgRy/9UEQfHl0g=
+=======
+github.com/xuri/efp v0.0.0-20230802181842-ad255f2331ca h1:uvPMDVyP7PXMMioYdyPH+0O+Ta/UO1WFfNYMO3Wz0eg=
+github.com/xuri/efp v0.0.0-20230802181842-ad255f2331ca/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
+github.com/xuri/excelize/v2 v2.8.0 h1:Vd4Qy809fupgp1v7X+nCS/MioeQmYVVzi495UCTqB7U=
+github.com/xuri/excelize/v2 v2.8.0/go.mod h1:6iA2edBTKxKbZAa7X5bDhcCg51xdOn1Ar5sfoXRGrQg=
+github.com/xuri/nfp v0.0.0-20230819163627-dc951e3ffe1a h1:Mw2VNrNNNjDtw68VsEj2+st+oCSn4Uz7vZw6TbhcV1o=
+github.com/xuri/nfp v0.0.0-20230819163627-dc951e3ffe1a/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
+>>>>>>> master
 github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA=
 github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
 github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -589,6 +605,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
 github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
 github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
 github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA=
 github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE=
 github.com/zeromicro/go-zero v1.3.2/go.mod h1:DEj3Fwj1Ui1ltsgf6YqwTL9nD4+tYzIRX0c1pWtQo1E=
@@ -677,9 +694,16 @@ golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPh
 golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
 golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
 golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+<<<<<<< HEAD
 golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
 golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
 golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
+=======
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
+golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
+>>>>>>> master
 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -692,6 +716,8 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH
 golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
 golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
 golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
+golang.org/x/image v0.11.0 h1:ds2RoQvBvYTiJkwpSFDwCcDFNX7DqjL2WsUgTNk0Ooo=
+golang.org/x/image v0.11.0/go.mod h1:bglhjqbqVuEb9e9+eNR45Jfu7D+T4Qan+NhQk8Ck2P8=
 golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
 golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
 golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -712,6 +738,8 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
 golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -755,8 +783,16 @@ golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qx
 golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
 golang.org/x/net v0.0.0-20220531201128-c960675eff93/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+<<<<<<< HEAD
 golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
 golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
+=======
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
+golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
+golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
+>>>>>>> master
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -779,6 +815,10 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+<<<<<<< HEAD
+=======
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+>>>>>>> master
 golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
 golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -842,6 +882,7 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+<<<<<<< HEAD
 golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
 golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -850,6 +891,21 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn
 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ=
 golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
+=======
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
+golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
+golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
+golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0=
+golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
+>>>>>>> master
 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -859,8 +915,15 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
 golang.org/x/text v0.3.8-0.20211105212822-18b340fc7af2/go.mod h1:EFNZuWvGYxIRUEX+K8UmCFwYmZjqcrnq15ZuVldZkZ0=
+<<<<<<< HEAD
 golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
 golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
+=======
+golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
+golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
+golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
+>>>>>>> master
 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -920,6 +983,8 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1026,6 +1091,7 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
 google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
 google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
 gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
+gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
 gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -1035,6 +1101,7 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV
 gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
 gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
 gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY=
 gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0=

+ 17 - 0
rpc/biService.proto

@@ -132,6 +132,15 @@ message Param {
 	string value = 1;
 	string type = 2;
 }
+message ExportReq {
+	string mail = 1;
+	repeated string mapping = 2;
+	int64 PositionId=3;
+}
+message OperateReq {
+	string newId = 1;
+	int64 type=2;
+}
 service BiService {
 	rpc myDataAsset (MyDataAssetReq) returns (MyDataAssetResp); //我的数据资产
 	rpc addProject (AddProjectReq) returns (AddProjectResp); //添加项目
@@ -143,6 +152,14 @@ service BiService {
 	rpc clueAdd (ClueAddReq) returns (AddProjectResp); //合力亿捷新增线索
 	rpc clueImportTt (ClueImportReq) returns (ClueImportResp); //线索导入tt
 	rpc autoFollow (CallReq) returns (ClueImportResp);
+<<<<<<< HEAD
 	rpc sqlManage (SqlManageReq) returns (BiReply); //bi通用接口
 	rpc myInfo (MyInfoReq) returns (BiReply); //用户身份
+=======
+	rpc sqlManage (SqlManageReq) returns (Reply); //bi通用接口
+	rpc myInfo (MyInfoReq) returns (Reply); //用户身份
+	rpc allInfoExport (ExportReq) returns (Reply); //资讯全量导出
+	rpc allProjectExport (ExportReq) returns (Reply); //项目全量导出
+	rpc infoOperate (OperateReq) returns (Resp); //数据操作
+>>>>>>> master
 }

+ 3 - 0
rpc/biservice.go

@@ -29,12 +29,14 @@ func main() {
 	srv := server.NewBiServiceServer(ctx)
 	entity.PublicKey = c.PublicKey
 	entity.InitMysql(c.Mysql.JianYu, c.Mysql.JyDoc, c.Mysql.Bi, c.Mysql.Tidb, c.Mysql.BiTidb, c.Mysql.CallTidb, c.Mysql.BiService)
+	entity.InitMail(c.Mail)
 	entity.InitMongo(c.Mongo.Qfw.MongodbAddr, c.Mongo.Qfw.DbName, c.Mongo.Qfw.Size)
 	entity.InitBiddingMgo(c.Mongo.Bidding.MongodbAddr, c.Mongo.Bidding.DbName, c.Mongo.Bidding.UserName, c.Mongo.Bidding.Password, c.Mongo.Bidding.Size)
 	entity.InitEs(c.Es.Version, c.Es.Address, c.Es.UserName, c.Es.Password, c.Es.DbSize)
 	entity.InitEntEs(c.EntEs.Version, c.EntEs.Address, c.EntEs.UserName, c.EntEs.Password, c.EntEs.DbSize)
 	entity.InitArea()
 	entity.InitRedis(c.RedisAddress)
+	entity.InitConfig(c.ExportDirectory, c.UpdateProjectUrl, c.ExportUrl, c.ExportCount)
 	//合力亿捷
 	entity.GetHlyj(c.Hlyj.Appid, c.Hlyj.Account, c.Hlyj.Secret, c.Hlyj.TokenUrl, c.Hlyj.CallUrl, c.Hlyj.Integratedid, c.Hlyj.CallFlag)
 	//nsq
@@ -52,6 +54,7 @@ func main() {
 	s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
 		pb.RegisterBiServiceServer(grpcServer, srv)
 	})
+
 	defer s.Stop()
 
 	fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)

+ 25 - 0
rpc/biservice/biservice.go

@@ -26,11 +26,13 @@ type (
 	DistributeClueReq = pb.DistributeClueReq
 	DistributeDatas   = pb.DistributeDatas
 	DrawClueReq       = pb.DrawClueReq
+	ExportReq         = pb.ExportReq
 	GetInfoIdResp     = pb.GetInfoIdResp
 	MyDataAsset       = pb.MyDataAsset
 	MyDataAssetReq    = pb.MyDataAssetReq
 	MyDataAssetResp   = pb.MyDataAssetResp
 	MyInfoReq         = pb.MyInfoReq
+	OperateReq        = pb.OperateReq
 	Param             = pb.Param
 	SqlManageReq      = pb.SqlManageReq
 
@@ -45,8 +47,16 @@ type (
 		ClueAdd(ctx context.Context, in *ClueAddReq, opts ...grpc.CallOption) (*AddProjectResp, error)
 		ClueImportTt(ctx context.Context, in *ClueImportReq, opts ...grpc.CallOption) (*ClueImportResp, error)
 		AutoFollow(ctx context.Context, in *CallReq, opts ...grpc.CallOption) (*ClueImportResp, error)
+<<<<<<< HEAD
 		SqlManage(ctx context.Context, in *SqlManageReq, opts ...grpc.CallOption) (*BiReply, error)
 		MyInfo(ctx context.Context, in *MyInfoReq, opts ...grpc.CallOption) (*BiReply, error)
+=======
+		SqlManage(ctx context.Context, in *SqlManageReq, opts ...grpc.CallOption) (*Reply, error)
+		MyInfo(ctx context.Context, in *MyInfoReq, opts ...grpc.CallOption) (*Reply, error)
+		AllInfoExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*Reply, error)
+		AllProjectExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*Reply, error)
+		InfoOperate(ctx context.Context, in *OperateReq, opts ...grpc.CallOption) (*Resp, error)
+>>>>>>> master
 	}
 
 	defaultBiService struct {
@@ -119,3 +129,18 @@ func (m *defaultBiService) MyInfo(ctx context.Context, in *MyInfoReq, opts ...gr
 	client := pb.NewBiServiceClient(m.cli.Conn())
 	return client.MyInfo(ctx, in, opts...)
 }
+
+func (m *defaultBiService) AllInfoExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*Reply, error) {
+	client := pb.NewBiServiceClient(m.cli.Conn())
+	return client.AllInfoExport(ctx, in, opts...)
+}
+
+func (m *defaultBiService) AllProjectExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*Reply, error) {
+	client := pb.NewBiServiceClient(m.cli.Conn())
+	return client.AllProjectExport(ctx, in, opts...)
+}
+
+func (m *defaultBiService) InfoOperate(ctx context.Context, in *OperateReq, opts ...grpc.CallOption) (*Resp, error) {
+	client := pb.NewBiServiceClient(m.cli.Conn())
+	return client.InfoOperate(ctx, in, opts...)
+}

+ 13 - 0
rpc/etc/biservice.yaml

@@ -104,3 +104,16 @@ Hlyj:
   CallUrl: https://a1.7x24cc.com/commonInte #外呼集成接口
   Integratedid: "8546"
 PublicKey: "791c521fec164e6c"
+Mail:
+  - Addr: smtp.exmail.qq.com
+    Port: 465
+    Pwd: "ue9Rg9Sf4CVtdm5a"
+    User: "public03@topnet.net.cn"
+  - Addr: smtp.exmail.qq.com
+    Port: 465
+    Pwd: "ue9Rg9Sf4CVtdm5a"
+    User: "public03@topnet.net.cn"
+UpdateProjectUrl: "https://tieta.spdata.jianyu360.com/updateProject"
+ExportDirectory: "D:/top_git_projects/biService"
+ExportUrl: "https://jybx-webtest.jydev.jianyu360.com/tietaRes"
+ExportCount: 15000

+ 10 - 0
rpc/internal/config/config.go

@@ -65,4 +65,14 @@ type Config struct {
 		Integratedid string
 	}
 	PublicKey string
+	Mail      []struct {
+		Addr string
+		Port int
+		Pwd  string
+		User string
+	}
+	UpdateProjectUrl string
+	ExportDirectory  string
+	ExportCount      int
+	ExportUrl        string
 }

+ 35 - 0
rpc/internal/logic/allinfoexportlogic.go

@@ -0,0 +1,35 @@
+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 AllInfoExportLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewAllInfoExportLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AllInfoExportLogic {
+	return &AllInfoExportLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *AllInfoExportLogic) AllInfoExport(in *pb.ExportReq) (*pb.Reply, error) {
+	// todo: add your logic here and delete this line
+	go (&service.ExportReq{
+		Mail:       in.Mail,
+		Mapping:    in.Mapping,
+		PositionId: in.PositionId,
+	}).AllInfoExport()
+	return &pb.Reply{}, nil
+}

+ 35 - 0
rpc/internal/logic/allprojectexportlogic.go

@@ -0,0 +1,35 @@
+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 AllProjectExportLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewAllProjectExportLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AllProjectExportLogic {
+	return &AllProjectExportLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *AllProjectExportLogic) AllProjectExport(in *pb.ExportReq) (*pb.Reply, error) {
+	// todo: add your logic here and delete this line
+	go (&service.ExportReq{
+		Mail:       in.Mail,
+		Mapping:    in.Mapping,
+		PositionId: in.PositionId,
+	}).AllProjectExport()
+	return &pb.Reply{}, nil
+}

+ 38 - 0
rpc/internal/logic/infooperatelogic.go

@@ -0,0 +1,38 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/service"
+	"context"
+	"github.com/gogf/gf/v2/util/gconv"
+
+	"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 InfoOperateLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewInfoOperateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InfoOperateLogic {
+	return &InfoOperateLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *InfoOperateLogic) InfoOperate(in *pb.OperateReq) (*pb.Resp, error) {
+	// todo: add your logic here and delete this line
+	fool := (&service.Operate{
+		OperateType: in.Type,
+		NewId:       in.NewId,
+	}).InfoOperate()
+	return &pb.Resp{
+		ErrorCode: gconv.Int64(!fool),
+		ErrorMsg:  "",
+	}, nil
+}

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

@@ -81,3 +81,18 @@ func (s *BiServiceServer) MyInfo(ctx context.Context, in *pb.MyInfoReq) (*pb.BiR
 	l := logic.NewMyInfoLogic(ctx, s.svcCtx)
 	return l.MyInfo(in)
 }
+
+func (s *BiServiceServer) AllInfoExport(ctx context.Context, in *pb.ExportReq) (*pb.Reply, error) {
+	l := logic.NewAllInfoExportLogic(ctx, s.svcCtx)
+	return l.AllInfoExport(in)
+}
+
+func (s *BiServiceServer) AllProjectExport(ctx context.Context, in *pb.ExportReq) (*pb.Reply, error) {
+	l := logic.NewAllProjectExportLogic(ctx, s.svcCtx)
+	return l.AllProjectExport(in)
+}
+
+func (s *BiServiceServer) InfoOperate(ctx context.Context, in *pb.OperateReq) (*pb.Resp, error) {
+	l := logic.NewInfoOperateLogic(ctx, s.svcCtx)
+	return l.InfoOperate(in)
+}

+ 309 - 2
rpc/pb/biService.pb.go

@@ -1408,6 +1408,124 @@ func (x *Param) GetType() string {
 	return ""
 }
 
+type ExportReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Mail       string   `protobuf:"bytes,1,opt,name=mail,proto3" json:"mail,omitempty"`
+	Mapping    []string `protobuf:"bytes,2,rep,name=mapping,proto3" json:"mapping,omitempty"`
+	PositionId int64    `protobuf:"varint,3,opt,name=PositionId,proto3" json:"PositionId,omitempty"`
+}
+
+func (x *ExportReq) Reset() {
+	*x = ExportReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[20]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ExportReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExportReq) ProtoMessage() {}
+
+func (x *ExportReq) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[20]
+	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 ExportReq.ProtoReflect.Descriptor instead.
+func (*ExportReq) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *ExportReq) GetMail() string {
+	if x != nil {
+		return x.Mail
+	}
+	return ""
+}
+
+func (x *ExportReq) GetMapping() []string {
+	if x != nil {
+		return x.Mapping
+	}
+	return nil
+}
+
+func (x *ExportReq) GetPositionId() int64 {
+	if x != nil {
+		return x.PositionId
+	}
+	return 0
+}
+
+type OperateReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	NewId string `protobuf:"bytes,1,opt,name=newId,proto3" json:"newId,omitempty"`
+	Type  int64  `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
+}
+
+func (x *OperateReq) Reset() {
+	*x = OperateReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[21]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *OperateReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OperateReq) ProtoMessage() {}
+
+func (x *OperateReq) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[21]
+	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 OperateReq.ProtoReflect.Descriptor instead.
+func (*OperateReq) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *OperateReq) GetNewId() string {
+	if x != nil {
+		return x.NewId
+	}
+	return ""
+}
+
+func (x *OperateReq) GetType() int64 {
+	if x != nil {
+		return x.Type
+	}
+	return 0
+}
+
 var File_biService_proto protoreflect.FileDescriptor
 
 var file_biService_proto_rawDesc = []byte{
@@ -1485,6 +1603,7 @@ var file_biService_proto_rawDesc = []byte{
 	0x65, 0x71, 0x12, 0x1f, 0x0a, 0x0b, 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, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01,
+<<<<<<< HEAD
 	0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x58, 0x0a, 0x06, 0x42, 0x69, 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, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f,
@@ -1607,6 +1726,145 @@ var file_biService_proto_rawDesc = []byte{
 	0x79, 0x49, 0x6e, 0x66, 0x6f, 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,
+=======
+	0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x56, 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, 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, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a,
+	0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74,
+	0x61, 0x22, 0x57, 0x0a, 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 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, 0x72,
+	0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72,
+	0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xb1, 0x01, 0x0a, 0x11, 0x44,
+	0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71,
+	0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e,
+	0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03,
+	0x28, 0x03, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x26,
+	0x0a, 0x05, 0x64, 0x61, 0x74, 0x61, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
+	0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x73, 0x52,
+	0x05, 0x64, 0x61, 0x74, 0x61, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
+	0x6f, 0x6e, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69,
+	0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x54, 0x61, 0x73, 0x6b,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x69, 0x73, 0x54, 0x61, 0x73, 0x6b, 0x22, 0xbd,
+	0x01, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x61, 0x74,
+	0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 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, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43,
+	0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61,
+	0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70,
+	0x6c, 0x65, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x10, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75,
+	0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
+	0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x64, 0x69,
+	0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x43,
+	0x0a, 0x0d, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12,
+	0x12, 0x0a, 0x04, 0x70, 0x63, 0x62, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70,
+	0x63, 0x62, 0x68, 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, 0x22, 0x6d, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72,
+	0x74, 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, 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, 0x72, 0x6f, 0x72, 0x4d, 0x73,
+	0x67, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x0b, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x64, 0x61,
+	0x74, 0x61, 0x22, 0x3c, 0x0a, 0x0a, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74,
+	0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75,
+	0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
+	0x22, 0xa6, 0x03, 0x0a, 0x0a, 0x43, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x12,
+	0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,
+	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d,
+	0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61,
+	0x74, 0x75, 0x73, 0x39, 0x39, 0x39, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74,
+	0x61, 0x74, 0x75, 0x73, 0x39, 0x39, 0x39, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a,
+	0x05, 0x65, 0x6d, 0x70, 0x4e, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d,
+	0x70, 0x4e, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x18, 0x07,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x12, 0x24, 0x0a,
+	0x0d, 0x69, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x6d, 0x61, 0x6b, 0x65, 0x72, 0x18, 0x08,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x73, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x6d, 0x61,
+	0x6b, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x54, 0x6f, 0x49,
+	0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x62,
+	0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x54, 0x6f, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x79, 0x12,
+	0x10, 0x0a, 0x03, 0x6a, 0x6f, 0x62, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x6f,
+	0x62, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x65, 0x65,
+	0x64, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+	0x65, 0x72, 0x4e, 0x65, 0x65, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x65, 0x6c, 0x6f, 0x6e,
+	0x67, 0x54, 0x6f, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x65, 0x6c, 0x6f, 0x6e,
+	0x67, 0x54, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x61, 0x6e, 0x74, 0x47, 0x6f, 0x6f, 0x64, 0x73,
+	0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x61, 0x6e, 0x74, 0x47, 0x6f, 0x6f, 0x64,
+	0x73, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x42, 0x75, 0x64,
+	0x67, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x75, 0x73, 0x74, 0x6f,
+	0x6d, 0x65, 0x72, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x22, 0x3e, 0x0a, 0x0c, 0x53, 0x71, 0x6c,
+	0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x06, 0x70, 0x61, 0x72,
+	0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x50, 0x61, 0x72, 0x61,
+	0x6d, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x2f, 0x0a, 0x09, 0x4d, 0x79, 0x49,
+	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x69, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x64, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x69, 0x64, 0x22, 0x31, 0x0a, 0x05, 0x50, 0x61,
+	0x72, 0x61, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70,
+	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x59, 0x0a,
+	0x09, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x61,
+	0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18,
+	0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
+	0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x6f, 0x73, 0x69,
+	0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x50, 0x6f,
+	0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x36, 0x0a, 0x0a, 0x4f, 0x70, 0x65, 0x72,
+	0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x65, 0x77, 0x49, 0x64, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x65, 0x77, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04,
+	0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
+	0x32, 0xf8, 0x04, 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, 0x17, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12,
+	0x08, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x05, 0x2e, 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, 0x22, 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, 0x06, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1c, 0x0a,
+	0x06, 0x6d, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0a, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x66, 0x6f,
+	0x52, 0x65, 0x71, 0x1a, 0x06, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x23, 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, 0x06, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79,
+	0x12, 0x26, 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, 0x06, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x21, 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, 0x05, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e,
+	0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+>>>>>>> master
 }
 
 var (
@@ -1621,7 +1879,7 @@ func file_biService_proto_rawDescGZIP() []byte {
 	return file_biService_proto_rawDescData
 }
 
-var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
+var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
 var file_biService_proto_goTypes = []interface{}{
 	(*MyDataAssetReq)(nil),    // 0: MyDataAssetReq
 	(*MyDataAssetResp)(nil),   // 1: MyDataAssetResp
@@ -1643,6 +1901,8 @@ var file_biService_proto_goTypes = []interface{}{
 	(*SqlManageReq)(nil),      // 17: SqlManageReq
 	(*MyInfoReq)(nil),         // 18: MyInfoReq
 	(*Param)(nil),             // 19: Param
+	(*ExportReq)(nil),         // 20: ExportReq
+	(*OperateReq)(nil),        // 21: OperateReq
 }
 var file_biService_proto_depIdxs = []int32{
 	2,  // 0: MyDataAssetResp.data:type_name -> MyDataAsset
@@ -1662,6 +1922,7 @@ var file_biService_proto_depIdxs = []int32{
 	8,  // 14: BiService.autoFollow:input_type -> CallReq
 	17, // 15: BiService.sqlManage:input_type -> SqlManageReq
 	18, // 16: BiService.myInfo:input_type -> MyInfoReq
+<<<<<<< HEAD
 	1,  // 17: BiService.myDataAsset:output_type -> MyDataAssetResp
 	4,  // 18: BiService.addProject:output_type -> AddProjectResp
 	6,  // 19: BiService.getInfoId:output_type -> GetInfoIdResp
@@ -1676,6 +1937,28 @@ var file_biService_proto_depIdxs = []int32{
 	10, // 28: BiService.myInfo:output_type -> BiReply
 	17, // [17:29] is the sub-list for method output_type
 	5,  // [5:17] is the sub-list for method input_type
+=======
+	20, // 17: BiService.allInfoExport:input_type -> ExportReq
+	20, // 18: BiService.allProjectExport:input_type -> ExportReq
+	21, // 19: BiService.infoOperate:input_type -> OperateReq
+	1,  // 20: BiService.myDataAsset:output_type -> MyDataAssetResp
+	4,  // 21: BiService.addProject:output_type -> AddProjectResp
+	6,  // 22: BiService.getInfoId:output_type -> GetInfoIdResp
+	4,  // 23: BiService.drawClue:output_type -> AddProjectResp
+	9,  // 24: BiService.Call:output_type -> Resp
+	4,  // 25: BiService.distributeClue:output_type -> AddProjectResp
+	14, // 26: BiService.clueImport:output_type -> ClueImportResp
+	4,  // 27: BiService.clueAdd:output_type -> AddProjectResp
+	14, // 28: BiService.clueImportTt:output_type -> ClueImportResp
+	14, // 29: BiService.autoFollow:output_type -> ClueImportResp
+	10, // 30: BiService.sqlManage:output_type -> Reply
+	10, // 31: BiService.myInfo:output_type -> Reply
+	10, // 32: BiService.allInfoExport:output_type -> Reply
+	10, // 33: BiService.allProjectExport:output_type -> Reply
+	9,  // 34: BiService.infoOperate:output_type -> Resp
+	20, // [20:35] is the sub-list for method output_type
+	5,  // [5:20] is the sub-list for method input_type
+>>>>>>> master
 	5,  // [5:5] is the sub-list for extension type_name
 	5,  // [5:5] is the sub-list for extension extendee
 	0,  // [0:5] is the sub-list for field type_name
@@ -1927,6 +2210,30 @@ func file_biService_proto_init() {
 				return nil
 			}
 		}
+		file_biService_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ExportReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_biService_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*OperateReq); 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{
@@ -1934,7 +2241,7 @@ func file_biService_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_biService_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   20,
+			NumMessages:   22,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

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

@@ -18,6 +18,27 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
+<<<<<<< HEAD
+=======
+const (
+	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"
+)
+
+>>>>>>> master
 // BiServiceClient is the client API for BiService service.
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -32,8 +53,16 @@ type BiServiceClient interface {
 	ClueAdd(ctx context.Context, in *ClueAddReq, opts ...grpc.CallOption) (*AddProjectResp, error)
 	ClueImportTt(ctx context.Context, in *ClueImportReq, opts ...grpc.CallOption) (*ClueImportResp, error)
 	AutoFollow(ctx context.Context, in *CallReq, opts ...grpc.CallOption) (*ClueImportResp, error)
+<<<<<<< HEAD
 	SqlManage(ctx context.Context, in *SqlManageReq, opts ...grpc.CallOption) (*BiReply, error)
 	MyInfo(ctx context.Context, in *MyInfoReq, opts ...grpc.CallOption) (*BiReply, error)
+=======
+	SqlManage(ctx context.Context, in *SqlManageReq, opts ...grpc.CallOption) (*Reply, error)
+	MyInfo(ctx context.Context, in *MyInfoReq, opts ...grpc.CallOption) (*Reply, error)
+	AllInfoExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*Reply, error)
+	AllProjectExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*Reply, error)
+	InfoOperate(ctx context.Context, in *OperateReq, opts ...grpc.CallOption) (*Resp, error)
+>>>>>>> master
 }
 
 type biServiceClient struct {
@@ -152,6 +181,33 @@ func (c *biServiceClient) MyInfo(ctx context.Context, in *MyInfoReq, opts ...grp
 	return out, nil
 }
 
+func (c *biServiceClient) AllInfoExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*Reply, error) {
+	out := new(Reply)
+	err := c.cc.Invoke(ctx, BiService_AllInfoExport_FullMethodName, in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *biServiceClient) AllProjectExport(ctx context.Context, in *ExportReq, opts ...grpc.CallOption) (*Reply, error) {
+	out := new(Reply)
+	err := c.cc.Invoke(ctx, BiService_AllProjectExport_FullMethodName, in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *biServiceClient) InfoOperate(ctx context.Context, in *OperateReq, opts ...grpc.CallOption) (*Resp, error) {
+	out := new(Resp)
+	err := c.cc.Invoke(ctx, BiService_InfoOperate_FullMethodName, 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
@@ -166,8 +222,16 @@ type BiServiceServer interface {
 	ClueAdd(context.Context, *ClueAddReq) (*AddProjectResp, error)
 	ClueImportTt(context.Context, *ClueImportReq) (*ClueImportResp, error)
 	AutoFollow(context.Context, *CallReq) (*ClueImportResp, error)
+<<<<<<< HEAD
 	SqlManage(context.Context, *SqlManageReq) (*BiReply, error)
 	MyInfo(context.Context, *MyInfoReq) (*BiReply, error)
+=======
+	SqlManage(context.Context, *SqlManageReq) (*Reply, error)
+	MyInfo(context.Context, *MyInfoReq) (*Reply, error)
+	AllInfoExport(context.Context, *ExportReq) (*Reply, error)
+	AllProjectExport(context.Context, *ExportReq) (*Reply, error)
+	InfoOperate(context.Context, *OperateReq) (*Resp, error)
+>>>>>>> master
 	mustEmbedUnimplementedBiServiceServer()
 }
 
@@ -211,6 +275,15 @@ func (UnimplementedBiServiceServer) SqlManage(context.Context, *SqlManageReq) (*
 func (UnimplementedBiServiceServer) MyInfo(context.Context, *MyInfoReq) (*BiReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method MyInfo not implemented")
 }
+func (UnimplementedBiServiceServer) AllInfoExport(context.Context, *ExportReq) (*Reply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method AllInfoExport not implemented")
+}
+func (UnimplementedBiServiceServer) AllProjectExport(context.Context, *ExportReq) (*Reply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method AllProjectExport not implemented")
+}
+func (UnimplementedBiServiceServer) InfoOperate(context.Context, *OperateReq) (*Resp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method InfoOperate not implemented")
+}
 func (UnimplementedBiServiceServer) mustEmbedUnimplementedBiServiceServer() {}
 
 // UnsafeBiServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -440,6 +513,60 @@ func _BiService_MyInfo_Handler(srv interface{}, ctx context.Context, dec func(in
 	return interceptor(ctx, in, info, handler)
 }
 
+func _BiService_AllInfoExport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ExportReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BiServiceServer).AllInfoExport(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: BiService_AllInfoExport_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BiServiceServer).AllInfoExport(ctx, req.(*ExportReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _BiService_AllProjectExport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ExportReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BiServiceServer).AllProjectExport(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: BiService_AllProjectExport_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BiServiceServer).AllProjectExport(ctx, req.(*ExportReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _BiService_InfoOperate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(OperateReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BiServiceServer).InfoOperate(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: BiService_InfoOperate_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BiServiceServer).InfoOperate(ctx, req.(*OperateReq))
+	}
+	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)
@@ -495,6 +622,18 @@ var BiService_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "myInfo",
 			Handler:    _BiService_MyInfo_Handler,
 		},
+		{
+			MethodName: "allInfoExport",
+			Handler:    _BiService_AllInfoExport_Handler,
+		},
+		{
+			MethodName: "allProjectExport",
+			Handler:    _BiService_AllProjectExport_Handler,
+		},
+		{
+			MethodName: "infoOperate",
+			Handler:    _BiService_InfoOperate_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "biService.proto",

+ 77 - 97
service/clue.go

@@ -1,7 +1,7 @@
 package service
 
 import (
-	"bytes"
+	"context"
 	"database/sql"
 	"encoding/json"
 	"fmt"
@@ -17,9 +17,9 @@ import (
 
 	"app.yhyue.com/moapp/jybase/mongodb"
 
-	"app.yhyue.com/moapp/jybase/date"
-
 	common "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jybase/date"
+	"app.yhyue.com/moapp/jybase/es"
 	. "bp.jydev.jianyu360.cn/BaseService/biService/entity"
 	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
 )
@@ -56,7 +56,6 @@ func ClueImportTtSync(this *biservice.ClueImportReq) (string, int) {
 						<-ch
 					}()
 					v["isCompetitors"] = "否"
-					details := ""
 					id := common.ObjToString(v["id"])
 					href := common.ObjToString(v["href"])
 					for _, vv := range strings.Split(competitors, ",") {
@@ -64,84 +63,25 @@ func ClueImportTtSync(this *biservice.ClueImportReq) (string, int) {
 							v["isCompetitors"] = "是"
 						}
 					}
+					delete(v, "temp_id")
 					delete(v, "import_pc")
 					delete(v, "projectId")
-					customer_data := BiService.FindOne("customer_data_ttzl", map[string]interface{}{"id": id}, "", "")
-					if customer_data != nil {
+					id_new := common.GetMd5String(fmt.Sprintf("%s_%d", common.ObjToString(v["id"]), common.Int64All(v["multipackage_id"])))
+					v["id_new"] = id_new
+					if BiService.Count("customer_data_ttzl", map[string]interface{}{"id_new": id_new}) > 0 {
 						log.Println("数据重复", id)
-						msg_id := common.Int64All((*customer_data)["msg_id"])
-						bok := BiService.Update("customer_data_ttzl", map[string]interface{}{"msg_id": msg_id}, v)
-						if bok {
-							//
-							biddingData, ok := Bidding.FindOne("bidding", map[string]interface{}{"_id": mongodb.StringTOBsonId(id)})
-							if ok && biddingData != nil && len(*biddingData) > 0 {
-								details = common.ObjToString((*biddingData)["detail"])
-							}
-							//
-							delete(v, "isCompetitors")
-							delete(v, "msg_id")
-							v["_id"] = v["id"]
-							delete(v, "id")
-							v["details"] = cleanHTML(details)
-							if common.ObjToString(v["publishtime"]) != "" {
-								v["publishtime2"] = common.ObjToString(v["publishtime"])
-								publishtime, _ := time.ParseInLocation(date.Date_Full_Layout, common.ObjToString(v["publishtime"]), time.Local)
-								v["publishtime"] = publishtime.UnixMilli()
-							} else {
-								delete(v, "publishtime")
-							}
-							for k, vv := range v {
-								if vv == nil {
-									delete(v, k)
-								}
-							}
-							oks := Es.UpdateNewDoc("ttbid", "ttbid", v)
-							if oks {
-								counts++
-								log.Println("es更新成功", id)
-							} else {
-								log.Println("es更新失败!!", id)
-							}
-						} else {
-							log.Println("tidb更新失败!!", id)
-						}
-					} else {
-						dataId := BiService.Insert("customer_data_ttzl", v)
-						if dataId > 0 {
-							//
-							biddingData, ok := Bidding.FindOne("bidding", map[string]interface{}{"_id": mongodb.StringTOBsonId(id)})
-							if ok && biddingData != nil && len(*biddingData) > 0 {
-								details = common.ObjToString((*biddingData)["detail"])
-							}
-							//
+						return
+					}
+					if dataId := BiService.Insert("customer_data_ttzl", v); dataId > 0 {
+						if details, ok := CreateEs(v); ok {
 							BiService.Insert("customer_data_ttzl_gl", map[string]interface{}{"msg_id": dataId, "info_id": id, "details": details, "isHistory": "否"})
-							delete(v, "isCompetitors")
-							delete(v, "msg_id")
-							v["_id"] = v["id"]
-							delete(v, "id")
-							v["details"] = cleanHTML(details)
-							if common.ObjToString(v["publishtime"]) != "" {
-								v["publishtime2"] = common.ObjToString(v["publishtime"])
-								publishtime, _ := time.ParseInLocation(date.Date_Full_Layout, common.ObjToString(v["publishtime"]), time.Local)
-								v["publishtime"] = publishtime.UnixMilli()
-							} else {
-								delete(v, "publishtime")
-							}
-							for k, vv := range v {
-								if vv == nil {
-									delete(v, k)
-								}
-							}
-							oks := Es.Save("ttbid", "ttbid", v)
-							if oks {
-								counts++
-								log.Println("es存入成功", id)
-							} else {
-								log.Println("es存入失败!!", id)
-							}
+							counts++
+							log.Println("es存入成功", id)
 						} else {
-							log.Println("tidb存入失败!!", id)
+							log.Println("es存入失败!!", id)
 						}
+					} else {
+						log.Println("tidb存入失败!!", id)
 					}
 				}(v)
 			}
@@ -162,6 +102,67 @@ func ClueImportTtSync(this *biservice.ClueImportReq) (string, int) {
 	}
 }
 
+// 根据id重新生成es
+func CreateEsById(newId string) bool {
+	data := BiService.FindOne("customer_data_ttzl", map[string]interface{}{"id_new": newId}, "", "")
+	if data == nil || len(*data) == 0 {
+		log.Println("没有找到该数据", newId)
+		return false
+	}
+	_, ok := CreateEs(*data)
+	return ok
+}
+
+// 重新生成es
+func CreateEs(v map[string]interface{}) (string, bool) {
+	details := ""
+	biddingData, ok := Bidding.FindOne("bidding", map[string]interface{}{"_id": mongodb.StringTOBsonId(common.ObjToString(v["id"]))})
+	if ok && biddingData != nil && len(*biddingData) > 0 {
+		details = common.ObjToString((*biddingData)["detail"])
+	}
+	delete(v, "isCompetitors")
+	delete(v, "msg_id")
+	v["details"] = cleanHTML(details)
+	if common.ObjToString(v["publishtime"]) != "" {
+		v["publishtime2"] = common.ObjToString(v["publishtime"])
+		publishtime, _ := time.ParseInLocation(date.Date_Full_Layout, common.ObjToString(v["publishtime"]), time.Local)
+		v["publishtime"] = publishtime.UnixMilli()
+	} else {
+		delete(v, "publishtime")
+	}
+	for k, vv := range v {
+		if vv == nil {
+			delete(v, k)
+		}
+	}
+	//
+	esV7 := Es.(*es.EsV7)
+	client := esV7.GetEsConn()
+	defer esV7.DestoryEsConn(client)
+	newId := common.ObjToString(v["id_new"])
+	client.Delete().Index("ttbid").Id(newId).Refresh("true").Do(context.TODO())
+	_, err := client.Index().Index("ttbid").Id(newId).BodyJson(v).Refresh("true").Do(context.TODO())
+	if err != nil {
+		log.Println("保存到ES出错", err.Error())
+		return details, false
+	} else {
+		return details, true
+	}
+}
+
+//
+func DelById(index, id string) bool {
+	esV7 := Es.(*es.EsV7)
+	client := esV7.GetEsConn()
+	defer esV7.DestoryEsConn(client)
+	_, err := client.Delete().Index(index).Id(id).Refresh("true").Do(context.TODO())
+	if err != nil {
+		log.Println("删除es出错:", id, err)
+		return false
+	}
+	return true
+}
+
 func cleanHTML(htmlString string) string {
 	// 清理HTML标签
 	htmlRegex := regexp.MustCompile("<[^>]*>")
@@ -1140,24 +1141,3 @@ func doGet(url string) ([]byte, error) {
 	log.Println(url, "调用结果 ", string(bs))
 	return bs, nil
 }
-
-func doPost(url string, body []byte) ([]byte, error) {
-	req, err := http.NewRequest("POST", url, bytes.NewReader(body))
-	if err != nil {
-		return nil, err
-	}
-	req.Header.Add("Content-Type", "application/json;charset=utf-8")
-	resp, err := http.DefaultClient.Do(req)
-	if err != nil {
-		return nil, err
-	}
-	bs, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		return nil, err
-	}
-	defer func() {
-		_ = resp.Body.Close()
-	}()
-	log.Println(url, "调用结果 ", string(bs))
-	return bs, nil
-}

+ 238 - 0
service/exprot.go

@@ -0,0 +1,238 @@
+package service
+
+import (
+	"app.yhyue.com/moapp/jybase/mail"
+	"archive/zip"
+	. "bp.jydev.jianyu360.cn/BaseService/biService/entity"
+	"fmt"
+	"github.com/gogf/gf/v2/util/gconv"
+	"github.com/xuri/excelize/v2"
+	"io"
+	"log"
+	"math/rand"
+	"os"
+	"path/filepath"
+	"strings"
+	"time"
+)
+
+var (
+	DateTime = "2006-01-02 15:04:05"
+)
+
+type ExportReq struct {
+	Mail       string
+	Mapping    []string
+	PositionId int64
+}
+
+// 全量项目导出
+func (a *ExportReq) AllProjectExport() {
+	tableColumn := []string{}
+	exportKey := []interface{}{}
+	for _, value := range a.Mapping {
+		valueArr := strings.Split(value, ":")
+		tableColumn = append(tableColumn, valueArr[0])
+		exportKey = append(exportKey, valueArr[1])
+	}
+	timeStr := time.Now().Format("20060102150405")
+	rand.Seed(time.Now().UnixNano())
+	randomInt := rand.Intn(10000) // 生成0到9999之间的随机整数
+	timeStr = fmt.Sprintf("%s%s", timeStr, gconv.String(randomInt))
+	pathArr := export("customer_data_ttzl_project", tableColumn, exportKey, timeStr)
+	if len(pathArr) > 0 {
+		pathstr := compressFiles(pathArr, timeStr)
+		state := sendMail("项目", a.Mail, pathstr)
+		BiService.Insert("export_record", map[string]interface{}{
+			"positionId": a.PositionId,
+			"type":       "project",
+			"excelPath":  strings.Join(pathArr, ","),
+			"zipPath":    pathstr,
+			"sendState":  state,
+			"createTime": time.Now().Format(DateTime),
+		})
+	}
+}
+
+// 全量资讯导出
+func (a *ExportReq) AllInfoExport() {
+	tableColumn := []string{}
+	exportKey := []interface{}{}
+	for _, value := range a.Mapping {
+		valueArr := strings.Split(value, ":")
+		tableColumn = append(tableColumn, valueArr[0])
+		exportKey = append(exportKey, valueArr[1])
+	}
+	timeStr := time.Now().Format("20060102150405")
+	rand.Seed(time.Now().UnixNano())
+	randomInt := rand.Intn(10000) // 生成0到9999之间的随机整数
+	timeStr = fmt.Sprintf("%s%s", timeStr, gconv.String(randomInt))
+	pathArr := export("customer_data_ttzl", tableColumn, exportKey, timeStr)
+	if len(pathArr) > 0 {
+		pathstr := compressFiles(pathArr, timeStr)
+		state := sendMail("标讯", a.Mail, pathstr)
+		BiService.Insert("export_record", map[string]interface{}{
+			"positionId": a.PositionId,
+			"type":       "project",
+			"excelPath":  strings.Join(pathArr, ","),
+			"zipPath":    pathstr,
+			"sendState":  state,
+			"createTime": time.Now().Format(DateTime),
+		})
+	}
+}
+
+// 导出开始
+func export(table string, tableColumn []string, key []interface{}, timeStr string) []string {
+	pathArr := []string{}
+	sqlStr := fmt.Sprintf("SELECT %s FROM %s", strings.Join(tableColumn, ","), table)
+	fileCounter := 1
+	writer, file := InirWrite(key)
+	a := 0
+	path := ""
+	BiService.SelectByBath(1, func(l *[]map[string]interface{}) bool {
+		if a%ExportCount == 0 && a > 0 {
+			a = 0
+			//入excel处理
+			writer, file, path = Warehousing(writer, file, fileCounter, key, timeStr)
+			fileCounter++
+			pathArr = append(pathArr, path)
+		}
+		dataHandle(writer, l, a, tableColumn)
+		a++
+		return true
+	}, sqlStr)
+	if a > 0 && a != ExportCount {
+		writer, file, path = Warehousing(writer, file, fileCounter, key, timeStr)
+		pathArr = append(pathArr, path)
+	}
+	return pathArr
+}
+
+// 数据处理
+func dataHandle(writer *excelize.StreamWriter, l *[]map[string]interface{}, a int, tableColumn []string) {
+	for _, value := range *l {
+		valueArr := []interface{}{}
+		for _, column := range tableColumn {
+			valueArr = append(valueArr, gconv.String(value[column]))
+		}
+		cell, _ := excelize.CoordinatesToCellName(1, a+1)
+		writer.SetRow(cell, valueArr)
+	}
+}
+
+// 入excel
+func Warehousing(writer *excelize.StreamWriter, file *excelize.File, fileCounter int, key []interface{}, timeStr string) (*excelize.StreamWriter, *excelize.File, string) {
+	log.Println(fmt.Sprintf("开始第%d数据", fileCounter))
+	writer.Flush()
+	folderPath := fmt.Sprintf("%s/%s", ExportDirectory, timeStr)
+	_, err := os.Stat(folderPath)
+	if os.IsNotExist(err) {
+		//创建文件夹
+		err := os.MkdirAll(folderPath, os.ModePerm)
+		if err != nil {
+			log.Println("创建文件夹失败:", err)
+		}
+	}
+	fileName := fmt.Sprintf("%s/output%d.xlsx", folderPath, fileCounter)
+	err = file.SaveAs(fileName)
+	if err != nil {
+		log.Println(err)
+	}
+	writer, file = InirWrite(key)
+	return writer, file, fileName
+}
+
+// excel初始化
+func InirWrite(key []interface{}) (*excelize.StreamWriter, *excelize.File) {
+	//文件初始化
+	file := excelize.NewFile()
+	//设置表名
+	file.SetSheetName("Sheet1", "表1")
+	//创建流式写入
+	writer, _ := file.NewStreamWriter("表1")
+	// 定义每个 Excel 文件的数据行数限制
+	writer.SetRow("A1", key)
+	return writer, file
+}
+
+// 发送邮箱
+func sendMail(title, target_mail string, path string) bool {
+	mailStr := "<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>铁塔全量%s数据导出</title>\n</head>\n<body>\n<div>\n    <p>铁塔全量%s数据已导出成功,导出时间:%s,请点击链接下载数据:<a href=\"%s\">%s</a></p>\n  </div>\n</body>"
+	html := fmt.Sprintf(mailStr, title, title, time.Now().Format(DateTime), path, path)
+	fool := false
+	for k, v := range GmailAuth {
+		fool := mail.GSendMail("剑鱼标讯", target_mail, "", "", fmt.Sprintf("铁塔全量%s数据导出", title), html, "", "", v)
+		if fool {
+			log.Println(target_mail, fmt.Sprintf("使用%s发送邮件成功", v.User))
+			break
+		}
+		if k < len(GmailAuth)-1 {
+			log.Println(target_mail, fmt.Sprintf("使用%s发送邮件失败!3s后使用其他邮箱尝试", v.User))
+		} else {
+			log.Println(target_mail, fmt.Sprintf("使用%s发送邮件失败!", v.User))
+		}
+		time.Sleep(time.Second * 3)
+	}
+	return fool
+}
+
+// 文件压缩
+func compressFiles(filePattern []string, timeStr string) string {
+	folderPath := fmt.Sprintf("%s/%s", ExportDirectory, timeStr)
+	_, err := os.Stat(folderPath)
+	if os.IsNotExist(err) {
+		//创建文件夹
+		err := os.MkdirAll(folderPath, os.ModePerm)
+		if err != nil {
+			log.Println("创建文件夹失败:", err)
+		}
+	}
+	zipFilename := fmt.Sprintf("%s/%s.zip", folderPath, timeStr)
+	// 创建 ZIP 文件
+	zipFile, err := os.Create(zipFilename)
+	if err != nil {
+		log.Fatal(err)
+	}
+	defer zipFile.Close()
+
+	// 创建 ZIP Writer
+	zipWriter := zip.NewWriter(zipFile)
+	defer zipWriter.Close()
+
+	// 遍历文件列表
+	for _, file := range filePattern {
+		// 打开文件
+		f, err := os.Open(file)
+		if err != nil {
+			log.Fatal(err)
+		}
+		defer f.Close()
+		// 获取文件信息
+		_, err = f.Stat()
+		if err != nil {
+			log.Fatal(err)
+		}
+		//文件名切割
+		nameArr := strings.Split(file, "/")
+		name := nameArr[len(nameArr)-1]
+		name = fmt.Sprintf("%s/%s", timeStr, name)
+		// 创建 ZIP 内部文件
+		zipFile, err := zipWriter.Create(name)
+		if err != nil {
+			log.Fatal(err)
+		}
+		// 将文件内容复制到 ZIP 文件中
+		_, err = io.Copy(zipFile, f)
+		if err != nil {
+			log.Fatal(err)
+		}
+	}
+	// 打印压缩文件路径
+	absPath, err := filepath.Abs(zipFilename)
+	if err != nil {
+		log.Fatal(err)
+	}
+	log.Printf("Files compressed to: %s", absPath)
+	return fmt.Sprintf("%s/%s/%s.zip", ExportUrl, timeStr, timeStr)
+}

+ 71 - 0
service/operate.go

@@ -0,0 +1,71 @@
+package service
+
+import (
+	"bytes"
+	"encoding/json"
+	"io/ioutil"
+	"log"
+	"net/http"
+
+	. "bp.jydev.jianyu360.cn/BaseService/biService/entity"
+)
+
+type Operate struct {
+	NewId       string
+	OperateType int64
+}
+
+func (a *Operate) InfoOperate() bool {
+	//数据查询
+	data := BiService.FindOne("customer_data_ttzl", map[string]interface{}{"id_new": a.NewId}, "", "")
+	if data == nil || len(*data) == 0 {
+		log.Println("没有找到该数据", a.NewId)
+		return false
+	}
+	sendParam := map[string]interface{}{
+		"type": a.OperateType,
+	}
+	if a.OperateType == 0 {
+		//修改
+		_, ok := CreateEs(*data)
+		if !ok {
+			return false
+		}
+		sendParam["nid"] = a.NewId
+	} else {
+		//清除es数据 清除mysql数据
+		if !DelById("ttbid", a.NewId) || !BiService.Delete("customer_data_ttzl", map[string]interface{}{"id_new": a.NewId}) {
+			return false
+		}
+		projectId := (*data)["projectId"]
+		if projectId == "" {
+			return true
+		}
+		sendParam["nid"] = projectId
+	}
+	marshalData, _ := json.Marshal(sendParam)
+	DoPost(UpdataProjectUrl, marshalData)
+	return true
+
+}
+
+func DoPost(url string, body []byte) ([]byte, error) {
+	req, err := http.NewRequest("POST", url, bytes.NewReader(body))
+	if err != nil {
+		return nil, err
+	}
+	req.Header.Add("Content-Type", "application/json;charset=utf-8")
+	resp, err := http.DefaultClient.Do(req)
+	if err != nil {
+		return nil, err
+	}
+	bs, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		return nil, err
+	}
+	defer func() {
+		_ = resp.Body.Close()
+	}()
+	log.Println(url, "调用结果 ", string(bs))
+	return bs, nil
+}