1
This commit is contained in:
parent
ccc09fee69
commit
75819b839f
@ -13,10 +13,19 @@ type Game2005 struct {
|
|||||||
mysqlCluster []*MtwGame2005MysqlConf
|
mysqlCluster []*MtwGame2005MysqlConf
|
||||||
mysqlClusterMutex sync.RWMutex
|
mysqlClusterMutex sync.RWMutex
|
||||||
dbIdxHash sync.Map
|
dbIdxHash sync.Map
|
||||||
|
vipLvUpMailMeta *MtwGame2005Mail
|
||||||
|
priviDailyMailMeta *MtwGame2005Mail
|
||||||
|
vipWeeklyMailMeta *MtwGame2005Mail
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Game2005) Init() {
|
func (this *Game2005) Init() {
|
||||||
this.mysqlCluster = G.MetaMgr.GetGame2005MysqlCluster()
|
this.mysqlCluster = G.MetaMgr.GetGame2005MysqlCluster()
|
||||||
|
this.vipLvUpMailMeta = G.MetaMgr.GetGame2005Mail(1)
|
||||||
|
this.priviDailyMailMeta = G.MetaMgr.GetGame2005Mail(2)
|
||||||
|
this.vipWeeklyMailMeta = G.MetaMgr.GetGame2005Mail(3)
|
||||||
|
if this.vipLvUpMailMeta == nil || this.priviDailyMailMeta == nil || this.vipWeeklyMailMeta == nil {
|
||||||
|
panic("game2005 mail config error")
|
||||||
|
}
|
||||||
f5.Timer().AddSimpleRepeatTimer(1000 * 10,
|
f5.Timer().AddSimpleRepeatTimer(1000 * 10,
|
||||||
func (params* q5.XParams) {
|
func (params* q5.XParams) {
|
||||||
if atomic.LoadInt64(&this.fetchEventAtomic) <= 0 {
|
if atomic.LoadInt64(&this.fetchEventAtomic) <= 0 {
|
||||||
@ -47,6 +56,7 @@ func (this *Game2005) FetchEventGo() {
|
|||||||
atomic.AddInt64(&this.fetchEventAtomic, 1)
|
atomic.AddInt64(&this.fetchEventAtomic, 1)
|
||||||
defer atomic.AddInt64(&this.fetchEventAtomic, -1)
|
defer atomic.AddInt64(&this.fetchEventAtomic, -1)
|
||||||
|
|
||||||
|
sendTime := int32(f5.App.NowUnix())
|
||||||
for i := 0; i < this.getMysqlClusterSize(); i++ {
|
for i := 0; i < this.getMysqlClusterSize(); i++ {
|
||||||
conf := this.getMysqlCluster(i)
|
conf := this.getMysqlCluster(i)
|
||||||
if conf == nil {
|
if conf == nil {
|
||||||
@ -66,7 +76,7 @@ func (this *Game2005) FetchEventGo() {
|
|||||||
err)
|
err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !this.FetchEventOneDB(conf, conn) {
|
if !this.FetchEventOneDB(conf, conn, sendTime) {
|
||||||
f5.SysLog().Warning("FetchEventOneDB error")
|
f5.SysLog().Warning("FetchEventOneDB error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -77,6 +87,7 @@ func (this *Game2005) DailyMailGo() {
|
|||||||
atomic.AddInt64(&this.dailyMailAtomic, 1)
|
atomic.AddInt64(&this.dailyMailAtomic, 1)
|
||||||
defer atomic.AddInt64(&this.dailyMailAtomic, -1)
|
defer atomic.AddInt64(&this.dailyMailAtomic, -1)
|
||||||
|
|
||||||
|
sendTime := int32(f5.App.NowUnix())
|
||||||
for i := 0; i < this.getMysqlClusterSize(); i++ {
|
for i := 0; i < this.getMysqlClusterSize(); i++ {
|
||||||
conf := this.getMysqlCluster(i)
|
conf := this.getMysqlCluster(i)
|
||||||
if conf == nil {
|
if conf == nil {
|
||||||
@ -96,7 +107,7 @@ func (this *Game2005) DailyMailGo() {
|
|||||||
err)
|
err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !this.DailyMailOneDB(conf, conn) {
|
if !this.DailyMailOneDB(conf, conn, sendTime) {
|
||||||
f5.SysLog().Warning("DailyMailOneDB error")
|
f5.SysLog().Warning("DailyMailOneDB error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -131,22 +142,108 @@ func (this *Game2005) SetDBIdx(instanceId int32, idx int64) {
|
|||||||
this.dbIdxHash.Store(instanceId, idx)
|
this.dbIdxHash.Store(instanceId, idx)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Game2005) SendVipLvUpMail(accountId string, oldVipLv int32, newVipLv int32) bool {
|
func (this *Game2005) SendVipLvUpMail(accountId string, oldLv int32, newLv int32, upTime int32) bool {
|
||||||
|
gameMailApiUrl := "https://gamemail.kingsome.cn/webapp/index.php"
|
||||||
|
if !f5.IsOnlineEnv() {
|
||||||
|
gameMailApiUrl = "https://gamemail-test.kingsome.cn/webapp/index.php"
|
||||||
|
}
|
||||||
|
mailMeta := this.vipLvUpMailMeta
|
||||||
|
for vipLv := oldLv + 1; vipLv <= newLv; vipLv++ {
|
||||||
|
params := q5.NewMxoObject()
|
||||||
|
params.SetXValue("c", q5.NewXString("MailMgr"))
|
||||||
|
params.SetXValue("a", q5.NewXString("sendMail"))
|
||||||
|
params.SetXValue("gameid", q5.NewXInt32(this.GetGameId()))
|
||||||
|
params.SetXValue("to", q5.NewXString(accountId))
|
||||||
|
params.SetXValue("mailtype", q5.NewXInt32(1))
|
||||||
|
params.SetXValue("mailsubtype", q5.NewXInt32(-2))
|
||||||
|
params.SetXValue("usertype", q5.NewXInt32(2))
|
||||||
|
params.SetXValue("content", q5.NewXString(mailMeta.GetContent()))
|
||||||
|
params.SetXValue("subject", q5.NewXString(mailMeta.GetSubject()))
|
||||||
|
params.SetXValue("sendtime", q5.NewXInt32(upTime))
|
||||||
|
params.SetXValue("expiretime", q5.NewXInt32(upTime + 3600 * 24 * 30))
|
||||||
|
params.SetXValue("attachments", q5.NewXString(mailMeta.GetAttachmentsByLv(vipLv)))
|
||||||
|
respObj, respStr, err := q5.HttpGetAsJson(gameMailApiUrl, params.AsXObject())
|
||||||
|
if err != nil {
|
||||||
|
f5.SysLog().Warning("url:%s resp:%s", gameMailApiUrl, respStr)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if !(respObj.GetSimpleStr("errcode", "") == "0" &&
|
||||||
|
respObj.GetSimpleStr("errcode", "") == "1008") {
|
||||||
|
f5.SysLog().Warning("url:%s resp:%s", gameMailApiUrl, respStr)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Game2005) SendPriviDailyMail(accountId string, priviLv int32) bool {
|
func (this *Game2005) SendPriviDailyMail(accountId string, priviLv int32, sendTime int32) bool {
|
||||||
|
gameMailApiUrl := "https://gamemail.kingsome.cn/webapp/index.php"
|
||||||
|
if !f5.IsOnlineEnv() {
|
||||||
|
gameMailApiUrl = "https://gamemail-test.kingsome.cn/webapp/index.php"
|
||||||
|
}
|
||||||
|
mailMeta := this.priviDailyMailMeta
|
||||||
|
params := q5.NewMxoObject()
|
||||||
|
params.SetXValue("c", q5.NewXString("MailMgr"))
|
||||||
|
params.SetXValue("a", q5.NewXString("sendMail"))
|
||||||
|
params.SetXValue("gameid", q5.NewXInt32(this.GetGameId()))
|
||||||
|
params.SetXValue("to", q5.NewXString(accountId))
|
||||||
|
params.SetXValue("mailtype", q5.NewXInt32(1))
|
||||||
|
params.SetXValue("mailsubtype", q5.NewXInt32(-2))
|
||||||
|
params.SetXValue("usertype", q5.NewXInt32(2))
|
||||||
|
params.SetXValue("content", q5.NewXString(mailMeta.GetContent()))
|
||||||
|
params.SetXValue("subject", q5.NewXString(mailMeta.GetSubject()))
|
||||||
|
params.SetXValue("sendtime", q5.NewXInt32(sendTime))
|
||||||
|
params.SetXValue("expiretime", q5.NewXInt32(sendTime + 3600 * 24 * 30))
|
||||||
|
params.SetXValue("attachments", q5.NewXString(mailMeta.GetAttachmentsByLv(priviLv)))
|
||||||
|
respObj, respStr, err := q5.HttpGetAsJson(gameMailApiUrl, params.AsXObject())
|
||||||
|
if err != nil {
|
||||||
|
f5.SysLog().Warning("url:%s resp:%s", gameMailApiUrl, respStr)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if !(respObj.GetSimpleStr("errcode", "") == "0" &&
|
||||||
|
respObj.GetSimpleStr("errcode", "") == "1008") {
|
||||||
|
f5.SysLog().Warning("url:%s resp:%s", gameMailApiUrl, respStr)
|
||||||
|
return false
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Game2005) SendVipWeeklyMail(accountId string, vipLv int32) bool {
|
func (this *Game2005) SendVipWeeklyMail(accountId string, vipLv int32, sendTime int32) bool {
|
||||||
|
gameMailApiUrl := "https://gamemail.kingsome.cn/webapp/index.php"
|
||||||
|
if !f5.IsOnlineEnv() {
|
||||||
|
gameMailApiUrl = "https://gamemail-test.kingsome.cn/webapp/index.php"
|
||||||
|
}
|
||||||
|
mailMeta := this.vipWeeklyMailMeta
|
||||||
|
params := q5.NewMxoObject()
|
||||||
|
params.SetXValue("c", q5.NewXString("MailMgr"))
|
||||||
|
params.SetXValue("a", q5.NewXString("sendMail"))
|
||||||
|
params.SetXValue("gameid", q5.NewXInt32(this.GetGameId()))
|
||||||
|
params.SetXValue("to", q5.NewXString(accountId))
|
||||||
|
params.SetXValue("mailtype", q5.NewXInt32(1))
|
||||||
|
params.SetXValue("mailsubtype", q5.NewXInt32(-2))
|
||||||
|
params.SetXValue("usertype", q5.NewXInt32(2))
|
||||||
|
params.SetXValue("content", q5.NewXString(mailMeta.GetContent()))
|
||||||
|
params.SetXValue("subject", q5.NewXString(mailMeta.GetSubject()))
|
||||||
|
params.SetXValue("sendtime", q5.NewXInt32(sendTime))
|
||||||
|
params.SetXValue("expiretime", q5.NewXInt32(sendTime + 3600 * 24 * 30))
|
||||||
|
params.SetXValue("attachments", q5.NewXString(mailMeta.GetAttachmentsByLv(vipLv)))
|
||||||
|
respObj, respStr, err := q5.HttpGetAsJson(gameMailApiUrl, params.AsXObject())
|
||||||
|
if err != nil {
|
||||||
|
f5.SysLog().Warning("url:%s resp:%s", gameMailApiUrl, respStr)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if !(respObj.GetSimpleStr("errcode", "") == "0" &&
|
||||||
|
respObj.GetSimpleStr("errcode", "") == "1008") {
|
||||||
|
f5.SysLog().Warning("url:%s resp:%s", gameMailApiUrl, respStr)
|
||||||
|
return false
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Game2005) FetchEventOneDB(conf *MtwGame2005MysqlConf, conn *q5.Mysql) bool {
|
func (this *Game2005) FetchEventOneDB(conf *MtwGame2005MysqlConf, conn *q5.Mysql, sendTime int32) bool {
|
||||||
lastIdx := this.GetDBIdx(conf.GetInstanceId())
|
lastIdx := this.GetDBIdx(conf.GetInstanceId())
|
||||||
for true {
|
for true {
|
||||||
rows, err := conn.Query("SELECT idx, sender_id, event_name, param1, param2 " +
|
rows, err := conn.Query("SELECT idx, sender_id, event_name, param1, param2, createtime " +
|
||||||
"FROM `event` " +
|
"FROM `event` " +
|
||||||
"WHERE idx > ? AND status = 0 AND event_name = 'vip_level_up' " +
|
"WHERE idx > ? AND status = 0 AND event_name = 'vip_level_up' " +
|
||||||
"LIMIT 0, 1000;",
|
"LIMIT 0, 1000;",
|
||||||
@ -167,11 +264,13 @@ func (this *Game2005) FetchEventOneDB(conf *MtwGame2005MysqlConf, conn *q5.Mysql
|
|||||||
var eventName string
|
var eventName string
|
||||||
var param1 string
|
var param1 string
|
||||||
var param2 string
|
var param2 string
|
||||||
rows.Scan(&idx, &senderId, &eventName, ¶m1, ¶m2)
|
var createTime int32
|
||||||
|
rows.Scan(&idx, &senderId, &eventName, ¶m1, ¶m2, &createTime)
|
||||||
if !this.SendVipLvUpMail(
|
if !this.SendVipLvUpMail(
|
||||||
senderId,
|
senderId,
|
||||||
q5.NewXString(param1).GetInt32(),
|
q5.NewXString(param1).GetInt32(),
|
||||||
q5.NewXString(param2).GetInt32()) {
|
q5.NewXString(param2).GetInt32(),
|
||||||
|
createTime) {
|
||||||
f5.SysLog().Warning("FetchEventOneDB sendVipLvUpMail error")
|
f5.SysLog().Warning("FetchEventOneDB sendVipLvUpMail error")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -193,7 +292,7 @@ func (this *Game2005) FetchEventOneDB(conf *MtwGame2005MysqlConf, conn *q5.Mysql
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Game2005) DailyMailOneDB(conf *MtwGame2005MysqlConf, conn *q5.Mysql) bool {
|
func (this *Game2005) DailyMailOneDB(conf *MtwGame2005MysqlConf, conn *q5.Mysql, sendTime int32) bool {
|
||||||
procPriviDailyMail := func(accountId string,
|
procPriviDailyMail := func(accountId string,
|
||||||
priviLv int32,
|
priviLv int32,
|
||||||
nowTime int64,
|
nowTime int64,
|
||||||
@ -202,7 +301,7 @@ func (this *Game2005) DailyMailOneDB(conf *MtwGame2005MysqlConf, conn *q5.Mysql)
|
|||||||
if priviDailyMailLastTime <= 0 ||
|
if priviDailyMailLastTime <= 0 ||
|
||||||
q5.GetDaySeconds(nowTime) > q5.GetDaySeconds(nowTime) {
|
q5.GetDaySeconds(nowTime) > q5.GetDaySeconds(nowTime) {
|
||||||
if priviLv > 0 {
|
if priviLv > 0 {
|
||||||
this.SendPriviDailyMail(accountId, priviLv)
|
this.SendPriviDailyMail(accountId, priviLv, sendTime)
|
||||||
if _, err := conn.Exec("UPDATE `vip_user` SET privi_daily_mail_lasttime = ? WHERE idx = ?;",
|
if _, err := conn.Exec("UPDATE `vip_user` SET privi_daily_mail_lasttime = ? WHERE idx = ?;",
|
||||||
nowTime,
|
nowTime,
|
||||||
idx); err != nil {
|
idx); err != nil {
|
||||||
@ -223,7 +322,7 @@ func (this *Game2005) DailyMailOneDB(conf *MtwGame2005MysqlConf, conn *q5.Mysql)
|
|||||||
if vipWeeklyMailLastTime <= 0 ||
|
if vipWeeklyMailLastTime <= 0 ||
|
||||||
q5.GetDaySeconds(nowTime) > q5.GetDaySeconds(nowTime) {
|
q5.GetDaySeconds(nowTime) > q5.GetDaySeconds(nowTime) {
|
||||||
if vipLv > 0 {
|
if vipLv > 0 {
|
||||||
this.SendVipWeeklyMail(accountId, vipLv)
|
this.SendVipWeeklyMail(accountId, vipLv, sendTime)
|
||||||
if _, err := conn.Exec("UPDATE `vip_user` SET vip_weekly_mail_lasttime = ? WHERE idx = ?;",
|
if _, err := conn.Exec("UPDATE `vip_user` SET vip_weekly_mail_lasttime = ? WHERE idx = ?;",
|
||||||
nowTime,
|
nowTime,
|
||||||
idx); err != nil {
|
idx); err != nil {
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
MT_SERVER_INFO = 0
|
MT_SERVER_INFO = 0
|
||||||
MT_GAME2005_MYSQL_CONF
|
MT_GAME2005_MYSQL_CONF
|
||||||
|
MT_GAME2005_MAIL
|
||||||
MT_MAX
|
MT_MAX
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -18,8 +19,10 @@ type MetaMgr struct {
|
|||||||
func (this *MetaMgr) Init() *MetaMgr {
|
func (this *MetaMgr) Init() *MetaMgr {
|
||||||
this.MetaMgr.Init()
|
this.MetaMgr.Init()
|
||||||
configDir := "../config/"
|
configDir := "../config/"
|
||||||
|
resDir := "../res/"
|
||||||
if !f5.IsOnlineEnv() {
|
if !f5.IsOnlineEnv() {
|
||||||
configDir = "/var/data/conf_test/mailman/"
|
configDir = "/var/data/conf_test/mailman/"
|
||||||
|
resDir = "/var/data/conf_test/mailman/res/"
|
||||||
}
|
}
|
||||||
metaClasses := &[]f5.MetaClass{
|
metaClasses := &[]f5.MetaClass{
|
||||||
f5.MetaClass{
|
f5.MetaClass{
|
||||||
@ -34,6 +37,12 @@ func (this *MetaMgr) Init() *MetaMgr {
|
|||||||
Idx: MT_GAME2005_MYSQL_CONF,
|
Idx: MT_GAME2005_MYSQL_CONF,
|
||||||
RawMeta: (*mt.Game2005MysqlConfMetas)(nil),
|
RawMeta: (*mt.Game2005MysqlConfMetas)(nil),
|
||||||
WrapMeta: (*MtwGame2005MysqlConf)(nil)},
|
WrapMeta: (*MtwGame2005MysqlConf)(nil)},
|
||||||
|
f5.MetaClass{
|
||||||
|
PrimKey: "InstanceId",
|
||||||
|
FileName: resDir + "6000@game2005.mail.json",
|
||||||
|
Idx: MT_GAME2005_MAIL,
|
||||||
|
RawMeta: (*mt.Game2005MailMetas)(nil),
|
||||||
|
WrapMeta: (*MtwGame2005Mail)(nil)},
|
||||||
}
|
}
|
||||||
this.MetaMgr.RegisterMetaClasses(metaClasses)
|
this.MetaMgr.RegisterMetaClasses(metaClasses)
|
||||||
this.Load()
|
this.Load()
|
||||||
@ -60,3 +69,12 @@ func (this *MetaMgr) GetCurrServer() *MtwServerInfo {
|
|||||||
func (this *MetaMgr) GetGame2005MysqlCluster() []*MtwGame2005MysqlConf {
|
func (this *MetaMgr) GetGame2005MysqlCluster() []*MtwGame2005MysqlConf {
|
||||||
return this.GetMetaList(MT_GAME2005_MYSQL_CONF).([]*MtwGame2005MysqlConf)
|
return this.GetMetaList(MT_GAME2005_MYSQL_CONF).([]*MtwGame2005MysqlConf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *MetaMgr) GetGame2005Mail(mailId int32) *MtwGame2005Mail {
|
||||||
|
v, ok := this.MetaMgr.GetMetaById(MT_GAME2005_MAIL,mailId).(*MtwGame2005Mail)
|
||||||
|
if ok {
|
||||||
|
return v
|
||||||
|
} else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "mt"
|
import (
|
||||||
|
"q5"
|
||||||
|
"mt"
|
||||||
|
)
|
||||||
|
|
||||||
type MtwServerInfo struct {
|
type MtwServerInfo struct {
|
||||||
*mt.ServerInfo
|
*mt.ServerInfo
|
||||||
@ -9,3 +12,21 @@ type MtwServerInfo struct {
|
|||||||
type MtwGame2005MysqlConf struct {
|
type MtwGame2005MysqlConf struct {
|
||||||
*mt.Game2005MysqlConf
|
*mt.Game2005MysqlConf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MtwGame2005Mail struct {
|
||||||
|
*mt.Game2005Mail
|
||||||
|
attachments []string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *MtwGame2005Mail) init(){
|
||||||
|
this.attachments = q5.StrSplit(this.GetAttachments(), "|")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func (this *MtwGame2005Mail) GetAttachmentsByLv(lv int32) string {
|
||||||
|
if lv >= 0 && int(lv) < len(this.attachments) {
|
||||||
|
return this.attachments[lv]
|
||||||
|
} else {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -183,6 +183,132 @@ func (x *Game2005MysqlConf) GetDatabase() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Game2005Mail struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Mailid *int32 `protobuf:"varint,1,opt,name=mailid" json:"mailid,omitempty"`
|
||||||
|
Subject *string `protobuf:"bytes,2,opt,name=subject" json:"subject,omitempty"`
|
||||||
|
Content *string `protobuf:"bytes,3,opt,name=content" json:"content,omitempty"`
|
||||||
|
Sendtime *string `protobuf:"bytes,4,opt,name=sendtime" json:"sendtime,omitempty"`
|
||||||
|
Attachments *string `protobuf:"bytes,5,opt,name=attachments" json:"attachments,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Game2005Mail) Reset() {
|
||||||
|
*x = Game2005Mail{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_mt_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Game2005Mail) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Game2005Mail) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *Game2005Mail) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_mt_proto_msgTypes[2]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use Game2005Mail.ProtoReflect.Descriptor instead.
|
||||||
|
func (*Game2005Mail) Descriptor() ([]byte, []int) {
|
||||||
|
return file_mt_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Game2005Mail) GetMailid() int32 {
|
||||||
|
if x != nil && x.Mailid != nil {
|
||||||
|
return *x.Mailid
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Game2005Mail) GetSubject() string {
|
||||||
|
if x != nil && x.Subject != nil {
|
||||||
|
return *x.Subject
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Game2005Mail) GetContent() string {
|
||||||
|
if x != nil && x.Content != nil {
|
||||||
|
return *x.Content
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Game2005Mail) GetSendtime() string {
|
||||||
|
if x != nil && x.Sendtime != nil {
|
||||||
|
return *x.Sendtime
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Game2005Mail) GetAttachments() string {
|
||||||
|
if x != nil && x.Attachments != nil {
|
||||||
|
return *x.Attachments
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type Game2005MailMetas struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Values []*Game2005Mail `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Game2005MailMetas) Reset() {
|
||||||
|
*x = Game2005MailMetas{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_mt_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Game2005MailMetas) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*Game2005MailMetas) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *Game2005MailMetas) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_mt_proto_msgTypes[3]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use Game2005MailMetas.ProtoReflect.Descriptor instead.
|
||||||
|
func (*Game2005MailMetas) Descriptor() ([]byte, []int) {
|
||||||
|
return file_mt_proto_rawDescGZIP(), []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Game2005MailMetas) GetValues() []*Game2005Mail {
|
||||||
|
if x != nil {
|
||||||
|
return x.Values
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type Game2005MysqlConfMetas struct {
|
type Game2005MysqlConfMetas struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -194,7 +320,7 @@ type Game2005MysqlConfMetas struct {
|
|||||||
func (x *Game2005MysqlConfMetas) Reset() {
|
func (x *Game2005MysqlConfMetas) Reset() {
|
||||||
*x = Game2005MysqlConfMetas{}
|
*x = Game2005MysqlConfMetas{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_mt_proto_msgTypes[2]
|
mi := &file_mt_proto_msgTypes[4]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -207,7 +333,7 @@ func (x *Game2005MysqlConfMetas) String() string {
|
|||||||
func (*Game2005MysqlConfMetas) ProtoMessage() {}
|
func (*Game2005MysqlConfMetas) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Game2005MysqlConfMetas) ProtoReflect() protoreflect.Message {
|
func (x *Game2005MysqlConfMetas) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mt_proto_msgTypes[2]
|
mi := &file_mt_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -220,7 +346,7 @@ func (x *Game2005MysqlConfMetas) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use Game2005MysqlConfMetas.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Game2005MysqlConfMetas.ProtoReflect.Descriptor instead.
|
||||||
func (*Game2005MysqlConfMetas) Descriptor() ([]byte, []int) {
|
func (*Game2005MysqlConfMetas) Descriptor() ([]byte, []int) {
|
||||||
return file_mt_proto_rawDescGZIP(), []int{2}
|
return file_mt_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Game2005MysqlConfMetas) GetValues() []*Game2005MysqlConf {
|
func (x *Game2005MysqlConfMetas) GetValues() []*Game2005MysqlConf {
|
||||||
@ -241,7 +367,7 @@ type ServerInfoMetas struct {
|
|||||||
func (x *ServerInfoMetas) Reset() {
|
func (x *ServerInfoMetas) Reset() {
|
||||||
*x = ServerInfoMetas{}
|
*x = ServerInfoMetas{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_mt_proto_msgTypes[3]
|
mi := &file_mt_proto_msgTypes[5]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -254,7 +380,7 @@ func (x *ServerInfoMetas) String() string {
|
|||||||
func (*ServerInfoMetas) ProtoMessage() {}
|
func (*ServerInfoMetas) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *ServerInfoMetas) ProtoReflect() protoreflect.Message {
|
func (x *ServerInfoMetas) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_mt_proto_msgTypes[3]
|
mi := &file_mt_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -267,7 +393,7 @@ func (x *ServerInfoMetas) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use ServerInfoMetas.ProtoReflect.Descriptor instead.
|
// Deprecated: Use ServerInfoMetas.ProtoReflect.Descriptor instead.
|
||||||
func (*ServerInfoMetas) Descriptor() ([]byte, []int) {
|
func (*ServerInfoMetas) Descriptor() ([]byte, []int) {
|
||||||
return file_mt_proto_rawDescGZIP(), []int{3}
|
return file_mt_proto_rawDescGZIP(), []int{5}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ServerInfoMetas) GetValues() []*ServerInfo {
|
func (x *ServerInfoMetas) GetValues() []*ServerInfo {
|
||||||
@ -294,6 +420,16 @@ var file_mt_proto_rawDesc = []byte{
|
|||||||
0x12, 0x0c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0e,
|
0x12, 0x0c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x12, 0x0e,
|
||||||
0x0a, 0x06, 0x70, 0x61, 0x73, 0x73, 0x77, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x12, 0x10,
|
0x0a, 0x06, 0x70, 0x61, 0x73, 0x73, 0x77, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x12, 0x10,
|
||||||
0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
|
0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x22, 0x67, 0x0a, 0x0c, 0x47, 0x61, 0x6d, 0x65, 0x32, 0x30, 0x30, 0x35, 0x4d, 0x61, 0x69, 0x6c,
|
||||||
|
0x12, 0x0e, 0x0a, 0x06, 0x6d, 0x61, 0x69, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||||
|
0x12, 0x0f, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x12, 0x0f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x12, 0x10, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x12, 0x13, 0x0a, 0x0b, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65,
|
||||||
|
0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x22, 0x35, 0x0a, 0x11, 0x47, 0x61, 0x6d,
|
||||||
|
0x65, 0x32, 0x30, 0x30, 0x35, 0x4d, 0x61, 0x69, 0x6c, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x12, 0x20,
|
||||||
|
0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10,
|
||||||
|
0x2e, 0x6d, 0x74, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x32, 0x30, 0x30, 0x35, 0x4d, 0x61, 0x69, 0x6c,
|
||||||
0x22, 0x3f, 0x0a, 0x16, 0x47, 0x61, 0x6d, 0x65, 0x32, 0x30, 0x30, 0x35, 0x4d, 0x79, 0x73, 0x71,
|
0x22, 0x3f, 0x0a, 0x16, 0x47, 0x61, 0x6d, 0x65, 0x32, 0x30, 0x30, 0x35, 0x4d, 0x79, 0x73, 0x71,
|
||||||
0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x76, 0x61,
|
0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x4d, 0x65, 0x74, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x06, 0x76, 0x61,
|
||||||
0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x74, 0x2e,
|
0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x74, 0x2e,
|
||||||
@ -316,21 +452,24 @@ func file_mt_proto_rawDescGZIP() []byte {
|
|||||||
return file_mt_proto_rawDescData
|
return file_mt_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_mt_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
var file_mt_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||||
var file_mt_proto_goTypes = []interface{}{
|
var file_mt_proto_goTypes = []interface{}{
|
||||||
(*ServerInfo)(nil), // 0: mt.ServerInfo
|
(*ServerInfo)(nil), // 0: mt.ServerInfo
|
||||||
(*Game2005MysqlConf)(nil), // 1: mt.Game2005MysqlConf
|
(*Game2005MysqlConf)(nil), // 1: mt.Game2005MysqlConf
|
||||||
(*Game2005MysqlConfMetas)(nil), // 2: mt.Game2005MysqlConfMetas
|
(*Game2005Mail)(nil), // 2: mt.Game2005Mail
|
||||||
(*ServerInfoMetas)(nil), // 3: mt.ServerInfoMetas
|
(*Game2005MailMetas)(nil), // 3: mt.Game2005MailMetas
|
||||||
|
(*Game2005MysqlConfMetas)(nil), // 4: mt.Game2005MysqlConfMetas
|
||||||
|
(*ServerInfoMetas)(nil), // 5: mt.ServerInfoMetas
|
||||||
}
|
}
|
||||||
var file_mt_proto_depIdxs = []int32{
|
var file_mt_proto_depIdxs = []int32{
|
||||||
1, // 0: mt.Game2005MysqlConfMetas.values:type_name -> mt.Game2005MysqlConf
|
2, // 0: mt.Game2005MailMetas.values:type_name -> mt.Game2005Mail
|
||||||
0, // 1: mt.ServerInfoMetas.values:type_name -> mt.ServerInfo
|
1, // 1: mt.Game2005MysqlConfMetas.values:type_name -> mt.Game2005MysqlConf
|
||||||
2, // [2:2] is the sub-list for method output_type
|
0, // 2: mt.ServerInfoMetas.values:type_name -> mt.ServerInfo
|
||||||
2, // [2:2] is the sub-list for method input_type
|
3, // [3:3] is the sub-list for method output_type
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
3, // [3:3] is the sub-list for method input_type
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
3, // [3:3] is the sub-list for extension type_name
|
||||||
0, // [0:2] is the sub-list for field type_name
|
3, // [3:3] is the sub-list for extension extendee
|
||||||
|
0, // [0:3] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_mt_proto_init() }
|
func init() { file_mt_proto_init() }
|
||||||
@ -364,7 +503,7 @@ func file_mt_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_mt_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
file_mt_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*Game2005MysqlConfMetas); i {
|
switch v := v.(*Game2005Mail); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
@ -376,6 +515,30 @@ func file_mt_proto_init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
file_mt_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
file_mt_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*Game2005MailMetas); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_mt_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*Game2005MysqlConfMetas); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_mt_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*ServerInfoMetas); i {
|
switch v := v.(*ServerInfoMetas); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
@ -394,7 +557,7 @@ func file_mt_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_mt_proto_rawDesc,
|
RawDescriptor: file_mt_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 4,
|
NumMessages: 6,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@ -20,6 +20,20 @@ message Game2005MysqlConf
|
|||||||
optional string database = 6;
|
optional string database = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message Game2005Mail
|
||||||
|
{
|
||||||
|
optional int32 mailid = 1;
|
||||||
|
optional string subject = 2;
|
||||||
|
optional string content = 3;
|
||||||
|
optional string sendtime = 4;
|
||||||
|
optional string attachments = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Game2005MailMetas
|
||||||
|
{
|
||||||
|
repeated Game2005Mail values = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message Game2005MysqlConfMetas
|
message Game2005MysqlConfMetas
|
||||||
{
|
{
|
||||||
repeated Game2005MysqlConf values = 1;
|
repeated Game2005MysqlConf values = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user