diff --git a/server/backtask/mtb/mtb.auto_gen.go b/server/backtask/mtb/mtb.auto_gen.go index 33fbec05..9c25b4af 100644 --- a/server/backtask/mtb/mtb.auto_gen.go +++ b/server/backtask/mtb/mtb.auto_gen.go @@ -48,6 +48,7 @@ type BcEventDb struct { type Config struct { gameapi_url string + net_id int32 _flags1_ uint64 _flags2_ uint64 @@ -225,6 +226,14 @@ func (this *Config) HasGameapiUrl() bool { return (this._flags1_ & (uint64(1) << 1)) > 0 } +func (this *Config) GetNetId() int32 { + return this.net_id +} + +func (this *Config) HasNetId() bool { + return (this._flags1_ & (uint64(1) << 2)) > 0 +} + func (this *RankSeason) GetId() int32 { return this.id } @@ -322,6 +331,7 @@ func (this *BcEventDb) LoadFromKv(kv map[string]interface{}) { func (this *Config) LoadFromKv(kv map[string]interface{}) { f5.ReadMetaTableField(&this.gameapi_url, "gameapi_url", &this._flags1_, 1, kv) + f5.ReadMetaTableField(&this.net_id, "net_id", &this._flags1_, 2, kv) } func (this *RankSeason) LoadFromKv(kv map[string]interface{}) { diff --git a/server/backtask/proto/mt.proto b/server/backtask/proto/mt.proto index 5015c195..9e53ab85 100644 --- a/server/backtask/proto/mt.proto +++ b/server/backtask/proto/mt.proto @@ -39,6 +39,7 @@ message BcEventDb message Config { optional string gameapi_url = 1; + optional int32 net_id = 2; } message RankSeason diff --git a/server/backtask/task/webhook.go b/server/backtask/task/webhook.go index 528fb8f6..8d6325d6 100644 --- a/server/backtask/task/webhook.go +++ b/server/backtask/task/webhook.go @@ -3,6 +3,7 @@ package task import ( "q5" "f5" + "mt" "jccommon" "main/constant" "time" @@ -112,7 +113,7 @@ func (this* webHook) orderUpdatedCb(ds *f5.DataSet) bool { rawData := ds.GetByName("raw_data") p := new(jccommon.OrderUpdatedEvent) err := q5.DecodeJson(rawData, &p) - netId := 13473 + netId := mt.Table.Config.GetById(0).GetNetId() if err == nil { startTime := q5.SmartParseTimeToMills(q5.SafeToString(p.Data.StartAt)) endTime := q5.SmartParseTimeToMills(q5.SafeToString(p.Data.EndAt)) @@ -164,7 +165,7 @@ func (this* webHook) activitySaleCb(ds *f5.DataSet) bool { rawData := ds.GetByName("raw_data") p := new(jccommon.ActivitySaleEvent) err := q5.DecodeJson(rawData, &p) - netId := 13473 + netId := mt.Table.Config.GetById(0).GetNetId() if err == nil { indexedAt := q5.SmartParseTimeToMills(q5.SafeToString(p.Data.IndexedAt)) updateFields := [][]string{