33 lines
896 B
Go
33 lines
896 B
Go
package mail
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/lego/sys/log"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
func (this *Api_Comp) QueryUserMailReq_Check(session comm.IUserSession, req *pb.QueryUserMailReq) (result map[string]interface{}, code pb.ErrorCode) {
|
|
return
|
|
}
|
|
|
|
// 查看所有邮件信息
|
|
func (this *Api_Comp) QueryUserMailReq(session comm.IUserSession, agrs map[string]interface{}, req *pb.QueryUserMailReq) (code pb.ErrorCode) {
|
|
|
|
var err error
|
|
mailinfo := make([]*pb.DB_MailData, 0)
|
|
defer func() {
|
|
session.SendMsg(string(this.module.GetType()), QueryUserMailResp, &pb.QueryUserMailResp{Mails: mailinfo})
|
|
}()
|
|
if session.GetUserId() == "" {
|
|
code = pb.ErrorCode_NoLogin
|
|
return
|
|
}
|
|
if mailinfo, err = this.module.db_comp.Mail_QueryUserMail(session.GetUserId()); err != nil {
|
|
log.Errorf("QueryUserMailResp err:%v", err)
|
|
code = pb.ErrorCode_CacheReadError
|
|
return
|
|
}
|
|
|
|
return
|
|
}
|