137 lines
6.9 KiB
Go
137 lines
6.9 KiB
Go
package imnotifyconst
|
|
|
|
import "fmt"
|
|
|
|
//im 通知 模块
|
|
|
|
// Action 消息行为
|
|
type Action string
|
|
|
|
// Message 消息结构体
|
|
type Message struct {
|
|
Title string `json:"title"` //消息标题
|
|
MsgType Action `json:"msgType"` //消息类型
|
|
Data string `json:"data"` //内容
|
|
}
|
|
|
|
// 消息类型
|
|
const (
|
|
AccountCharge Action = "CHARGE" //充值消息
|
|
VIPCharge Action = "VIP-CHARGE" //VIP充值消息
|
|
BuyModel Action = "BUY—MODEL" //购买嫩模
|
|
AccountWithDraw Action = "WITHDRAW" //提现消息
|
|
VideoCheck Action = "VIDCHECK" //视频审核
|
|
BlockUser Action = "BLOCK" //用户禁止登陆
|
|
BannedUser Action = "BANNED" //用户禁言
|
|
UnBannedUser Action = "UNBANNED" //解除禁言
|
|
ForbidUpload Action = "FORBIDUPLOAD" //禁止上传文件
|
|
UnForbidUpload Action = "UNFORBIDUPLOAD" //解除禁止上传文件
|
|
SysOpUserCoins Action = "SysOpUserCoins" //系统操作用户金币
|
|
OfficialRecharge Action = "OfficialRecharge" //官方充值
|
|
OfficialSeekScore Action = "OfficialSeekScore" //官方追分
|
|
MeetingCard Action = "MeetingCard" //购买约会卡
|
|
UserReward Action = "UserReward" //玩家打赏通知
|
|
OtherCard Action = "OtherCard" //购买其他卡
|
|
UserFeedBackReply Action = "UserFeedBackReply" //用户反馈回复
|
|
LoufengFeedBackReply Action = "LoufengFeedBackReply" //楼凤举报回复
|
|
VerifyReport Action = "VerifyReport" //验证报告回复
|
|
UnBlockUser Action = "UNBLOCK" //解除用户禁止登陆
|
|
WithDrawRefuse Action = "WithDrawRefuse" //提现拒绝消息
|
|
WithDrawUnknownErr Action = "WithDrawUnknownErr" //提现未知错误
|
|
GrandPrize Action = "GrandPrize" //大奖通知
|
|
ConsumerFeedbackGame Action = "ConsumerFeedbackGame" //充值有礼(游戏)
|
|
ConsumerFeedback Action = "ConsumerFeedback" //消费回馈(楼凤)
|
|
NudeChatFeedBackReply Action = "NudeChatFeedBackReply" //裸聊举报回复
|
|
SysOpUserFruitCoin Action = "SysOpUserFruitCoin" //系统操作用户果币
|
|
)
|
|
|
|
var imNotifyTitle = map[Action]string{
|
|
VIPCharge: "VIP购买",
|
|
BuyModel: "购买嫩模",
|
|
AccountCharge: "充值到账",
|
|
AccountWithDraw: "提现到账",
|
|
VideoCheck: "视频审核",
|
|
BlockUser: "禁止登陆",
|
|
BannedUser: "禁言通知",
|
|
UnBannedUser: "解除用户禁言",
|
|
ForbidUpload: "禁止上传帖子",
|
|
UnForbidUpload: "解除禁止上传帖子",
|
|
SysOpUserCoins: "系统金币管理",
|
|
OfficialRecharge: "官方充值",
|
|
OfficialSeekScore: "官方追分",
|
|
MeetingCard: "购买约会卡",
|
|
UserReward: "玩家打赏",
|
|
UserFeedBackReply: "官方回复",
|
|
OtherCard: "购买其他卡",
|
|
LoufengFeedBackReply: "楼凤举报",
|
|
VerifyReport: "验证报告",
|
|
UnBlockUser: "解除封禁",
|
|
WithDrawRefuse: "提现拒绝",
|
|
WithDrawUnknownErr: "提现未知错误",
|
|
GrandPrize: "中奖通知",
|
|
ConsumerFeedbackGame: "充值有礼",
|
|
ConsumerFeedback: "消费回馈",
|
|
NudeChatFeedBackReply: "裸聊举报",
|
|
}
|
|
|
|
var imNotifyContent = map[Action]string{
|
|
VIPCharge: "官人,恭喜您购买%s成功,小娘子在此等候您的光临哦!",
|
|
BuyModel: "官人,恭喜您%s,小娘子在此等候您的光临哦!",
|
|
AccountCharge: "充值成功到账%s金币,请查收!",
|
|
AccountWithDraw: "提现成功到账%s金币,请查收!",
|
|
VideoCheck: "您的视频%s因%s审核未通过!",
|
|
BlockUser: "尊敬的用户,您因:%s,现做出封禁处理,如需要解除封禁,请联系客服咨询,谢谢!",
|
|
BannedUser: "尊敬的用户,您因:%s,受到系统禁言处理,如需要解除禁言,请联系客服咨询,谢谢!",
|
|
UnBannedUser: "尊敬的用户,恭喜您解除禁言,现在您可以畅所欲言啦!",
|
|
ForbidUpload: "尊敬的用户,您因:%s,系统作出禁止上传文件处理,如需要解除限制,请联系客服咨询,谢谢!",
|
|
UnForbidUpload: "尊敬的用户,恭喜您解除禁止上传帖子,现在您可以上传帖子,痛快的赚取收益啦!",
|
|
SysOpUserCoins: "尊敬的用户,系统%s您%s金币,请注意查看,谢谢!",
|
|
OfficialRecharge: "尊敬的用户,您已经通过官方充值到账%s金币,请注意查看,谢谢!",
|
|
OfficialSeekScore: "尊敬的用户,官方追分%s金币,如有疑惑,请联系客服!",
|
|
MeetingCard: "官人,恭喜您购买%s成功,小娘子在此等候您的光临哦!",
|
|
UserReward: "玩家%s打赏%s金币,请查收!",
|
|
OtherCard: "官人,恭喜您购买%s成功,小娘子在此等候您的光临哦!",
|
|
UserFeedBackReply: "尊敬的用户!针对您的问题:%s,官方在此作出认真解答:%s,如果您还有疑惑,请联系客服或继续反馈,谢谢您对我们的支持!",
|
|
LoufengFeedBackReply: "尊敬的用户!针对你举报的楼凤信息,官方已作出相应处理:%s,给您造成的不便,深感抱歉!",
|
|
VerifyReport: "尊敬的用户!您提交的关于%s验证报告因%s审核未通过!",
|
|
UnBlockUser: "尊敬的用户,恭喜您解除封禁.%s",
|
|
WithDrawRefuse: "尊敬的用户,你的提现申请因-s%已失败,金币已返还.",
|
|
WithDrawUnknownErr: "尊敬的用户,你的提现申请因网络异常原因发生异常,请联系客服确认金币是否返还",
|
|
GrandPrize: "官人,恭喜您%s,小娘子在此等候您的光临哦!",
|
|
ConsumerFeedbackGame: "恭喜您昨日游戏累计楼充值%s元,已满足游戏充值有礼领取条件,快点击本消息领取吧~",
|
|
ConsumerFeedback: "恭喜您今日累计楼凤消费%s金币,已满足消费回馈领取条件,快点击本消息领取吧~",
|
|
NudeChatFeedBackReply: "尊敬的用户!针对你举报的裸聊信息,官方已作出相应处理:%s,给您造成的不便,深感抱歉!",
|
|
SysOpUserFruitCoin: "尊敬的用户,系统%s您%s果币币,请注意查看,谢谢!",
|
|
}
|
|
|
|
func (a Action) Title() string {
|
|
if v, ok := imNotifyTitle[a]; ok {
|
|
return v
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 适用于无字符串字符的fmt模版
|
|
func (a Action) Desc() string {
|
|
if v, ok := imNotifyContent[a]; ok {
|
|
return v
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 适用于单个字符串字符的fmt模版
|
|
func (a Action) SingleStringParamData(amount string) string {
|
|
if v, ok := imNotifyContent[a]; ok {
|
|
return fmt.Sprintf(v, amount)
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 适用于双个字符串字符的fmt模版
|
|
func (a Action) DoubleStringParamData(p1 string, p2 string) string {
|
|
if v, ok := imNotifyContent[a]; ok {
|
|
return fmt.Sprintf(v, p1, p2)
|
|
}
|
|
return ""
|
|
}
|