From b65955742289f513b1ba5de1188fe8aa80015178 Mon Sep 17 00:00:00 2001 From: yangduo Date: Tue, 27 Aug 2024 14:11:23 +0800 Subject: [PATCH 1/5] init gameswitch --- server/marketserver/service/gameswitch.go | 7 +++++++ server/marketserver/service/servicemgr.go | 2 ++ 2 files changed, 9 insertions(+) diff --git a/server/marketserver/service/gameswitch.go b/server/marketserver/service/gameswitch.go index 0281ba4c..1b87b368 100644 --- a/server/marketserver/service/gameswitch.go +++ b/server/marketserver/service/gameswitch.go @@ -11,6 +11,13 @@ type gameSwitch struct { time int64 } +func (this *gameSwitch) init() { + this.GetSwitchList() +} + +func (this *gameSwitch) unInit() { +} + func (this *gameSwitch) GetSwitchList() map[string]int32 { now := f5.GetApp().GetRealSeconds() if now > this.time+30 { diff --git a/server/marketserver/service/servicemgr.go b/server/marketserver/service/servicemgr.go index 4e9d8baa..eb9394ae 100644 --- a/server/marketserver/service/servicemgr.go +++ b/server/marketserver/service/servicemgr.go @@ -6,9 +6,11 @@ type serviceMgr struct { func (this *serviceMgr) Init() { Contribution.init() User.init() + GameSwitches.init() } func (this *serviceMgr) UnInit() { Contribution.unInit() User.unInit() + GameSwitches.unInit() } From eda06c9952864d3dab15858580cba0af86637d37 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 27 Aug 2024 18:04:13 +0800 Subject: [PATCH 2/5] 1 --- server/marketserver/service/user.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/marketserver/service/user.go b/server/marketserver/service/user.go index 4992acb7..e4eec340 100644 --- a/server/marketserver/service/user.go +++ b/server/marketserver/service/user.go @@ -1,9 +1,9 @@ package service import ( - "f5" - "main/constant" - "q5" + //"f5" + //"main/constant" + //"q5" ) //"strings" @@ -18,6 +18,8 @@ func (this *user) unInit() { } func (this *user) InBlackList(userIdentity string) (bool, error) { + return false, nil + /* if userIdentity == "" { return true, nil } @@ -37,4 +39,5 @@ func (this *user) InBlackList(userIdentity string) (bool, error) { blocked = ds.Next() && q5.SafeToInt32(ds.GetByName("blocked")) != 0 && q5.SafeToInt32(ds.GetByName("deleted")) == 0 }) return blocked, queryerr + */ } From d3cd8f5f887219a16ba4fd4347ab617fe0248f98 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 28 Aug 2024 13:32:39 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=BB=91=E7=99=BD?= =?UTF-8?q?=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/confdb.sql | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/database/confdb.sql b/database/confdb.sql index f9941580..2d29ba0d 100644 --- a/database/confdb.sql +++ b/database/confdb.sql @@ -135,6 +135,42 @@ CREATE TABLE `t_super_whitelist` ( ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `t_whitelist` +-- + +DROP TABLE IF EXISTS `t_whitelist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_whitelist` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `user_identity` varchar(60) NOT NULL COMMENT 'account_id or account_address or email', + `enable` int(11) NOT NULL DEFAULT '0' COMMENT '是否生效', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `user_identity` (`user_identity`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_blacklist` +-- + +DROP TABLE IF EXISTS `t_blacklist`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_blacklist` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `user_identity` varchar(60) NOT NULL COMMENT 'account_id or account_address or email', + `enable` int(11) NOT NULL DEFAULT '0' COMMENT '是否生效', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `user_identity` (`user_identity`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; From c5f61f32877828d0b1647b866c249382495928dd Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 29 Aug 2024 11:17:48 +0800 Subject: [PATCH 4/5] 1 --- server/marketserver/api/v1/recharge/recharge.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/marketserver/api/v1/recharge/recharge.go b/server/marketserver/api/v1/recharge/recharge.go index 17ec91ff..0eefbc1a 100644 --- a/server/marketserver/api/v1/recharge/recharge.go +++ b/server/marketserver/api/v1/recharge/recharge.go @@ -239,6 +239,14 @@ func (this *RechargeApi) internalBuy(c *gin.Context, f5.RspErr(c, 500, "server internal error") return } + f5.GetSysLog().Info("recharge net_id:%d currency_name:%s decimal:%d srcPrice:%d bnPrice:%s calls.len:%d jsonRsp:%s", + netId, + currencyMeta.GetCurrencyName(), + currencyMeta.GetCurrencyDecimal(), + srcPrice, + bnPrice.String(), + len(jsonRspObj.Calls), + q5.EncodeJson(&jsonRspObj)); c.JSON(200, jsonRspObj) }) } From cc25d722b077e54d4d8a5af5bbcb0b9859754997 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 29 Aug 2024 14:05:58 +0800 Subject: [PATCH 5/5] 1 --- bin/adminserver/config/game_switch.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/adminserver/config/game_switch.json b/bin/adminserver/config/game_switch.json index 7f573b9b..9cd3b08d 100644 --- a/bin/adminserver/config/game_switch.json +++ b/bin/adminserver/config/game_switch.json @@ -99,6 +99,10 @@ "switch_name": "ui.contribution.show", "switch_desc": "25-贡献点是否显示" }, + { + "switch_name": "ui.activationCode", + "switch_desc": "26-激活码是否显示" + }, { "switch_name": "only.allowed.superWhiteList", "switch_desc": "100-只允许至尊白名单用户登录登录"