1
This commit is contained in:
parent
676f0eb83f
commit
4fc4b6dc3d
@ -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`
|
||||
--
|
||||
|
@ -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;
|
||||
|
47
webapp/models/BigData.php
Normal file
47
webapp/models/BigData.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace models;
|
||||
|
||||
use mt;
|
||||
use phpcommon\SqlHelper;
|
||||
|
||||
class BigData extends BaseModel {
|
||||
|
||||
public static function getData($type)
|
||||
{
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_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()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user