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 SendMailLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewSendMailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SendMailLogic { return &SendMailLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *SendMailLogic) SendMail(req *types.ExportByDbReq) (resp *types.BiResp, err error) { res, err := l.svcCtx.BiServiceRpc.ExportDataByDb(l.ctx, &biservice.ExportByDbReq{ Token: req.Token, Title: req.Title, Content: req.Content, Mails: req.Mails, Query: req.Query, Stype: req.Stype, }) return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg}, err }