Bladeren bron

邮件接口、上传附件接口

Jianghan 1 jaar geleden
bovenliggende
commit
e9801bdba9

+ 13 - 2
api/biService.api

@@ -3,7 +3,7 @@ syntax = "v1"
 type (
 	biResp {
 		Error_code int64       `json:"error_code"` //响应代码
-		Error_msg  string      `json:"error_msg"`  //响应消息
+		Error_msg  string      `json:"error_msg"` //响应消息
 		Data       interface{} `json:"data"`
 	}
 	myDataAssetReq {
@@ -115,6 +115,12 @@ type (
 		EntUserId  int64  `header:"entUserId,optional"`
 		EntId      int64  `header:"entId,optional"`
 		FileType   string `form:"fileType"`
+		FileName   string `form:"fileName"`
+	}
+	SendMailReq {
+		Title   string `json:"title"`
+		Content string `json:"content"`
+		mails   string `json:"mails"`
 	}
 )
 
@@ -191,4 +197,9 @@ service biService-api {
 	@doc "附件上传"
 	@handler upFile
 	post /biService/upFile (UpFileReq) returns (biResp)
-}
+
+	@doc "发送邮件"
+	@handler sendComMail
+	post /biService/sendCommonndMail (SendMailReq) returns (biResp)
+}
+

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

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

+ 21 - 0
api/internal/handler/sendcommailhandler.go

@@ -0,0 +1,21 @@
+package handler
+
+import (
+	"net/http"
+
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/logic"
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
+	"github.com/zeromicro/go-zero/rest/httpx"
+)
+
+func sendComMailHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
+	return func(w http.ResponseWriter, r *http.Request) {
+		l := logic.NewSendComMailLogic(r.Context(), svcCtx)
+		resp, err := l.SendComMail()
+		if err != nil {
+			httpx.ErrorCtx(r.Context(), w, err)
+		} else {
+			httpx.OkJsonCtx(r.Context(), w, resp)
+		}
+	}
+}

+ 43 - 0
api/internal/logic/sendcommaillogic.go

@@ -0,0 +1,43 @@
+package logic
+
+import (
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
+	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/types"
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
+	"context"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type SendComMailLogic struct {
+	logx.Logger
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+}
+
+func NewSendComMailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SendComMailLogic {
+	return &SendComMailLogic{
+		Logger: logx.WithContext(ctx),
+		ctx:    ctx,
+		svcCtx: svcCtx,
+	}
+}
+
+func (l *SendComMailLogic) SendComMail(req *types.SendMailReq) (resp *types.BiResp, err error) {
+	if req.Title == "" {
+		return &types.BiResp{Error_code: -1, Error_msg: "邮件标题不能为空"}, err
+	}
+	if req.Mails == "" {
+		return &types.BiResp{Error_code: -1, Error_msg: "邮件内容不能为空"}, err
+	}
+	if req.Mails == "" {
+		return &types.BiResp{Error_code: -1, Error_msg: "邮箱地址不能为空"}, err
+	}
+
+	res, err := l.svcCtx.BiServiceRpc.SendCommonMail(l.ctx, &biservice.SendMailReq{
+		Title:   req.Title,
+		Content: req.Content,
+		Mails:   req.Mails,
+	})
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: string(res.Data)}, err
+}

+ 1 - 12
api/internal/logic/upfilelogic.go

@@ -8,7 +8,6 @@ import (
 	"github.com/gogf/gf/v2/util/gconv"
 	"io"
 	"net/http"
-	"net/url"
 	"strings"
 
 	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
@@ -37,16 +36,6 @@ func (l *UpFileLogic) UpFile(req *types.UpFileReq) (resp *types.BiResp, err erro
 	file, header, _ := l.r.FormFile("file")
 	defer file.Close()
 	bt, _ := io.ReadAll(file)
-	formUrl := l.r.Form.Get("url")
-	u, err := url.Parse(formUrl)
-	if err != nil {
-		l.Error(err)
-	}
-	queryValues, _ := url.ParseQuery(u.RawQuery)
-	fileName := queryValues.Get("fileId")
-	index := strings.Index(fileName, "-")
-	// 截取 "-" 后边的内容
-	fileName = fileName[index+1:]
 	size := fmt.Sprintf("%.4f", common.Float64All(header.Size)/1024)
 	for {
 		if strings.HasSuffix(size, "0") {
@@ -68,7 +57,7 @@ func (l *UpFileLogic) UpFile(req *types.UpFileReq) (resp *types.BiResp, err erro
 		EntId:      req.EntId,
 		Stype:      req.FileType,
 		File:       bt,
-		FileName:   fileName,
+		FileName:   req.FileName,
 		FileSize:   fileSize,
 	})
 	data := gconv.Map(gconv.UnsafeBytesToStr(res.Data))

+ 87 - 80
api/internal/types/types.go

@@ -1,43 +1,26 @@
 // Code generated by goctl. DO NOT EDIT.
 package types
 
-type BiResp struct {
-	Error_code int64       `json:"error_code"` //响应代码
-	Error_msg  string      `json:"error_msg"`  //响应消息
-	Data       interface{} `json:"data"`
-}
-
-type MyDataAssetReq struct {
-	UserId    string `header:"userId,optional"`
-	NewUserId int64  `header:"newUserId,optional"`
-	EntUserId int64  `header:"entUserId,optional"`
-}
-
-type AddProjectReq struct {
-	PositionId   int64  `header:"positionId,optional"`
-	Source       int64  `json:"source,optional"`
-	InfoId       string `json:"info_id,optional"`
-	PositionType int64  `header:"positionType,optional"`
-	AccountId    int64  `header:"accountId,optional"`
-	CompanyName  string `header:"entName,optional"`
-	UserName     string `header:"userName,optional"`
-	UserId       int64  `header:"newUserId,optional"`
-	EntId        int64  `header:"entId,optional"`
-	EntUserName  string `header:"entUserName,optional"`
-}
-
-type GetInfoIdReq struct {
-	PositionId int64 `header:"positionId,optional"`
-}
-
-type DrawClueReq struct {
-	PositionId int64 `header:"positionId,optional"`
-	Count      int64 `json:"count,optional"`
+type ClueAddReq struct {
+	Phone            string `json:"phone"`
+	Username         string `json:"username,optional"`
+	Source           string `json:"source"`
+	Status999        string `json:"status999"`
+	Owner            string `json:"owner"`
+	EmpNo            string `json:"empNo"`
+	Company          string `json:"company,optional"`
+	IsPolicymaker    string `json:"isPolicymaker,optional"`
+	BelongToIndustry string `json:"belongToIndustry,optional"`
+	Job              string `json:"job,optional"`
+	CustomerNeeds    string `json:"customerNeeds,optional"`
+	BelongTo         string `json:"belongTo,optional"`
+	WantGoods        string `json:"wantGoods,optional"`
+	CustomerBudget   string `json:"customerBudget,optional"`
 }
 
-type CallReq struct {
+type ClueImportReq struct {
 	PositionId int64  `header:"positionId,optional"`
-	Phone      string `json:"phone"`
+	Pcbh       string `json:"pcbh"`
 }
 
 type DistributeClueReq struct {
@@ -57,31 +40,29 @@ type DistributeClueShowReq struct {
 	UpdatePositionID int64                    `json:"updatePositionID"`
 }
 
-type ClueImportReq struct {
-	PositionId int64  `header:"positionId,optional"`
-	Pcbh       string `json:"pcbh"`
+type ExportByDbReq struct {
+	Token    string                   `json:"token"`
+	Title    string                   `json:"title"`
+	Content  string                   `json:"content"`
+	Mails    string                   `json:"mails"`
+	FileName string                   `json:"filename"`
+	Datas    []map[string]interface{} `json:"datas"`
 }
 
-type ClueAddReq struct {
-	Phone            string `json:"phone"`
-	Username         string `json:"username,optional"`
-	Source           string `json:"source"`
-	Status999        string `json:"status999"`
-	Owner            string `json:"owner"`
-	EmpNo            string `json:"empNo"`
-	Company          string `json:"company,optional"`
-	IsPolicymaker    string `json:"isPolicymaker,optional"`
-	BelongToIndustry string `json:"belongToIndustry,optional"`
-	Job              string `json:"job,optional"`
-	CustomerNeeds    string `json:"customerNeeds,optional"`
-	BelongTo         string `json:"belongTo,optional"`
-	WantGoods        string `json:"wantGoods,optional"`
-	CustomerBudget   string `json:"customerBudget,optional"`
+type ExportReq struct {
+	Mail       string   `json:"mail"`
+	Mapping    []string `json:"mapping"`
+	PositionId int64    `header:"positionId,optional"`
 }
 
-type SqlManageReq struct {
-	Id     float64 `json:"id"`
-	Params []Param `json:"params"`
+type MyInfoReq struct {
+	Bid string `json:"bid,optional"`
+	Sid string `json:"sid"`
+}
+
+type OperateReq struct {
+	NewId string `json:"newId"`
+	Type  int64  `json:"type"`
 }
 
 type Param struct {
@@ -89,11 +70,6 @@ type Param struct {
 	Type  string `json:"type"`
 }
 
-type MyInfoReq struct {
-	Bid string `json:"bid,optional"`
-	Sid string `json:"sid"`
-}
-
 type ResEmpowerReq struct {
 	EntId        int64  `header:"entId"`
 	ReqType      int64  `json:"reqType"`
@@ -102,28 +78,15 @@ type ResEmpowerReq struct {
 	PositionId   string `json:"positionId"`
 }
 
-type ExportReq struct {
-	Mail       string   `json:"mail"`
-	Mapping    []string `json:"mapping"`
-	PositionId int64    `header:"positionId,optional"`
+type SendMailReq struct {
+	Title   string `json:"title"`
+	Content string `json:"content"`
+	Mails   string `json:"mails"`
 }
 
-type OperateReq struct {
-	NewId string `json:"newId"`
-	Type  int64  `json:"type"`
-}
-
-type GetCompanyTypeReq struct {
-	CompanyName string `json:"companyName"`
-}
-
-type ExportByDbReq struct {
-	Token    string                   `json:"token"`
-	Title    string                   `json:"title"`
-	Content  string                   `json:"content"`
-	Mails    string                   `json:"mails"`
-	FileName string                   `json:"filename"`
-	Datas    []map[string]interface{} `json:"datas"`
+type SqlManageReq struct {
+	Id     float64 `json:"id"`
+	Params []Param `json:"params"`
 }
 
 type UpFileReq struct {
@@ -133,4 +96,48 @@ type UpFileReq struct {
 	EntUserId  int64  `header:"entUserId,optional"`
 	EntId      int64  `header:"entId,optional"`
 	FileType   string `form:"fileType"`
+	FileName   string `form:"fileName"`
+}
+
+type AddProjectReq struct {
+	PositionId   int64  `header:"positionId,optional"`
+	Source       int64  `json:"source,optional"`
+	InfoId       string `json:"info_id,optional"`
+	PositionType int64  `header:"positionType,optional"`
+	AccountId    int64  `header:"accountId,optional"`
+	CompanyName  string `header:"entName,optional"`
+	UserName     string `header:"userName,optional"`
+	UserId       int64  `header:"newUserId,optional"`
+	EntId        int64  `header:"entId,optional"`
+	EntUserName  string `header:"entUserName,optional"`
+}
+
+type BiResp struct {
+	Error_code int64       `json:"error_code"` //响应代码
+	Error_msg  string      `json:"error_msg"`  //响应消息
+	Data       interface{} `json:"data"`
+}
+
+type CallReq struct {
+	PositionId int64  `header:"positionId,optional"`
+	Phone      string `json:"phone"`
+}
+
+type DrawClueReq struct {
+	PositionId int64 `header:"positionId,optional"`
+	Count      int64 `json:"count,optional"`
+}
+
+type GetCompanyTypeReq struct {
+	CompanyName string `json:"companyName"`
+}
+
+type GetInfoIdReq struct {
+	PositionId int64 `header:"positionId,optional"`
+}
+
+type MyDataAssetReq struct {
+	UserId    string `header:"userId,optional"`
+	NewUserId int64  `header:"newUserId,optional"`
+	EntUserId int64  `header:"entUserId,optional"`
 }

+ 1 - 1
go.mod

@@ -3,7 +3,7 @@ module bp.jydev.jianyu360.cn/BaseService/biService
 go 1.19
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20240205092729-2959d78b7619
+	app.yhyue.com/moapp/jybase v0.0.0-20240523083821-42a82b37ae20
 	app.yhyue.com/moapp/jypkg v1.13.3
 	bp.jydev.jianyu360.cn/BaseService/fileCenter v0.0.0-20231017010644-b9f5c5167673
 	bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4

+ 7 - 0
go.sum

@@ -1,5 +1,6 @@
 app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d h1:WPsYuuptAd3UEgN+jPzpnsDe/OvcshDUUtOTZPYGSJ8=
 app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d/go.mod h1:91/lSD/hS+ckMVP3WdidRzDhC60lLMdyce9QHy0cSMA=
+app.yhyue.com/moapp/jyInfo v1.0.0/go.mod h1:+RjyGNvk7PT1P8cglkVlaj1lLlBXuPB+f5LipoOtgPs=
 app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 h1:cCmWQW8DUBD2nuZNDz9aIe6MrlioxTbdaA2YiJhlzjY=
 app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547/go.mod h1:JvIs8uKjdT963+7JnZGIEcL4ctBiBjwkoz0kNyigE78=
 app.yhyue.com/moapp/jyPoints v1.1.2-0.20231020023521-1a4b1bbf9736 h1:7Vl3qq1nJZyRQNyMDoCTC14ScKABZqbUmJP0WpOLnIQ=
@@ -11,6 +12,8 @@ app.yhyue.com/moapp/jybase v0.0.0-20220421060131-a1001013ba46/go.mod h1:qNRA0sHu
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
 app.yhyue.com/moapp/jybase v0.0.0-20240205092729-2959d78b7619 h1:rzjJ4pK1P+DcoOYA4+hCOJUoLdSInQa3EHsYY2DKWqA=
 app.yhyue.com/moapp/jybase v0.0.0-20240205092729-2959d78b7619/go.mod h1:fjaD11Z3FIk9EyfOpdKAMQNs7nPZCpT/qKIw1oVsb9w=
+app.yhyue.com/moapp/jybase v0.0.0-20240523083821-42a82b37ae20 h1:F1ZHkzo7yHp5eNrZDqQxaXMIKFQU72bsI1dMq3ztJLA=
+app.yhyue.com/moapp/jybase v0.0.0-20240523083821-42a82b37ae20/go.mod h1:XHNATN6tsJKHdCB0DbUtFdPPHXexTUFyB3RlO+lUUoM=
 app.yhyue.com/moapp/jypkg v1.13.3 h1:qJdzwbjoddEZW2e96OqUypUz356/aVXlAqJn2kmeksE=
 app.yhyue.com/moapp/jypkg v1.13.3/go.mod h1:uGSHEjlIVCDFeud5hD7bY5Z1Csrvh+c3vr4Mg50qCW0=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=
@@ -193,6 +196,7 @@ github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGE
 github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
 github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
 github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
+github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw=
 github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
 github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
 github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
@@ -220,6 +224,7 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb
 github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
 github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
 github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
 github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
@@ -380,6 +385,7 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf
 github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
 github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
 github.com/google/pprof v0.0.0-20211214055906-6f57359322fd h1:1FjCyPC+syAzJ5/2S8fqdZK1R22vvA0J7JZKcuOIQ7Y=
+github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg=
 github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
 github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@@ -1196,6 +1202,7 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
 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=
 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
 google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
 google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
 google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=

+ 7 - 0
rpc/biService.proto

@@ -212,6 +212,12 @@ message UpFileReq {
 	string fileSize = 9;
 }
 
+message SendMailReq {
+	string title = 1;
+	string content = 2;
+	string mails = 3;
+}
+
 service BiService {
 	rpc myDataAsset (MyDataAssetReq) returns (MyDataAssetResp); //我的数据资产
 	rpc addProject (AddProjectReq) returns (AddProjectResp); //添加项目
@@ -232,4 +238,5 @@ service BiService {
 	rpc distributeClueShow (DistributeClueShowReq) returns (DistributeClueShowResp); //批量分配展示
 	rpc sendMail (ExportByDbReq) returns (BiReply); //数据导出(通用)
 	rpc upFile (UpFileReq) returns(BiReply);
+	rpc sendCommonMail (SendMailReq) returns(BiReply);
 }

+ 7 - 0
rpc/biservice/biservice.go

@@ -42,6 +42,7 @@ type (
 	MyInfoReq              = pb.MyInfoReq
 	OperateReq             = pb.OperateReq
 	Param                  = pb.Param
+	SendMailReq            = pb.SendMailReq
 	SqlManageReq           = pb.SqlManageReq
 	UpFileReq              = pb.UpFileReq
 
@@ -65,6 +66,7 @@ type (
 		DistributeClueShow(ctx context.Context, in *DistributeClueShowReq, opts ...grpc.CallOption) (*DistributeClueShowResp, error)
 		SendMail(ctx context.Context, in *ExportByDbReq, opts ...grpc.CallOption) (*BiReply, error)
 		UpFile(ctx context.Context, in *UpFileReq, opts ...grpc.CallOption) (*BiReply, error)
+		SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error)
 	}
 
 	defaultBiService struct {
@@ -172,3 +174,8 @@ func (m *defaultBiService) UpFile(ctx context.Context, in *UpFileReq, opts ...gr
 	client := pb.NewBiServiceClient(m.cli.Conn())
 	return client.UpFile(ctx, in, opts...)
 }
+
+func (m *defaultBiService) SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error) {
+	client := pb.NewBiServiceClient(m.cli.Conn())
+	return client.SendCommonMail(ctx, in, opts...)
+}

+ 51 - 0
rpc/internal/logic/sendcommonmaillogic.go

@@ -0,0 +1,51 @@
+package logic
+
+import (
+	"app.yhyue.com/moapp/jybase/mail"
+	"bp.jydev.jianyu360.cn/BaseService/biService/entity"
+	"context"
+	"fmt"
+	"time"
+
+	"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 SendCommonMailLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewSendCommonMailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SendCommonMailLogic {
+	return &SendCommonMailLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *SendCommonMailLogic) SendCommonMail(in *pb.SendMailReq) (*pb.BiReply, error) {
+
+	for k, v := range entity.GmailAuth {
+		fool := mail.GSendMail_q("剑鱼标讯", in.Mails, "", "", in.Title, in.Content, "", "", v)
+		if fool {
+			logx.Info(in.Mails, fmt.Sprintf("使用%s发送邮件成功", v.User))
+			break
+		}
+		if k < len(entity.GmailAuth)-1 {
+			logx.Info(in.Mails, fmt.Sprintf("使用%s发送邮件失败!3s后使用其他邮箱尝试", v.User))
+		} else {
+			logx.Info(in.Mails, fmt.Sprintf("使用%s发送邮件失败!", v.User))
+		}
+		time.Sleep(time.Second * 3)
+	}
+
+	return &pb.BiReply{
+		ErrorCode: 0,
+		ErrorMsg:  "发送成功",
+		Data:      nil,
+	}, nil
+}

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

@@ -116,3 +116,8 @@ func (s *BiServiceServer) UpFile(ctx context.Context, in *pb.UpFileReq) (*pb.BiR
 	l := logic.NewUpFileLogic(ctx, s.svcCtx)
 	return l.UpFile(in)
 }
+
+func (s *BiServiceServer) SendCommonMail(ctx context.Context, in *pb.SendMailReq) (*pb.BiReply, error) {
+	l := logic.NewSendCommonMailLogic(ctx, s.svcCtx)
+	return l.SendCommonMail(in)
+}

+ 163 - 77
rpc/pb/biService.pb.go

@@ -2173,6 +2173,69 @@ func (x *UpFileReq) GetFileSize() string {
 	return ""
 }
 
+type SendMailReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Title   string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
+	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
+	Mails   string `protobuf:"bytes,3,opt,name=mails,proto3" json:"mails,omitempty"`
+}
+
+func (x *SendMailReq) Reset() {
+	*x = SendMailReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_biService_proto_msgTypes[31]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SendMailReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SendMailReq) ProtoMessage() {}
+
+func (x *SendMailReq) ProtoReflect() protoreflect.Message {
+	mi := &file_biService_proto_msgTypes[31]
+	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 SendMailReq.ProtoReflect.Descriptor instead.
+func (*SendMailReq) Descriptor() ([]byte, []int) {
+	return file_biService_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *SendMailReq) GetTitle() string {
+	if x != nil {
+		return x.Title
+	}
+	return ""
+}
+
+func (x *SendMailReq) GetContent() string {
+	if x != nil {
+		return x.Content
+	}
+	return ""
+}
+
+func (x *SendMailReq) GetMails() string {
+	if x != nil {
+		return x.Mails
+	}
+	return ""
+}
+
 var File_biService_proto protoreflect.FileDescriptor
 
 var file_biService_proto_rawDesc = []byte{
@@ -2426,60 +2489,68 @@ var file_biService_proto_rawDesc = []byte{
 	0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66,
 	0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53,
 	0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x53,
-	0x69, 0x7a, 0x65, 0x32, 0xbf, 0x06, 0x0a, 0x09, 0x42, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
-	0x65, 0x12, 0x30, 0x0a, 0x0b, 0x6d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74,
-	0x12, 0x0f, 0x2e, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65,
-	0x71, 0x1a, 0x10, 0x2e, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x61, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
-	0x74, 0x12, 0x0e, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
-	0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x2b, 0x0a, 0x09, 0x67, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x12,
-	0x0e, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a,
-	0x0e, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12,
-	0x29, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6c, 0x75, 0x65, 0x12, 0x0c, 0x2e, 0x44, 0x72,
-	0x61, 0x77, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50,
-	0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x19, 0x0a, 0x04, 0x43, 0x61,
-	0x6c, 0x6c, 0x12, 0x08, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x07, 0x2e, 0x42,
-	0x69, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x0e, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62,
-	0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69,
-	0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64,
-	0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a,
-	0x63, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0e, 0x2e, 0x43, 0x6c, 0x75,
-	0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x43, 0x6c, 0x75,
-	0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x63,
-	0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x12, 0x0b, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64,
-	0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74,
-	0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0c, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f,
-	0x72, 0x74, 0x54, 0x74, 0x12, 0x0e, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72,
-	0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72,
-	0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x46, 0x6f, 0x6c,
-	0x6c, 0x6f, 0x77, 0x12, 0x08, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e,
-	0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24,
-	0x0a, 0x09, 0x73, 0x71, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x12, 0x0d, 0x2e, 0x53, 0x71,
-	0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52,
-	0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0a,
-	0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52,
-	0x65, 0x70, 0x6c, 0x79, 0x12, 0x25, 0x0a, 0x0d, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x45,
-	0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0a, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65,
-	0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x61,
-	0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12,
-	0x0a, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
-	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x66, 0x6f, 0x4f, 0x70, 0x65,
-	0x72, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65,
-	0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2b, 0x0a, 0x0e, 0x67,
-	0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x2e,
-	0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x0c, 0x2e, 0x43, 0x6f, 0x6d,
-	0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x74,
-	0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x12, 0x16,
-	0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53,
-	0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62,
-	0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x70, 0x12,
-	0x24, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x12, 0x0e, 0x2e, 0x45, 0x78,
-	0x70, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x44, 0x62, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
-	0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x75, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x12,
-	0x0a, 0x2e, 0x55, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69,
-	0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70,
-	0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x69, 0x7a, 0x65, 0x22, 0x53, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x52,
+	0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
+	0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+	0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x05, 0x6d, 0x61, 0x69, 0x6c, 0x73, 0x32, 0xe9, 0x06, 0x0a, 0x09, 0x42, 0x69, 0x53,
+	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x6d, 0x79, 0x44, 0x61, 0x74, 0x61,
+	0x41, 0x73, 0x73, 0x65, 0x74, 0x12, 0x0f, 0x2e, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41, 0x73,
+	0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x4d, 0x79, 0x44, 0x61, 0x74, 0x61, 0x41,
+	0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x61, 0x64, 0x64, 0x50,
+	0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0e, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a,
+	0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a,
+	0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x09, 0x67, 0x65, 0x74, 0x49, 0x6e,
+	0x66, 0x6f, 0x49, 0x64, 0x12, 0x0e, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+	0x74, 0x52, 0x65, 0x71, 0x1a, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x64,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x77, 0x43, 0x6c, 0x75, 0x65,
+	0x12, 0x0c, 0x2e, 0x44, 0x72, 0x61, 0x77, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x0f,
+	0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x19, 0x0a, 0x04, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x08, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65,
+	0x71, 0x1a, 0x07, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x0e, 0x64, 0x69,
+	0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x2e, 0x44,
+	0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71,
+	0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x2d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12,
+	0x0e, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a,
+	0x0f, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70,
+	0x12, 0x27, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x65, 0x41, 0x64, 0x64, 0x12, 0x0b, 0x2e, 0x43, 0x6c,
+	0x75, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72,
+	0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2f, 0x0a, 0x0c, 0x63, 0x6c, 0x75,
+	0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x74, 0x12, 0x0e, 0x2e, 0x43, 0x6c, 0x75, 0x65,
+	0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x43, 0x6c, 0x75, 0x65,
+	0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x0a, 0x61, 0x75,
+	0x74, 0x6f, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x08, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x52,
+	0x65, 0x71, 0x1a, 0x0f, 0x2e, 0x43, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52,
+	0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x09, 0x73, 0x71, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+	0x12, 0x0d, 0x2e, 0x53, 0x71, 0x6c, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a,
+	0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x79, 0x49,
+	0x6e, 0x66, 0x6f, 0x12, 0x0a, 0x2e, 0x4d, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a,
+	0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x25, 0x0a, 0x0d, 0x61, 0x6c, 0x6c,
+	0x49, 0x6e, 0x66, 0x6f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x0a, 0x2e, 0x45, 0x78, 0x70,
+	0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79,
+	0x12, 0x28, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x78,
+	0x70, 0x6f, 0x72, 0x74, 0x12, 0x0a, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71,
+	0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e,
+	0x66, 0x6f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x2e, 0x4f, 0x70, 0x65, 0x72,
+	0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79,
+	0x12, 0x2b, 0x0a, 0x0e, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x54, 0x79,
+	0x70, 0x65, 0x12, 0x0b, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x1a,
+	0x0c, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a,
+	0x12, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53,
+	0x68, 0x6f, 0x77, 0x12, 0x16, 0x2e, 0x44, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
+	0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x44, 0x69,
+	0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x65, 0x53, 0x68, 0x6f, 0x77,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c,
+	0x12, 0x0e, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x79, 0x44, 0x62, 0x52, 0x65, 0x71,
+	0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1e, 0x0a, 0x06, 0x75, 0x70,
+	0x46, 0x69, 0x6c, 0x65, 0x12, 0x0a, 0x2e, 0x55, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71,
+	0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x0e, 0x73, 0x65,
+	0x6e, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4d, 0x61, 0x69, 0x6c, 0x12, 0x0c, 0x2e, 0x53,
+	0x65, 0x6e, 0x64, 0x4d, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x08, 0x2e, 0x42, 0x69, 0x52,
+	0x65, 0x70, 0x6c, 0x79, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
+	0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -2494,7 +2565,7 @@ func file_biService_proto_rawDescGZIP() []byte {
 	return file_biService_proto_rawDescData
 }
 
-var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 31)
+var file_biService_proto_msgTypes = make([]protoimpl.MessageInfo, 32)
 var file_biService_proto_goTypes = []interface{}{
 	(*MyDataAssetReq)(nil),         // 0: MyDataAssetReq
 	(*MyDataAssetResp)(nil),        // 1: MyDataAssetResp
@@ -2527,6 +2598,7 @@ var file_biService_proto_goTypes = []interface{}{
 	(*ExportByDbReq)(nil),          // 28: ExportByDbReq
 	(*FilesData)(nil),              // 29: FilesData
 	(*UpFileReq)(nil),              // 30: UpFileReq
+	(*SendMailReq)(nil),            // 31: SendMailReq
 }
 var file_biService_proto_depIdxs = []int32{
 	2,  // 0: MyDataAssetResp.data:type_name -> MyDataAsset
@@ -2556,27 +2628,29 @@ var file_biService_proto_depIdxs = []int32{
 	24, // 24: BiService.distributeClueShow:input_type -> DistributeClueShowReq
 	28, // 25: BiService.sendMail:input_type -> ExportByDbReq
 	30, // 26: BiService.upFile:input_type -> UpFileReq
-	1,  // 27: BiService.myDataAsset:output_type -> MyDataAssetResp
-	4,  // 28: BiService.addProject:output_type -> AddProjectResp
-	6,  // 29: BiService.getInfoId:output_type -> GetInfoIdResp
-	4,  // 30: BiService.drawClue:output_type -> AddProjectResp
-	9,  // 31: BiService.Call:output_type -> BiResp
-	4,  // 32: BiService.distributeClue:output_type -> AddProjectResp
-	14, // 33: BiService.clueImport:output_type -> ClueImportResp
-	4,  // 34: BiService.clueAdd:output_type -> AddProjectResp
-	14, // 35: BiService.clueImportTt:output_type -> ClueImportResp
-	14, // 36: BiService.autoFollow:output_type -> ClueImportResp
-	10, // 37: BiService.sqlManage:output_type -> BiReply
-	10, // 38: BiService.myInfo:output_type -> BiReply
-	10, // 39: BiService.allInfoExport:output_type -> BiReply
-	10, // 40: BiService.allProjectExport:output_type -> BiReply
-	10, // 41: BiService.infoOperate:output_type -> BiReply
-	23, // 42: BiService.getCompanyType:output_type -> CompanyResp
-	27, // 43: BiService.distributeClueShow:output_type -> DistributeClueShowResp
-	10, // 44: BiService.sendMail:output_type -> BiReply
-	10, // 45: BiService.upFile:output_type -> BiReply
-	27, // [27:46] is the sub-list for method output_type
-	8,  // [8:27] is the sub-list for method input_type
+	31, // 27: BiService.sendCommonMail:input_type -> SendMailReq
+	1,  // 28: BiService.myDataAsset:output_type -> MyDataAssetResp
+	4,  // 29: BiService.addProject:output_type -> AddProjectResp
+	6,  // 30: BiService.getInfoId:output_type -> GetInfoIdResp
+	4,  // 31: BiService.drawClue:output_type -> AddProjectResp
+	9,  // 32: BiService.Call:output_type -> BiResp
+	4,  // 33: BiService.distributeClue:output_type -> AddProjectResp
+	14, // 34: BiService.clueImport:output_type -> ClueImportResp
+	4,  // 35: BiService.clueAdd:output_type -> AddProjectResp
+	14, // 36: BiService.clueImportTt:output_type -> ClueImportResp
+	14, // 37: BiService.autoFollow:output_type -> ClueImportResp
+	10, // 38: BiService.sqlManage:output_type -> BiReply
+	10, // 39: BiService.myInfo:output_type -> BiReply
+	10, // 40: BiService.allInfoExport:output_type -> BiReply
+	10, // 41: BiService.allProjectExport:output_type -> BiReply
+	10, // 42: BiService.infoOperate:output_type -> BiReply
+	23, // 43: BiService.getCompanyType:output_type -> CompanyResp
+	27, // 44: BiService.distributeClueShow:output_type -> DistributeClueShowResp
+	10, // 45: BiService.sendMail:output_type -> BiReply
+	10, // 46: BiService.upFile:output_type -> BiReply
+	10, // 47: BiService.sendCommonMail:output_type -> BiReply
+	28, // [28:48] is the sub-list for method output_type
+	8,  // [8:28] is the sub-list for method input_type
 	8,  // [8:8] is the sub-list for extension type_name
 	8,  // [8:8] is the sub-list for extension extendee
 	0,  // [0:8] is the sub-list for field type_name
@@ -2960,6 +3034,18 @@ func file_biService_proto_init() {
 				return nil
 			}
 		}
+		file_biService_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SendMailReq); 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{
@@ -2967,7 +3053,7 @@ func file_biService_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_biService_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   31,
+			NumMessages:   32,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

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

@@ -38,6 +38,7 @@ const (
 	BiService_DistributeClueShow_FullMethodName = "/BiService/distributeClueShow"
 	BiService_SendMail_FullMethodName           = "/BiService/sendMail"
 	BiService_UpFile_FullMethodName             = "/BiService/upFile"
+	BiService_SendCommonMail_FullMethodName     = "/BiService/sendCommonMail"
 )
 
 // BiServiceClient is the client API for BiService service.
@@ -63,6 +64,7 @@ type BiServiceClient interface {
 	DistributeClueShow(ctx context.Context, in *DistributeClueShowReq, opts ...grpc.CallOption) (*DistributeClueShowResp, error)
 	SendMail(ctx context.Context, in *ExportByDbReq, opts ...grpc.CallOption) (*BiReply, error)
 	UpFile(ctx context.Context, in *UpFileReq, opts ...grpc.CallOption) (*BiReply, error)
+	SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error)
 }
 
 type biServiceClient struct {
@@ -244,6 +246,15 @@ func (c *biServiceClient) UpFile(ctx context.Context, in *UpFileReq, opts ...grp
 	return out, nil
 }
 
+func (c *biServiceClient) SendCommonMail(ctx context.Context, in *SendMailReq, opts ...grpc.CallOption) (*BiReply, error) {
+	out := new(BiReply)
+	err := c.cc.Invoke(ctx, BiService_SendCommonMail_FullMethodName, in, out, opts...)
+	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
@@ -267,6 +278,7 @@ type BiServiceServer interface {
 	DistributeClueShow(context.Context, *DistributeClueShowReq) (*DistributeClueShowResp, error)
 	SendMail(context.Context, *ExportByDbReq) (*BiReply, error)
 	UpFile(context.Context, *UpFileReq) (*BiReply, error)
+	SendCommonMail(context.Context, *SendMailReq) (*BiReply, error)
 	mustEmbedUnimplementedBiServiceServer()
 }
 
@@ -331,6 +343,9 @@ func (UnimplementedBiServiceServer) SendMail(context.Context, *ExportByDbReq) (*
 func (UnimplementedBiServiceServer) UpFile(context.Context, *UpFileReq) (*BiReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UpFile not implemented")
 }
+func (UnimplementedBiServiceServer) SendCommonMail(context.Context, *SendMailReq) (*BiReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method SendCommonMail not implemented")
+}
 func (UnimplementedBiServiceServer) mustEmbedUnimplementedBiServiceServer() {}
 
 // UnsafeBiServiceServer may be embedded to opt out of forward compatibility for this service.
@@ -686,6 +701,24 @@ func _BiService_UpFile_Handler(srv interface{}, ctx context.Context, dec func(in
 	return interceptor(ctx, in, info, handler)
 }
 
+func _BiService_SendCommonMail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(SendMailReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(BiServiceServer).SendCommonMail(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: BiService_SendCommonMail_FullMethodName,
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(BiServiceServer).SendCommonMail(ctx, req.(*SendMailReq))
+	}
+	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)
@@ -769,6 +802,10 @@ var BiService_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "upFile",
 			Handler:    _BiService_UpFile_Handler,
 		},
+		{
+			MethodName: "sendCommonMail",
+			Handler:    _BiService_SendCommonMail_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "biService.proto",