33 lines
785 B
Go
33 lines
785 B
Go
package mail
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
func (this *Api_Comp) Mail_ReadMail_Req_Check(session comm.IUserSession, req *pb.Mail_ReadMail_Req) (result map[string]interface{}, code comm.ErrorCode) {
|
|
return
|
|
}
|
|
|
|
// 查看某一封邮件
|
|
func (this *Api_Comp) Mail_ReadMail_Req(session comm.IUserSession, agrs map[string]interface{}, req *pb.Mail_ReadMail_Req) (code pb.ErrorCode) {
|
|
var (
|
|
err error
|
|
mail *pb.DB_MailData
|
|
)
|
|
defer func() {
|
|
session.SendMsg(string(this.module.GetType()), ReadUserMailResp, &pb.Mail_ReadMail_Resp{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
|
|
}
|