From 084cb8d1e4c6a4dbdeb520274504e6226aafd7e7 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 17 Aug 2024 19:29:20 +0800 Subject: [PATCH] 1 --- bin/marketserver/res/recharge@recharge.json | 7 ++++++- server/marketserver/api/v1/recharge/recharge.go | 1 + server/marketserver/mtb/mtb.auto_gen.go | 10 ++++++++++ server/marketserver/proto/mt.proto | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/bin/marketserver/res/recharge@recharge.json b/bin/marketserver/res/recharge@recharge.json index a8e3346d..995e56a8 100644 --- a/bin/marketserver/res/recharge@recharge.json +++ b/bin/marketserver/res/recharge@recharge.json @@ -4,6 +4,7 @@ "diamond": 600, "present_diamond": 66, "price": 6, + "can_email_buy": 0, "max_buy_times": 1 }, { @@ -11,13 +12,15 @@ "diamond": 6800, "present_diamond": 1200, "price": 68, - "max_buy_times": 68 + "can_email_buy": 0, + "max_buy_times": 1 }, { "id": 1003, "diamond": 16800, "present_diamond": 3200, "price": 168, + "can_email_buy": 0, "max_buy_times": 1 }, { @@ -25,6 +28,7 @@ "diamond": 26800, "present_diamond": 6200, "price": 268, + "can_email_buy": 0, "max_buy_times": 1 }, { @@ -32,6 +36,7 @@ "diamond": 100, "present_diamond": 0, "price": 1, + "can_email_buy": 1, "max_buy_times": 9999 } ] diff --git a/server/marketserver/api/v1/recharge/recharge.go b/server/marketserver/api/v1/recharge/recharge.go index daac3891..0b17978d 100644 --- a/server/marketserver/api/v1/recharge/recharge.go +++ b/server/marketserver/api/v1/recharge/recharge.go @@ -49,6 +49,7 @@ func (ea *RechargeApi) RechargeList(c *gin.Context) { tmpmap["present_diamond"] = tb.GetPresentDiamond() tmpmap["price"] = tb.GetPrice() tmpmap["max_buy_times"] = tb.GetMaxBuyTimes() + tmpmap["can_email_buy"] = tb.GetCanEmailBuy() currencyList := []struct{ Name string `json:"name"` Address string `json:"address"` diff --git a/server/marketserver/mtb/mtb.auto_gen.go b/server/marketserver/mtb/mtb.auto_gen.go index 5039562a..34282aa4 100644 --- a/server/marketserver/mtb/mtb.auto_gen.go +++ b/server/marketserver/mtb/mtb.auto_gen.go @@ -106,6 +106,7 @@ type Recharge struct { present_diamond int32 price int32 max_buy_times int32 + can_email_buy int32 _flags1_ uint64 _flags2_ uint64 @@ -501,6 +502,14 @@ func (this *Recharge) HasMaxBuyTimes() bool { return (this._flags1_ & (uint64(1) << 5)) > 0 } +func (this *Recharge) GetCanEmailBuy() int32 { + return this.can_email_buy +} + +func (this *Recharge) HasCanEmailBuy() bool { + return (this._flags1_ & (uint64(1) << 6)) > 0 +} + func (this *Web3ServiceCluster) GetUrl() string { return this.url } @@ -593,6 +602,7 @@ func (this *Recharge) LoadFromKv(kv map[string]interface{}) { f5.ReadMetaTableField(&this.present_diamond, "present_diamond", &this._flags1_, 3, kv) f5.ReadMetaTableField(&this.price, "price", &this._flags1_, 4, kv) f5.ReadMetaTableField(&this.max_buy_times, "max_buy_times", &this._flags1_, 5, kv) + f5.ReadMetaTableField(&this.can_email_buy, "can_email_buy", &this._flags1_, 6, kv) } func (this *Web3ServiceCluster) LoadFromKv(kv map[string]interface{}) { diff --git a/server/marketserver/proto/mt.proto b/server/marketserver/proto/mt.proto index 6ab31cab..03428950 100644 --- a/server/marketserver/proto/mt.proto +++ b/server/marketserver/proto/mt.proto @@ -87,6 +87,7 @@ message Recharge optional int32 present_diamond = 3; optional int32 price = 4; optional int32 max_buy_times = 5; + optional int32 can_email_buy = 6; } message Web3ServiceCluster