diff --git a/Application/Admin/Controller/AutoController.class.php b/Application/Admin/Controller/AutoController.class.php index 1e1fd8f12..c704aec94 100644 --- a/Application/Admin/Controller/AutoController.class.php +++ b/Application/Admin/Controller/AutoController.class.php @@ -959,41 +959,44 @@ public function auto_rrdae(){ public function updateUserPromoteAccount() { $map['promote_id'] = ['gt', 0]; - $map['_string'] = "promote_account = '' or promote_account = '自然注册' or promote_account = '官方渠道'"; - $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(); + $map['_string'] = "promote_account = '' or promote_account = '自然注册' or promote_account = '官方渠道' or promote_account is NULL"; + $userModel = M('user', 'tab_'); + $userPlayModel = M('user_play', 'tab_'); + $userPlayInfoModel = M('user_play_info', 'tab_'); + $userData = $userModel->field('id,promote_id')->where($map)->select(); + $userPlayData = $userPlayModel->field('id,promote_id')->where($map)->select(); + $userPlayInfoData = $userPlayInfoModel->field('id,promote_id')->where($map)->select(); $promoteData = []; - $userModel = 'tab_user'; $userRet = $this->updateUserPromoteAccountSql($userModel, $userData, $promoteData); $userSuccess = $userRet['success']; $userError = $userRet['error']; $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 "tab_user:all--{$userAll} success--{$userSuccess} error--{$userError} error_ids--{$userErrorData}"; echo '
'; - echo $userPlayModel . ":all--{$userPlayAll} success--{$userPlaySuccess} error--{$userPlayError} error_data--{$userPlayErrorData}"; + echo "tab_user_play:all--{$userPlayAll} success--{$userPlaySuccess} error--{$userPlayError} error_ids--{$userPlayErrorData}"; echo '
'; - echo $userPlayInfoModel . ":all--{$userPlayInfoAll} success--{$userPlayInfoSuccess} error--{$userPlayInfoError} error_data--{$userPlayInfoErrorData}"; + echo "tab_user_play_info:all--{$userPlayInfoAll} success--{$userPlayInfoSuccess} error--{$userPlayInfoError} error_ids--{$userPlayInfoErrorData}"; echo '
'; } @@ -1011,7 +1014,9 @@ public function auto_rrdae(){ $promoteData[$list['promote_id']] = $promoteAccount; } - $res = M()->query("update `$model` set promote_account = '{$promoteAccount}' where id = {$list['id']}"); + $save['id'] = $list['id']; + $save['promote_account'] = $promoteAccount; + $res = $model->save($save); if ($res === false) { $error++; $errorData = $list['id']; diff --git a/Application/Common/Common/function.php b/Application/Common/Common/function.php index c0396423c..f2413eb40 100644 --- a/Application/Common/Common/function.php +++ b/Application/Common/Common/function.php @@ -1207,13 +1207,13 @@ function age_verify($cardno, $name) //根据配置向接口发送身份证号和姓名进行验证 function age($cardno, $name) { - $host = "http://idcard.market.alicloudapi.com"; - $path = "/lianzhuo/idcard"; + $host = "https://idcardcert.market.alicloudapi.com"; + $path = "/idCardCert"; $method = "GET"; $appcode = C('tool_age.appcode'); $headers = array(); array_push($headers, "Authorization:APPCODE " . $appcode); - $querys = "cardno=" . $cardno . "&name=" . $name; + $querys = "idCard=" . $cardno . "&name=" . $name; $bodys = ""; $url = $host . $path . "?" . $querys; $curl = curl_init(); diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index fa0c69452..bcd31eb76 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2907,7 +2907,8 @@ class DownloadController extends BaseController { ->buildSql(); $map['_string'] = 'ui.role_id in (' . $subQuery . ')'; } - $map['uc.create_time'] = ['between', [$map['begintime'], $map['endtime'] - 1]]; + $secondDay = 24*3600 + 1; + $map['uc.create_time'] = ['between', [$map['begintime']-24*3600, $map['endtime'] - $secondDay]]; unset($map['begintime']); unset($map['endtime']); //$spendMap['_string'] = 'uc.game_id = tab_user_play_info.game_id and uc.server_id = tab_user_play_info.server_id and uc.role_id = tab_user_play_info.role_id'; @@ -2916,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(); @@ -2926,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) { diff --git a/Application/Mobile/Controller/UserController.class.php b/Application/Mobile/Controller/UserController.class.php index 3f1d7cc38..0edcc5872 100644 --- a/Application/Mobile/Controller/UserController.class.php +++ b/Application/Mobile/Controller/UserController.class.php @@ -1000,6 +1000,7 @@ class UserController extends BaseController } $logininfo = $this->suser->login_info(); + if (IS_POST) { $resdata['age_status'] = 0; diff --git a/Application/Mobile/View/User/userauth.html b/Application/Mobile/View/User/userauth.html index 186832a67..436e82ab7 100644 --- a/Application/Mobile/View/User/userauth.html +++ b/Application/Mobile/View/User/userauth.html @@ -14,13 +14,13 @@ - +
真实姓名
- +
@@ -33,13 +33,13 @@ - +
证件号码
- +