diff --git a/sql/gamedb.sql b/sql/gamedb.sql index aaf2e5d..97b7f6d 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -83,6 +83,22 @@ CREATE TABLE `equip` ( ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +-- +-- Table structure for table `supplybox` +-- + +DROP TABLE IF EXISTS `supplybox`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `supplybox` ( + `idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id', + `accountid` varchar(60) DEFAULT '' COMMENT '账号id', + `box_id` int(11) NOT NULL COMMENT '补给箱id', + `box_num` int(11) NOT NULL COMMENT '补给箱数量', + `buy_times` int(11) NOT NULL COMMENT '购买次数', + PRIMARY KEY (`idx`), + KEY `accountid` (`accountid`) +) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = utf8 */; diff --git a/webapp/bootstrap/config_loader.php b/webapp/bootstrap/config_loader.php index 51f5cfb..f7ea0f3 100644 --- a/webapp/bootstrap/config_loader.php +++ b/webapp/bootstrap/config_loader.php @@ -62,5 +62,14 @@ function getEquipConfig($equip_table, $item_id) return array_key_exists($item_id, $equip_table) ? $equip_table[$item_id] : null; } +function getSupplyConfig($supply_table, $box_id) +{ + return array_key_exists($box_id, $supply_table) ? $supply_table[$box_id] : null; +} + +function getDropConfig($drop_table, $drop_id) +{ + return array_key_exists($drop_id, $drop_table) ? $drop_table[$drop_id] : null; +} checkMysqlConfig(); checkRedisConfig();