delete BC_CHANNEL code
This commit is contained in:
parent
f765caa9f8
commit
daa332818a
@ -146,14 +146,6 @@ class BaseAuthedController extends BaseController {
|
||||
}
|
||||
}
|
||||
$this->updateActive($r);
|
||||
/*if (SERVER_ENV == _ONLINE) {
|
||||
if (phpcommon\cmpVersion(getReqVal('_version', ''), '0.2.0') > 0) {
|
||||
if (!$this->isWhiteList() || myself()->_getChannel() != BC_CHANNEL) {
|
||||
phpcommon\sendError(1002, '');
|
||||
die();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
protected function updateActive($r)
|
||||
|
@ -236,8 +236,6 @@ class TempToolsController extends BaseController {
|
||||
$this->exportData2();
|
||||
} else if($type == 3) {
|
||||
$this->exportData3();
|
||||
} else if($type == 4) {
|
||||
$this->exportData4();
|
||||
}
|
||||
}
|
||||
|
||||
@ -321,42 +319,6 @@ class TempToolsController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
public function exportData4()
|
||||
{
|
||||
$conn = myself()->_getMysql('');
|
||||
$rows = $conn->execQuery(
|
||||
'SELECT account_id, name FROM t_user',
|
||||
array(
|
||||
|
||||
)
|
||||
);
|
||||
$data = array();
|
||||
foreach ($rows as $row) {
|
||||
$channel = phpcommon\extractChannel($row['account_id']);
|
||||
if ($channel == BC_CHANNEL) {
|
||||
$row2 = $conn->execQueryOne(
|
||||
'SELECT count(*) AS battle_times FROM t_battle_record WHERE account_id=:account_id',
|
||||
array(
|
||||
':account_id' => $row['account_id']
|
||||
)
|
||||
);
|
||||
$data[$row['account_id']] = array(
|
||||
'account_id' => $row['account_id'],
|
||||
'name' => $row['name'],
|
||||
'battle_times' => $row2 ? $row2['battle_times'] : 0
|
||||
);
|
||||
}
|
||||
}
|
||||
echo 'account_id' . ",name,game_times\n";
|
||||
foreach ($data as $item) {
|
||||
echo
|
||||
$item['account_id'] . ','
|
||||
. $item['name'] . ','
|
||||
. $item['battle_times']
|
||||
. "\n";
|
||||
}
|
||||
}
|
||||
|
||||
public function exportLock()
|
||||
{
|
||||
$beginTime = getReqVal('begin_time', '0');
|
||||
|
@ -65,14 +65,6 @@ class UserController extends BaseAuthedController {
|
||||
$this->_updateUserInfo(array(
|
||||
'last_login_time'=>myself()->_getNowTime(),
|
||||
));
|
||||
if ($this->_getChannel() == BC_CHANNEL &&
|
||||
empty($userInfo['address'])
|
||||
) {
|
||||
User::Update(array(
|
||||
'address' => $this->_getOpenId()
|
||||
));
|
||||
$userInfo['address'] = $this->_getOpenId();
|
||||
}
|
||||
$this->_updateLastSeason($userInfo);
|
||||
$this->_updateSubUserAccount();
|
||||
$this->_sign();
|
||||
@ -491,7 +483,7 @@ class UserController extends BaseAuthedController {
|
||||
'name' => $name,
|
||||
);
|
||||
if (SERVER_ENV == _ONLINE) {
|
||||
$filter['channel'] = BC_CHANNEL;
|
||||
$filter['channel'] = IMTBL_CHANNEL;
|
||||
}
|
||||
$userDb = SqlHelper::ormSelectOne
|
||||
($this->_getMysql($name),
|
||||
@ -503,7 +495,7 @@ class UserController extends BaseAuthedController {
|
||||
return;
|
||||
}
|
||||
$channel = phpcommon\extractChannel($userDb['account_id']);
|
||||
if ($channel != BC_CHANNEL) {
|
||||
if ($channel != IMTBL_CHANNEL) {
|
||||
if (SERVER_ENV == _ONLINE) {
|
||||
$this->_rspErr(1, 'not found');
|
||||
return;
|
||||
@ -1035,9 +1027,6 @@ class UserController extends BaseAuthedController {
|
||||
'head_id' => 50001,
|
||||
'head_list' => json_encode(array(50001)),
|
||||
);
|
||||
if ($this->_getChannel() == BC_CHANNEL) {
|
||||
$fields['address'] = $this->_getOpenId();
|
||||
}
|
||||
$row = SqlHelper::ormSelectOne(
|
||||
myself()->_getAccountMysql(),
|
||||
't_immutable_account',
|
||||
@ -1051,6 +1040,9 @@ class UserController extends BaseAuthedController {
|
||||
$fields['is_gain_item'] = 1;
|
||||
}
|
||||
}
|
||||
if ($row && !empty($row['email'])){
|
||||
$fields['email'] = $row['email'];
|
||||
}
|
||||
|
||||
SqlHelper::upsert
|
||||
($this->_getSelfMysql(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user