Merge branch 'feature/user_repeat' into release

master
zhengyongxing 5 years ago
commit 71751034b0

@ -360,6 +360,7 @@ class TestResourceController extends BaseController
if (!empty($i_account)) {
$user=M('user', 'tab_')->field('promote_id,password,phone')->where(['account'=>$i_account])->find();
$promote = $this->get_all_promote();
if (!in_array($user['promote_id'], $promote)) {
M('test_resource', 'tab_')->rollback();//回滚
$this->ajaxReturn(['msg'=>$i_account.'账号不存在' ,'status'=>0]);
@ -480,7 +481,9 @@ class TestResourceController extends BaseController
}
} else {//非新用户
$availableBalance = getAvailableBalance($data['promote_id'],$data['game_id'],$data['server_name']);
$user_promote_id = M('user','tab_')->where(['id'=>$data['user_id']])->find()['promote_id'];
$availableBalance = getAvailableBalance($user_promote_id,$data['game_id'],$data['server_name']);
// var_dump($availableBalance);die();
$promoteAllRecharge = sum_promote_total_money($data['promote_id']);//总充值量
@ -505,7 +508,7 @@ class TestResourceController extends BaseController
$data['is_new'] = 2;
M('promote_game_available_balance','tab_')
->where(['promote_id'=>$data['promote_id'],'game_id'=>$data['game_id'],'server_name'=>$data['server_name']])
->where(['promote_id'=>$user_promote_id,'game_id'=>$data['game_id'],'server_name'=>$data['server_name']])
->setDec('available_balance',$data['apply_resource']);
}

Loading…
Cancel
Save