From 556b5e42cbc05baeead571efdf1faabae66f8b97 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 10 Jun 2024 17:32:49 +0800 Subject: [PATCH] 1 --- sql/gamedb.sql | 36 +++++++++++++++++++++++++++++++- webapp/models/GoldBullion.php | 27 ++++++++++++++++++++++++ webapp/services/LoginService.php | 16 ++++++++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 webapp/models/GoldBullion.php create mode 100644 webapp/services/LoginService.php diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 9a2b2834..558dc545 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -1764,7 +1764,7 @@ CREATE TABLE `t_gold_bullion` ( `net_id` int(11) NOT NULL DEFAULT '0' COMMENT '链id', `gold` bigint NOT NULL DEFAULT '0' COMMENT '金币', `address` varchar(60) COMMENT 'address', - `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态 0:初始 1:超时已领取', + `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态 0:初始 1:已打开', `returned` int(11) NOT NULL DEFAULT '0' COMMENT '是否已超时返还', `return_time` int(11) NOT NULL DEFAULT '0' COMMENT '返还时间', `activated` int(11) NOT NULL DEFAULT '0' COMMENT '是否已上连', @@ -1778,3 +1778,37 @@ CREATE TABLE `t_gold_bullion` ( KEY `idx_address_createtime_activate_status` (`address`, `createtime`, `activate`, `status`) ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_gold_bullion` +-- + +DROP TABLE IF EXISTS `t_gold_bullion`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_gold_bullion` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `src_account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `src_address` varchar(60) COMMENT 'src_address', + `token_id` varchar(60) NOT NULL DEFAULT '' COMMENT 'token_id', + `net_id` int(11) NOT NULL DEFAULT '0' COMMENT '链id', + `gold` bigint NOT NULL DEFAULT '0' COMMENT '金币', + `status` int(11) NOT NULL DEFAULT '0' COMMENT '状态 0:初始 1:已开', + `open_status` int(11) NOT NULL DEFAULT '0' COMMENT '1: 已发送 2:未发送 3:已领取', + `open_address` varchar(60) COMMENT 'open_address', + `open_time` int(11) NOT NULL DEFAULT '0' COMMENT 'open_time', + `open_account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `open_try_count` int(11) NOT NULL DEFAULT '0' COMMENT 'open_try_count', + `returned` int(11) NOT NULL DEFAULT '0' COMMENT '是否已超时返还', + `return_time` int(11) NOT NULL DEFAULT '0' COMMENT '返还时间', + `activated` int(11) NOT NULL DEFAULT '0' COMMENT '是否已上连', + `activate_time` 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 `idx_token_id` (`token_id`), + UNIQUE KEY `idx_token_id_net_id` (`token_id`, `net_id`), + KEY `idx_open_address_open_status` (`open_address`, `open_status`), + KEY `idx_address_createtime_activate_status` (`address`, `createtime`, `activate`, `status`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; diff --git a/webapp/models/GoldBullion.php b/webapp/models/GoldBullion.php new file mode 100644 index 00000000..0f5bb390 --- /dev/null +++ b/webapp/models/GoldBullion.php @@ -0,0 +1,27 @@ +_getSelfMysql(), + 't_gold_bullion', + array( + 'open_address' => myself()->_getAddress(), + 'open_status' => self::OPEN_STATUS_PENDING, + ) + ); + if (count($rows) > 0) { + + } + } + +} diff --git a/webapp/services/LoginService.php b/webapp/services/LoginService.php new file mode 100644 index 00000000..851c296d --- /dev/null +++ b/webapp/services/LoginService.php @@ -0,0 +1,16 @@ +