123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- --[[
- Descripttion:邮件
- version:
- Author: Neo,Huang
- Date: 2022-08-17 16:04:20
- LastEditors: Neo,Huang
- LastEditTime: 2022-08-20 09:42:54
- --]]
- local code = require "code"
- local util_mail = require("utils.util_mail")
- local userData = require("data.user")
- local root = {}
- -- 获取邮件信息列表
- function root.mail_get_info(role, msg)
- return role.pmail:itf_get_info(msg)
- end
- -- 读取邮件
- function root.mail_read(role, msg)
- return role.pmail:itf_read(msg)
- end
- -- 删除邮件
- function root.mail_del(role, msg)
- return role.pmail:itf_del(msg)
- end
- -- 获取邮件奖励
- function root.mail_get_award(role, msg)
- return role.pmail:itf_get_award(msg)
- end
- -- 新邮件通知
- function root.add_new_mail(role, msg)
- local uid = role.uid
- local id = msg.id
- local channel = msg.channel
- if id == nil then
- return code.PARAMTER_ERROR
- end
- if channel == nil or userData:user_is_match_channel(uid, channel) then
- -- 玩家新增邮件
- util_mail:on_new_mail(uid, id)
- end
- return code.OK
- end
- return root
|