1
This commit is contained in:
parent
728465f9b5
commit
dccdde6aa4
@ -6,6 +6,7 @@ $g_conf_market_mysql_cluster = require('../config/game2006market.mysql.cluster.p
|
||||
$g_conf_mysql_cluster = require('../config/game2006api.mysql.cluster.php');
|
||||
$g_conf_relation_mysql_cluster = require('../config/game2006relation.mysql.cluster.php');
|
||||
$g_conf_mail_mysql_cluster = require('../config/mail.mysql.cluster.php');
|
||||
$g_conf_log_mysql_cluster = require('../config/log.mysql.cluster.php');
|
||||
$g_conf_redis_cluster = require('../config/game2006api.redis.cluster.php');
|
||||
$g_metatables = array();
|
||||
|
||||
@ -82,6 +83,12 @@ function getMailMysqlConfig()
|
||||
return $g_conf_mail_mysql_cluster;
|
||||
}
|
||||
|
||||
function getLogMysqlConfig()
|
||||
{
|
||||
global $g_conf_log_mysql_cluster;
|
||||
return $g_conf_log_mysql_cluster;
|
||||
}
|
||||
|
||||
function getServerSwitchConfig()
|
||||
{
|
||||
global $g_conf_server_switch_cluster;
|
||||
|
@ -9,6 +9,7 @@ class BaseController {
|
||||
private $marketDbConn = null;
|
||||
private $relationDbConn = null;
|
||||
private $mailDbConn = null;
|
||||
private $logDbConn = null;
|
||||
private $timeOffset = 0;
|
||||
private $moduleHash = array();
|
||||
|
||||
@ -191,6 +192,22 @@ class BaseController {
|
||||
return $this->mailDbConn;
|
||||
}
|
||||
|
||||
public function _getLogMysql()
|
||||
{
|
||||
if ($this->logDbConn) {
|
||||
return $this->logDbConn;
|
||||
}
|
||||
$mysql_conf = getLogMysqlConfig();
|
||||
$this->logDbConn = new phpcommon\Mysql(array(
|
||||
'host' => $mysql_conf['host'],
|
||||
'port' => $mysql_conf['port'],
|
||||
'user' => $mysql_conf['user'],
|
||||
'passwd' => $mysql_conf['passwd'],
|
||||
'dbname' => $mysql_conf['dbname'],
|
||||
));
|
||||
return $this->logDbConn;
|
||||
}
|
||||
|
||||
public function _getRelationDbMysql()
|
||||
{
|
||||
if ($this->relationDbConn) {
|
||||
|
@ -62,7 +62,7 @@ class LogService extends BaseService
|
||||
'modifytime' => myself()->_getNowTime()
|
||||
);
|
||||
SqlHelper::insert(
|
||||
myself()->_getMysql($accountId),
|
||||
myself()->_getLogMysql(),
|
||||
't_game_log',
|
||||
$fieldsKv
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user