Merge remote-tracking branch 'origin/dev' into dev

master
liuweiwen 5 years ago
commit 61c2269ffc

@ -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_userall--{$userAll} success--{$userSuccess} error--{$userError} error_ids--{$userErrorData}";
echo '<br>';
echo $userPlayModel . "all--{$userPlayAll} success--{$userPlaySuccess} error--{$userPlayError} error_data--{$userPlayErrorData}";
echo "tab_user_playall--{$userPlayAll} success--{$userPlaySuccess} error--{$userPlayError} error_ids--{$userPlayErrorData}";
echo '<br>';
echo $userPlayInfoModel . "all--{$userPlayInfoAll} success--{$userPlayInfoSuccess} error--{$userPlayInfoError} error_data--{$userPlayInfoErrorData}";
echo "tab_user_play_infoall--{$userPlayInfoAll} success--{$userPlayInfoSuccess} error--{$userPlayInfoError} error_ids--{$userPlayInfoErrorData}";
echo '<br>';
}
@ -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'];

@ -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();

@ -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) {

@ -1000,6 +1000,7 @@ class UserController extends BaseController
}
$logininfo = $this->suser->login_info();
if (IS_POST) {
$resdata['age_status'] = 0;

@ -14,13 +14,13 @@
<a href="javascript:window.history.go(-1);" class="arrows"></a>
</div>
<?php if(!empty($user['real_name'])){ ?>
<?php if(empty($user['real_name'])){ ?>
<div class="name-input">
<div class="name-inputBox">
<img src="__IMG__/shimingrenzhengmoren.png" alt="">
<div>真实姓名</div>
</div>
<input type="text" placeholder="请输入真实姓名" style="padding: 0;color: #292929" name="real_name" id="real_name" value="王大锤">
<input type="text" placeholder="请输入真实姓名" style="padding: 0;color: #292929" name="real_name" id="real_name" value="">
</div>
<?php }else{ ?>
<div class="name-input">
@ -33,13 +33,13 @@
<?php }?>
<?php if(!empty($user['idcard'])){ ?>
<?php if(empty($user['idcard'])){ ?>
<div class="name-input">
<div class="name-inputBox">
<img src="__IMG__/haoma.png" alt="">
<div>证件号码</div>
</div>
<input type="text" placeholder="请输入证件号码" style="padding: 0;color: #292929" name="idcard" id="idcard" value="350516518718718748">
<input type="text" placeholder="请输入证件号码" style="padding: 0;color: #292929" name="idcard" id="idcard" value="">
</div>
<?php }else{ ?>
<div class="name-input">

Loading…
Cancel
Save