go_dreamfactory/modules/mail/api_readmail.go
2022-06-15 17:46:13 +08:00

33 lines
778 B
Go

package mail
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
)
func (this *Api_Comp) ReadUserMailReq_Check(session comm.IUserSession, req *pb.ReadUserMailReq) (result map[string]interface{}, code pb.ErrorCode) {
return
}
// 查看某一封邮件
func (this *Api_Comp) ReadUserMailReq(session comm.IUserSession, agrs map[string]interface{}, req *pb.ReadUserMailReq) (err error) {
var (
code pb.ErrorCode
mail *pb.DB_MailData
)
defer func() {
session.SendMsg(string(this.module.GetType()), ReadUserMailResp, code, &pb.ReadUserMailResp{Mail: mail})
}()
if session.GetUserId() == "" {
code = pb.ErrorCode_NoLogin
return
}
mail, err = this.module.db_comp.Mail_ReadOneMail(req.ObjID)
if err != nil {
code = pb.ErrorCode_ReqParameterError
}
return
}