From 8b1fdecbc0ac632dd900f05c3467b98bfcd8ddc4 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 8 Nov 2022 14:49:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E9=82=AE=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/sociaty/api_cross_agree.go | 4 +++- modules/sociaty/model_sociaty.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/sociaty/api_cross_agree.go b/modules/sociaty/api_cross_agree.go index ff1813b7c..ea9fcd7fb 100644 --- a/modules/sociaty/api_cross_agree.go +++ b/modules/sociaty/api_cross_agree.go @@ -43,7 +43,9 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) ( } // 发邮件 - this.module.modelSociaty.sendMail("GuildApproved", []string{sociaty.Name}, []string{uid}) + if err := this.module.modelSociaty.sendMail("GuildApproved", []string{sociaty.Name}, []string{req.Uid}); err != nil { + this.module.Errorf("发送邮件id:GuildApproved uid:%v 失败 err:%v", uid, err) + } //审核通过推送 this.module.SendMsgToUser(string(this.module.GetType()), "pagree", &pb.SociatyPAgreePush{ diff --git a/modules/sociaty/model_sociaty.go b/modules/sociaty/model_sociaty.go index 53b31e3a3..dd3b31af9 100644 --- a/modules/sociaty/model_sociaty.go +++ b/modules/sociaty/model_sociaty.go @@ -388,7 +388,7 @@ func (this *ModelSociaty) addMember(uid string, sociaty *pb.DBSociaty) error { // 发邮件给公会成员 func (this *ModelSociaty) sendMail(confId string, params []string, receiver []string) error { - if module, err := this.moduleSociaty.service.GetModule(comm.ModuleMail); err == nil { + if module, err := this.service.GetModule(comm.ModuleMail); err == nil { if mail, ok := module.(comm.Imail); ok { mail.SendNewMail(&pb.DBMailData{ Cid: confId,