1
This commit is contained in:
parent
29b0e069d6
commit
5001bc8fc7
@ -48,6 +48,7 @@ type BcEventDb struct {
|
|||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
gameapi_url string
|
gameapi_url string
|
||||||
|
net_id int32
|
||||||
|
|
||||||
_flags1_ uint64
|
_flags1_ uint64
|
||||||
_flags2_ uint64
|
_flags2_ uint64
|
||||||
@ -225,6 +226,14 @@ func (this *Config) HasGameapiUrl() bool {
|
|||||||
return (this._flags1_ & (uint64(1) << 1)) > 0
|
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 {
|
func (this *RankSeason) GetId() int32 {
|
||||||
return this.id
|
return this.id
|
||||||
}
|
}
|
||||||
@ -322,6 +331,7 @@ func (this *BcEventDb) LoadFromKv(kv map[string]interface{}) {
|
|||||||
|
|
||||||
func (this *Config) 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.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{}) {
|
func (this *RankSeason) LoadFromKv(kv map[string]interface{}) {
|
||||||
|
@ -39,6 +39,7 @@ message BcEventDb
|
|||||||
message Config
|
message Config
|
||||||
{
|
{
|
||||||
optional string gameapi_url = 1;
|
optional string gameapi_url = 1;
|
||||||
|
optional int32 net_id = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message RankSeason
|
message RankSeason
|
||||||
|
@ -3,6 +3,7 @@ package task
|
|||||||
import (
|
import (
|
||||||
"q5"
|
"q5"
|
||||||
"f5"
|
"f5"
|
||||||
|
"mt"
|
||||||
"jccommon"
|
"jccommon"
|
||||||
"main/constant"
|
"main/constant"
|
||||||
"time"
|
"time"
|
||||||
@ -112,7 +113,7 @@ func (this* webHook) orderUpdatedCb(ds *f5.DataSet) bool {
|
|||||||
rawData := ds.GetByName("raw_data")
|
rawData := ds.GetByName("raw_data")
|
||||||
p := new(jccommon.OrderUpdatedEvent)
|
p := new(jccommon.OrderUpdatedEvent)
|
||||||
err := q5.DecodeJson(rawData, &p)
|
err := q5.DecodeJson(rawData, &p)
|
||||||
netId := 13473
|
netId := mt.Table.Config.GetById(0).GetNetId()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
startTime := q5.SmartParseTimeToMills(q5.SafeToString(p.Data.StartAt))
|
startTime := q5.SmartParseTimeToMills(q5.SafeToString(p.Data.StartAt))
|
||||||
endTime := q5.SmartParseTimeToMills(q5.SafeToString(p.Data.EndAt))
|
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")
|
rawData := ds.GetByName("raw_data")
|
||||||
p := new(jccommon.ActivitySaleEvent)
|
p := new(jccommon.ActivitySaleEvent)
|
||||||
err := q5.DecodeJson(rawData, &p)
|
err := q5.DecodeJson(rawData, &p)
|
||||||
netId := 13473
|
netId := mt.Table.Config.GetById(0).GetNetId()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
indexedAt := q5.SmartParseTimeToMills(q5.SafeToString(p.Data.IndexedAt))
|
indexedAt := q5.SmartParseTimeToMills(q5.SafeToString(p.Data.IndexedAt))
|
||||||
updateFields := [][]string{
|
updateFields := [][]string{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user