diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 7d212fcc..88fe6a8d 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -57,6 +57,25 @@ CREATE TABLE `t_user` ( ) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `t_bigdata` +-- + +DROP TABLE IF EXISTS `t_bigdata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_bigdata` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id', + `type` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'type', + `data` mediumblob COMMENT 'data', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `account_id_type` (`account_id`, `type`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `t_hero` -- diff --git a/webapp/bootstrap/constant.php b/webapp/bootstrap/constant.php index 8f38f857..7e22cfcb 100644 --- a/webapp/bootstrap/constant.php +++ b/webapp/bootstrap/constant.php @@ -29,11 +29,6 @@ define('TN_WEEKLY_RECHARGE_UPGRADE_TIMES', 10004); define('TN_WEEKLY_SHARE_GAMES', 10005); define('TN_WEEKLY_END', 10005); -define('TN_OFFER_REWARD_BEGIN', 11001); -define('TN_OFFER_REWARD_RECEIVE', 11002); -define('TN_OFFER_REWARD_REFRESH', 11003); -define('TN_OFFER_REWARD_END', 11005); - const kHAT_Begin = 0; const kHAT_Hp = 1; const kHAT_HPRecover = 2; diff --git a/webapp/models/BigData.php b/webapp/models/BigData.php new file mode 100644 index 00000000..9705f2a9 --- /dev/null +++ b/webapp/models/BigData.php @@ -0,0 +1,47 @@ +_getSelfMysql(), + 't_bigdata', + array( + 'account_id' => myself()->_getAccountId(), + 'type' => $type, + ) + ); + return $row ? $row['data'] : null; + } + + + public static function setData($type, $data) + { + SqlHelper::upsert + (myself()->_getSelfMysql(), + 't_bigdata', + array( + 'account_id' => myself()->_getAccountId(), + 'type' => $type + ), + array( + 'data' => $data, + 'modifytime' => myself()->_getNowTime() + ), + array( + 'account_id' => myself()->_getAccountId(), + 'type' => $type, + 'data' => $data, + 'createtime' => myself()->_getNowTime(), + 'modifytime' => myself()->_getNowTime() + ) + ); + } + +} diff --git a/webapp/services/MissionService.php b/webapp/services/MissionService.php index c938adc2..d6141470 100644 --- a/webapp/services/MissionService.php +++ b/webapp/services/MissionService.php @@ -368,6 +368,10 @@ class MissionService extends BaseService { break; case mt\Task::OFFER_REWARD_COND: { + $info = $this->getOfferRewardMissinoInfo($missionDto['mission_id']); + if ($info) { + + } } break; default: @@ -515,4 +519,9 @@ class MissionService extends BaseService { return $missions; } + private function getOfferRewardMissionInfo($missionId) + { + + } + }