Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
chenzhi 5 years ago
commit c0a0610ae7

@ -959,7 +959,7 @@ public function auto_rrdae(){
public function updateUserPromoteAccount() public function updateUserPromoteAccount()
{ {
$map['promote_id'] = ['gt', 0]; $map['promote_id'] = ['gt', 0];
$map['_string'] = "promote_account = '' or promote_account = '自然注册' or promote_account = '官方渠道'"; $map['_string'] = "promote_account = '' or promote_account = '自然注册' or promote_account = '官方渠道' or promote_account is NULL";
$userData = M('user', 'tab_')->field('id,promote_id')->where($map)->select(); $userData = M('user', 'tab_')->field('id,promote_id')->where($map)->select();
$userPlayData = M('user_play', 'tab_')->field('id,promote_id')->where($map)->select(); $userPlayData = M('user_play', 'tab_')->field('id,promote_id')->where($map)->select();
$userPlayInfoData = M('user_play_info', 'tab_')->field('id,promote_id')->where($map)->select(); $userPlayInfoData = M('user_play_info', 'tab_')->field('id,promote_id')->where($map)->select();
@ -972,28 +972,31 @@ public function auto_rrdae(){
$userErrorData = empty($userRet['error_data']) ? '' : implode(',', $userRet['error_data']); $userErrorData = empty($userRet['error_data']) ? '' : implode(',', $userRet['error_data']);
$promoteData = $userRet['promote_data']; $promoteData = $userRet['promote_data'];
$userAll = count($userData); $userAll = count($userData);
unset($userData);
$userPlayModel = 'tab_user_play'; $userPlayModel = 'tab_user_play';
$userPlayRet = $this->updateUserPromoteAccountSql($userPlayModel, $userData, $promoteData); $userPlayRet = $this->updateUserPromoteAccountSql($userPlayModel, $userPlayData, $promoteData);
$userPlaySuccess = $userPlayRet['success']; $userPlaySuccess = $userPlayRet['success'];
$userPlayError = $userPlayRet['error']; $userPlayError = $userPlayRet['error'];
$userPlayErrorData = empty($userPlayRet['error_data']) ? '' : implode(',', $userPlayRet['error_data']); $userPlayErrorData = empty($userPlayRet['error_data']) ? '' : implode(',', $userPlayRet['error_data']);
$promoteData = $userPlayRet['promote_data']; $promoteData = $userPlayRet['promote_data'];
$userPlayAll = count($userPlayData); $userPlayAll = count($userPlayData);
unset($userPlayData);
$userPlayInfoModel = 'tab_user_play_info'; $userPlayInfoModel = 'tab_user_play_info';
$userPlayInfoRet = $this->updateUserPromoteAccountSql($userPlayInfoModel, $userData, $promoteData); $userPlayInfoRet = $this->updateUserPromoteAccountSql($userPlayInfoModel, $userPlayInfoData, $promoteData);
$userPlayInfoSuccess = $userPlayInfoRet['success']; $userPlayInfoSuccess = $userPlayInfoRet['success'];
$userPlayInfoError = $userPlayInfoRet['error']; $userPlayInfoError = $userPlayInfoRet['error'];
$userPlayInfoErrorData = empty($userPlayInfoRet['error_data']) ? '' : implode(',', $userPlayInfoRet['error_data']); $userPlayInfoErrorData = empty($userPlayInfoRet['error_data']) ? '' : implode(',', $userPlayInfoRet['error_data']);
$promoteData = $userPlayInfoRet['promote_data']; $promoteData = $userPlayInfoRet['promote_data'];
$userPlayInfoAll = count($userPlayInfoData); $userPlayInfoAll = count($userPlayInfoData);
unset($userPlayInfoData);
echo $userModel . "all--{$userAll} success--{$userSuccess} error--{$userError} error_data--{$userErrorData}"; echo $userModel . "all--{$userAll} success--{$userSuccess} error--{$userError} error_ids--{$userErrorData}";
echo '<br>'; echo '<br>';
echo $userPlayModel . "all--{$userPlayAll} success--{$userPlaySuccess} error--{$userPlayError} error_data--{$userPlayErrorData}"; echo $userPlayModel . "all--{$userPlayAll} success--{$userPlaySuccess} error--{$userPlayError} error_ids--{$userPlayErrorData}";
echo '<br>'; echo '<br>';
echo $userPlayInfoModel . "all--{$userPlayInfoAll} success--{$userPlayInfoSuccess} error--{$userPlayInfoError} error_data--{$userPlayInfoErrorData}"; echo $userPlayInfoModel . "all--{$userPlayInfoAll} success--{$userPlayInfoSuccess} error--{$userPlayInfoError} error_ids--{$userPlayInfoErrorData}";
echo '<br>'; echo '<br>';
} }

@ -2917,7 +2917,7 @@ class DownloadController extends BaseController {
$field = $fieldUC . ',' . $fieldUI; $field = $fieldUC . ',' . $fieldUI;
$subQuery = M('user_play_data_count', 'tab_')->alias('uc') $subQuery = M('user_play_data_count', 'tab_')->alias('uc')
->field($field) ->field($field)
->join('tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') ->join('left join tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->where($map) ->where($map)
->group('uc.role_id,uc.server_id,uc.game_id') ->group('uc.role_id,uc.server_id,uc.game_id')
->buildSql(); ->buildSql();
@ -2927,7 +2927,7 @@ class DownloadController extends BaseController {
$total = []; $total = [];
$total = M('user_play_data_count', 'tab_')->alias('uc') $total = M('user_play_data_count', 'tab_')->alias('uc')
->field($fieldUC) ->field($fieldUC)
->join('tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') ->join('left join tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id')
->where($map) ->where($map)
->find(); ->find();
foreach ($roles as $role) { foreach ($roles as $role) {

Loading…
Cancel
Save