This commit is contained in:
aozhiwei 2024-06-21 17:39:36 +08:00
parent 29b0e069d6
commit 5001bc8fc7
3 changed files with 14 additions and 2 deletions

View File

@ -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{}) {

View File

@ -39,6 +39,7 @@ message BcEventDb
message Config
{
optional string gameapi_url = 1;
optional int32 net_id = 2;
}
message RankSeason

View File

@ -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{