1
This commit is contained in:
parent
ac9a167919
commit
2ed9efc77c
@ -48,7 +48,7 @@ CREATE TABLE `orderinfo` (
|
|||||||
`try_count` int(11) NOT NULL DEFAULT '0' COMMENT '补单次数',
|
`try_count` int(11) NOT NULL DEFAULT '0' COMMENT '补单次数',
|
||||||
`price` int(11) NOT NULL DEFAULT '0' COMMENT 'price',
|
`price` int(11) NOT NULL DEFAULT '0' COMMENT 'price',
|
||||||
`ipv4` varchar(50) NOT NULL DEFAULT '' COMMENT 'ipv4地址',
|
`ipv4` varchar(50) NOT NULL DEFAULT '' COMMENT 'ipv4地址',
|
||||||
`status` int(11) NOT NULL DEFAULT '0' COMMENT '0: 新添加订单 1:已经完成订单 2:发货成功',
|
`status` int(11) NOT NULL DEFAULT '0' COMMENT '0: 新添加订单 1:已经完成订单',
|
||||||
`confirmtime` int(11) NOT NULL DEFAULT '0' COMMENT 'GameServer订单确认时间',
|
`confirmtime` int(11) NOT NULL DEFAULT '0' COMMENT 'GameServer订单确认时间',
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$g_conf_mysql_cluster = require('../config/pay.mysql.cluster.php');
|
$g_conf_mysql_cluster = require('../config/pay.mysql.cluster.php');
|
||||||
$g_conf_redis_cluster = require('../config/pay.redis.cluster.php');
|
//$g_conf_redis_cluster = require('../config/pay.redis.cluster.php');
|
||||||
|
$g_conf_global_redis = require('../config/pay.global.redis.php');
|
||||||
|
|
||||||
function checkMysqlConfig()
|
function checkMysqlConfig()
|
||||||
{
|
{
|
||||||
@ -40,7 +41,7 @@ function getMysqlConfig($hash_value)
|
|||||||
return $g_conf_mysql_cluster[$idx];
|
return $g_conf_mysql_cluster[$idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRedisConfig($hash_value)
|
/*function getRedisConfig($hash_value)
|
||||||
{
|
{
|
||||||
if ($hash_value < 0) {
|
if ($hash_value < 0) {
|
||||||
die('hash_value < 0 ' . $hash_value);
|
die('hash_value < 0 ' . $hash_value);
|
||||||
@ -48,7 +49,13 @@ function getRedisConfig($hash_value)
|
|||||||
global $g_conf_redis_cluster;
|
global $g_conf_redis_cluster;
|
||||||
$idx = $hash_value % count($g_conf_redis_cluster);
|
$idx = $hash_value % count($g_conf_redis_cluster);
|
||||||
return $g_conf_redis_cluster[$idx];
|
return $g_conf_redis_cluster[$idx];
|
||||||
|
}*/
|
||||||
|
|
||||||
|
function getGlobalRedisConfig()
|
||||||
|
{
|
||||||
|
global $g_conf_global_redis;
|
||||||
|
return $g_conf_global_redis;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkMysqlConfig();
|
checkMysqlConfig();
|
||||||
checkRedisConfig();
|
//checkRedisConfig();
|
||||||
|
@ -1,12 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
require 'classes/OrderCtrl.php';
|
||||||
|
|
||||||
|
use classes;
|
||||||
|
|
||||||
class UnitTestController {
|
class UnitTestController {
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct()
|
||||||
|
{
|
||||||
if (SERVER_ENV == _ONLINE) {
|
if (SERVER_ENV == _ONLINE) {
|
||||||
die("can't create UnitTestController");
|
die("can't create UnitTestController");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function genOrderId()
|
||||||
|
{
|
||||||
|
$order_ctrl = new classes\OrderCtrl();
|
||||||
|
echo json_encode(array(
|
||||||
|
'errcode' => 0,
|
||||||
|
'errmsg' => '',
|
||||||
|
'orderid' => $order_ctrl->genOrder($_REQUEST['account_id']
|
||||||
|
))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user