From d59c934b09193ae7d27373ec38832880b74699ba Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Mon, 2 Dec 2019 17:05:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=85=85=E5=80=BC=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/DownloadController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 4c7195b38..bcd31eb76 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2917,7 +2917,7 @@ class DownloadController extends BaseController { $field = $fieldUC . ',' . $fieldUI; $subQuery = M('user_play_data_count', 'tab_')->alias('uc') ->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) ->group('uc.role_id,uc.server_id,uc.game_id') ->buildSql(); @@ -2927,7 +2927,7 @@ class DownloadController extends BaseController { $total = []; $total = M('user_play_data_count', 'tab_')->alias('uc') ->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) ->find(); foreach ($roles as $role) { From 014a0e2f342fbf772b305944f0bbe45af9319420 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 2 Dec 2019 17:07:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=84=9A=E6=9C=AC=EF=BC=9A=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=8E=A8=E5=B9=BF=E5=91=98=E6=95=B0=E6=8D=AE=E5=88=B7?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/AutoController.class.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index 1e1fd8f12..4c8ee95ff 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -959,7 +959,7 @@ public function auto_rrdae(){ public function updateUserPromoteAccount() { $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(); $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(); @@ -972,28 +972,31 @@ public function auto_rrdae(){ $userErrorData = empty($userRet['error_data']) ? '' : implode(',', $userRet['error_data']); $promoteData = $userRet['promote_data']; $userAll = count($userData); + unset($userData); $userPlayModel = 'tab_user_play'; - $userPlayRet = $this->updateUserPromoteAccountSql($userPlayModel, $userData, $promoteData); + $userPlayRet = $this->updateUserPromoteAccountSql($userPlayModel, $userPlayData, $promoteData); $userPlaySuccess = $userPlayRet['success']; $userPlayError = $userPlayRet['error']; $userPlayErrorData = empty($userPlayRet['error_data']) ? '' : implode(',', $userPlayRet['error_data']); $promoteData = $userPlayRet['promote_data']; $userPlayAll = count($userPlayData); + unset($userPlayData); $userPlayInfoModel = 'tab_user_play_info'; - $userPlayInfoRet = $this->updateUserPromoteAccountSql($userPlayInfoModel, $userData, $promoteData); + $userPlayInfoRet = $this->updateUserPromoteAccountSql($userPlayInfoModel, $userPlayInfoData, $promoteData); $userPlayInfoSuccess = $userPlayInfoRet['success']; $userPlayInfoError = $userPlayInfoRet['error']; $userPlayInfoErrorData = empty($userPlayInfoRet['error_data']) ? '' : implode(',', $userPlayInfoRet['error_data']); $promoteData = $userPlayInfoRet['promote_data']; $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 '
'; - echo $userPlayModel . ":all--{$userPlayAll} success--{$userPlaySuccess} error--{$userPlayError} error_data--{$userPlayErrorData}"; + echo $userPlayModel . ":all--{$userPlayAll} success--{$userPlaySuccess} error--{$userPlayError} error_ids--{$userPlayErrorData}"; echo '
'; - echo $userPlayInfoModel . ":all--{$userPlayInfoAll} success--{$userPlayInfoSuccess} error--{$userPlayInfoError} error_data--{$userPlayInfoErrorData}"; + echo $userPlayInfoModel . ":all--{$userPlayInfoAll} success--{$userPlayInfoSuccess} error--{$userPlayInfoError} error_ids--{$userPlayInfoErrorData}"; echo '
'; }