1
This commit is contained in:
parent
b03c9c5cfc
commit
fc1e60801c
@ -102,12 +102,6 @@ CREATE TABLE `user` (
|
|||||||
`new_second_equip` int(11) NOT NULL DEFAULT '2' COMMENT '新玩家隔天结算武器',
|
`new_second_equip` int(11) NOT NULL DEFAULT '2' COMMENT '新玩家隔天结算武器',
|
||||||
`sum_coin` double NOT NULL DEFAULT '0' COMMENT '累计充值金额',
|
`sum_coin` double NOT NULL DEFAULT '0' COMMENT '累计充值金额',
|
||||||
`recharge_times_total` int(11) NOT NULL DEFAULT '0' COMMENT '累计充值次数',
|
`recharge_times_total` int(11) NOT NULL DEFAULT '0' COMMENT '累计充值次数',
|
||||||
|
|
||||||
/*
|
|
||||||
`rmb_num` int(11) NOT NULL DEFAULT '0' COMMENT '点券数量',
|
|
||||||
`max_single_recharge` int(11) NOT NULL DEFAULT '0' COMMENT '最大单次充值数量',
|
|
||||||
`passcard` int(11) NOT NULL DEFAULT '0' COMMENT '购买进阶手册状态',
|
|
||||||
*/
|
|
||||||
PRIMARY KEY (`idx`),
|
PRIMARY KEY (`idx`),
|
||||||
UNIQUE KEY `accountid` (`accountid`)
|
UNIQUE KEY `accountid` (`accountid`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
@ -306,22 +300,4 @@ CREATE TABLE `festival_activity` (
|
|||||||
UNIQUE KEY `accountid` (`accountid`)
|
UNIQUE KEY `accountid` (`accountid`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
|
|
||||||
/*DROP TABLE IF EXISTS `orderinfo`;*/
|
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
||||||
/*!40101 SET character_set_client = utf8 */;
|
|
||||||
/*
|
|
||||||
CREATE TABLE `orderinfo` (
|
|
||||||
`idx` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
|
||||||
`accountid` varchar(60) DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
|
|
||||||
`orderid` varchar(60) DEFAULT '' COMMENT '订单id',
|
|
||||||
`rmb_num` int(11) NOT NULL DEFAULT '0' COMMENT '点券数量',
|
|
||||||
`money` int(11) NOT NULL DEFAULT '0' COMMENT '金钱数量',
|
|
||||||
`custom_data` mediumblob COMMENT '其他字段',
|
|
||||||
`itemid` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
|
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
|
||||||
PRIMARY KEY (`idx`),
|
|
||||||
UNIQUE KEY `account_orderid` (`accountid`, `orderid`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
|
||||||
*/
|
|
||||||
-- Dump completed on 2015-08-19 18:51:22
|
-- Dump completed on 2015-08-19 18:51:22
|
||||||
|
@ -254,11 +254,17 @@ class ActivityController{
|
|||||||
} else {
|
} else {
|
||||||
$user_db_str = $r->get($draw_uuid);
|
$user_db_str = $r->get($draw_uuid);
|
||||||
$user_db = json_decode($user_db_str, true);
|
$user_db = json_decode($user_db_str, true);
|
||||||
if (empty($user_db)) {
|
if (empty($user_db) || empty($user_db['draw_list'])) {
|
||||||
phpcommon\sendError(ERR_USER_BASE + 1,'session失效');
|
$user_db_str = $r->get($draw_uuid);
|
||||||
return;
|
$draw_list = $this->randomNewReward(1,$account_id,$now_days);
|
||||||
}
|
$draw_db = json_decode($user_db_str, true);
|
||||||
|
$draw_db = array(
|
||||||
|
'draw_uuid' => $draw_uuid,
|
||||||
|
'draw_list' => $draw_list,
|
||||||
|
);
|
||||||
|
$r -> set($draw_uuid, json_encode($draw_db));
|
||||||
|
$r -> pexpire($draw_uuid, 1000 * 3600 * 24);
|
||||||
|
} else {
|
||||||
foreach ($user_db['draw_list'] as $draw) {
|
foreach ($user_db['draw_list'] as $draw) {
|
||||||
$status = 0;
|
$status = 0;
|
||||||
if (isset($draw['status'])) {
|
if (isset($draw['status'])) {
|
||||||
@ -274,6 +280,7 @@ class ActivityController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => 0,
|
'errcode' => 0,
|
||||||
'errmsg'=> '',
|
'errmsg'=> '',
|
||||||
@ -376,7 +383,6 @@ class ActivityController{
|
|||||||
$weight_sum += $l['jilv'];
|
$weight_sum += $l['jilv'];
|
||||||
}
|
}
|
||||||
$random = Rand(1, $weight_sum);
|
$random = Rand(1, $weight_sum);
|
||||||
// error_log($random);
|
|
||||||
for ($ii = 0; $ii < count($lot_array); $ii++) {
|
for ($ii = 0; $ii < count($lot_array); $ii++) {
|
||||||
|
|
||||||
$l = $this->getLottery($lot_array[$ii]['key']);
|
$l = $this->getLottery($lot_array[$ii]['key']);
|
||||||
@ -853,7 +859,6 @@ class ActivityController{
|
|||||||
$weight_sum += $l['jilv'];
|
$weight_sum += $l['jilv'];
|
||||||
}
|
}
|
||||||
$random = Rand(1, $weight_sum);
|
$random = Rand(1, $weight_sum);
|
||||||
// error_log($random);
|
|
||||||
for ($ii = 0; $ii < count($lot_array); $ii++) {
|
for ($ii = 0; $ii < count($lot_array); $ii++) {
|
||||||
$l = $this->getLottery($lot_array[$ii]['key']);
|
$l = $this->getLottery($lot_array[$ii]['key']);
|
||||||
$weight += $l['jilv'];
|
$weight += $l['jilv'];
|
||||||
@ -1179,7 +1184,7 @@ class ActivityController{
|
|||||||
}
|
}
|
||||||
//固定奖励
|
//固定奖励
|
||||||
$delim2 = ":";
|
$delim2 = ":";
|
||||||
$re_multiply = explode($delim2, $rec['re_reward']);;
|
$re_multiply = explode($delim2, $rec['re_reward']);
|
||||||
array_push($item_list, array(
|
array_push($item_list, array(
|
||||||
'item_id' => $re_multiply[0],
|
'item_id' => $re_multiply[0],
|
||||||
'item_num' => $re_multiply[1],
|
'item_num' => $re_multiply[1],
|
||||||
|
@ -148,20 +148,8 @@ class HangController{
|
|||||||
if (time() >= strtotime($season['open_time']) && time() <= strtotime($season['end_time'])) {
|
if (time() >= strtotime($season['open_time']) && time() <= strtotime($season['end_time'])) {
|
||||||
$open_time = strtotime($season['open_time']);
|
$open_time = strtotime($season['open_time']);
|
||||||
$end_time = strtotime($season['end_time']);
|
$end_time = strtotime($season['end_time']);
|
||||||
/*$ret = $conn->execScript('UPDATE user SET season_time=:season_time, modify_time=:modify_time ' .
|
|
||||||
' WHERE accountid=:accountid;',
|
|
||||||
array(
|
|
||||||
':accountid' => $account_id,
|
|
||||||
':season_time' => $end_time,
|
|
||||||
':modify_time' => time()
|
|
||||||
));
|
|
||||||
if (!$ret) {
|
|
||||||
die();
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
$number = $i;
|
$number = $i;
|
||||||
$item_multiply = $this->getExplode($season['reward']);
|
$item_multiply = $this->getExplode($season['reward']);
|
||||||
//$ii = 0;
|
|
||||||
for($ii = 1; $ii <= count($item_multiply); $ii++) {
|
for($ii = 1; $ii <= count($item_multiply); $ii++) {
|
||||||
$rowpass = $conn->execQueryOne('SELECT active_status, honor_status ' .
|
$rowpass = $conn->execQueryOne('SELECT active_status, honor_status ' .
|
||||||
' FROM passinfo WHERE accountid=:accountid AND passid=:passid;',
|
' FROM passinfo WHERE accountid=:accountid AND passid=:passid;',
|
||||||
|
26
webapp/metatable/item.php
Normal file
26
webapp/metatable/item.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace metatable;
|
||||||
|
|
||||||
|
use phpcommon;
|
||||||
|
|
||||||
|
function getItemConf()
|
||||||
|
{
|
||||||
|
return _internalGetItemConf();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getItemById($param_id)
|
||||||
|
{
|
||||||
|
$conf = getItemConf();
|
||||||
|
$item_id = (int)$item_id;
|
||||||
|
return array_key_exists($item_id, $conf) ? $conf[$item_id] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function _internalGetItemConf()
|
||||||
|
{
|
||||||
|
global $g_item_table;
|
||||||
|
if (!$g_item_table) {
|
||||||
|
$g_item_table = require(getConfigBaseDir() . 'item@item.php');
|
||||||
|
}
|
||||||
|
return $g_item_table;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user