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

master
zhanglingsheng 5 years ago
commit e82cb419ba

@ -2774,23 +2774,29 @@ class DownloadController extends BaseController {
->buildSql();
unset($map['begintime']);
unset($map['endtime']);
$roles = M('user_play_info', 'tab_')
->field("*,$sqlCost as cost,$sqlCount as count,$sqlTodayCost as today_cost")
->where($map)
->order('play_time desc')
->select();
foreach ($roles as $role) {
$subQuery = M('user_play_info', 'tab_')
->field("*,$sqlCost as recharge_cost,$sqlCount as recharge_count,$sqlTodayCost as recharge_cost_today")
->where($map)
->having('recharge_cost > 0')
->order('play_time desc')
->buildSql();
$roles = M()->field(' * ')
->table($subQuery)
->alias('a')
->order('play_time desc')
->select();
foreach ($roles as $role) {
$records[] = [
'user_account' => $role['user_account'],
'user_account' => encryption($role['user_account']),
'game_name' => $role['game_name'],
'role_name' => $role['role_name'],
'role_id' => $role['role_id'],
'role_level' => $role['role_level'],
'server_id' => $role['server_id'],
'server_name' => $role['server_name'],
'recharge_cost' => $role['cost'],
'recharge_count' => $role['count'],
'recharge_cost_today' => $role['cost_today'],
'recharge_cost' => empty($role['recharge_cost']) ? 0 : $role['recharge_cost'],
'recharge_count' => empty($role['recharge_count']) ? 0 : $role['recharge_count'],
'recharge_cost_today' => empty($role['recharge_cost_today']) ? 0 : $role['recharge_cost_today'],
'play_time' => $role['play_time'],
'play_ip' => $role['play_ip'],
'promote_id' => $role['promote_id'],

@ -567,7 +567,7 @@ class FinanceController extends BaseController
}
//审核拒绝 重新审核
public function renewReview($id)
public function renewReview()
{
//是否是会长
$this->purview();
@ -581,6 +581,29 @@ class FinanceController extends BaseController
$this->ajaxReturn($data);
}
$id = intval($id);
$id = intval(I('id', 0));
$data = M('withdraw', 'tab_')->find($id);
if (empty($data) || $data['status'] != -1) {
$data['status'] = 0;
$data['msg'] = '数据异常';
$this->ajaxReturn($data);
}
if ($data['promote_id'] != $this->loginPromote['id']) {
$data['status'] = 0;
$data['msg'] = '权限异常';
$this->ajaxReturn($data);
}
$save['status'] = 0;
$save['id'] = $id;
$res = M('withdraw', 'tab_')->save($save);
if ($res === false) {
$data['status'] = 0;
$data['msg'] = '提交失败';
} else {
$data['status'] = 1;
$data['msg'] = '提交成功';
}
$this->ajaxReturn($data);
}
}

@ -867,6 +867,7 @@ class PromoteController extends BaseController
$realName = I('real_name', '');
$status = I('status', 'all');
$promoteType = I('promote_type', 0);
$parentId = I('parent_id', 0);
$loginer = $this->getLoginPromote();
$map = [];
@ -892,6 +893,9 @@ class PromoteController extends BaseController
if ($realName) {
$map['real_name'] = ['like', '%' . $realName . '%'];
}
if ($parentId) {
$map['parent_id'] = $parentId;
}
if ($status != 'all') {
$map['status'] = ['eq', $status];
}
@ -899,10 +903,8 @@ class PromoteController extends BaseController
list($records, $pagination, $count) = $this->paginate($query);
foreach ($records as $key => $value) {
$records[$key]['idcard'] = encryption($value['idcard']);
$records[$key]['mobile_phone'] = encryption($value['mobile_phone']);
}
$ids = array_column($records, 'id');
@ -941,6 +943,23 @@ class PromoteController extends BaseController
$promoteTypeName = '推广员';
}
$parentMap = [];
$parentMap['chain'] = ['like', $loginer['chain'] . $loginer['id'] . '/%'];
$isGetParents = true;
if ($loginer['level'] == 1 && $promoteType == 1) {
$parentMap['level'] = 2;
} elseif ($loginer['level'] == 1 && $promoteType == 2) {
$parentMap['level'] = 3;
} elseif ($loginer['level'] == 2 && $promoteType == 2) {
$parentMap['level'] = 3;
} else {
$isGetParents = false;
}
$parents = null;
if ($isGetParents) {
$parents = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where($parentMap)->select();
}
$this->assign('parents', $parents);
$this->assign('promoteTypeName', $promoteTypeName);
$this->assign('hasChildList', $hasChildList);
$this->assign('hasPlayerList', $hasPlayerList);

@ -443,38 +443,13 @@ class SafeController extends BaseController{
public function safeDocument() {
$time = time();
$today = date('Y-m-d');
$username = $_REQUEST['username'];
$tsession =S($today);
if(S($username)) {
$code = S($username);
}else {
if(!empty($tsession)) {
$num = $tsession + 1;
}else {
$num = 1;
}
$promoteRs = M('promote','tab_')->where(['account'=>$username])->getField('create_time',true);
$code = date('Ymd',$promoteRs[0])."_".$num;
}
$loginPromote = $this->getLoginPromote();
$sn = date('Ymd') . '-' . strtoupper(substr(md5($loginPromote['id']), 8, 16));
$endTime = date('Y-m-d',strtotime('+1 year'));
$this->assign('time',date('Y-m-d',$time));
$this->assign('endTime',$endTime);
$this->assign('code',$code);
$this->assign('username',$username);
$this->assign('sn',$sn);
$this->display();
}
public function ajaxAgree() {
$username = $_REQUEST['username'];
$code = $_REQUEST['code'];
$today = date('Y-m-d');
if(empty(S($username))) {
S($username, $code);
$t = S($today);
S($today,$t+1);
}
$this->ajaxReturn(['code'=>10000]);
}
}

@ -174,9 +174,9 @@
<if condition="$vo['status'] eq 2">
<a data-href="{:U('download/Remittancecer',['id'=>$vo['id']])}" class="ajax-get">汇款证明</a>
<elseif condition="$vo['status'] eq -1"/>
<a href="{:U('settlementOrder', array('id'=>$vo['id']))}" style="color: #0bb20c;">重新审核</a>
<span class="renew-review" data-id="{$vo['id']}" style="color: #0bb20c;cursor: pointer;">重新审核</span>
</if>
<a href="{:U('renewReview', array('id'=>$vo['id']))}">结算单</a>
<a href="{:U('settlementOrder', array('id'=>$vo['id']))}">结算单</a>
</td>
</tr>
</volist>
@ -269,6 +269,30 @@
});
$(".select_gallery").select2();
$('.renew-review').click(function () {
var id = parseInt($(this).attr('data-id'));
$.ajax({
type: 'post',
url: '{:U("renewReview")}',
dataType: 'json',
data: {id:id},
success: function (data) {
if (data.status == 1) {
layer.msg(data.msg, {icon: 1});
setTimeout(function(){
window.location.reload();
},2000);
} else {
layer.msg(data.msg, {icon: 5});
}
},
error: function (result) {
layer.msg('网络异常', {icon: 5});
}
});
});
});
</script>

@ -31,6 +31,16 @@
<option value="2" <if condition="I('status') === '2'">selected</if>>冻结中</option>
</select>
</div>
<?php if($parents):?>
<div class="form-group fr normal_space">
<select name="parent_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择上级</option>
<?php foreach($parents as $parent):?>
<option value="<?=$parent['id']?>" <?php if(I('parent_id')==$parent['id']):?>selected<?php endif;?>><?=$parent['account']?>(<?=$parent['real_name']?>)</option>
<?php endforeach;?>
</select>
</div>
<?php endif;?>
<div class="form-group fr normal_space">
<input type="text" name="real_name" class="txt normal_txt" id="uid" placeholder="请输入姓名" value="{:I('real_name')}">
</div>

@ -51,7 +51,7 @@ and open the template in the editor.
<div class="title"><h2>游戏推广服务框架协议</h1></div>
<div class="text">
<p>本协议由以下双方于<span>{$time}</span>签订:</p>
<p>合同编号:{$code}</p>
<p>合同编号:{$sn}</p>
<p style="font-weight: bold">甲方:海南万盟天下科技有限公司</p>
<p>注册地址海南省海口市南海大道26号海口国家高新区创业孵化中心A楼5层A1-1268室</p>
<p>联系电话13067391751</p>
@ -237,8 +237,6 @@ and open the template in the editor.
</div>
<button id="ag" style="width:120px;height:40px;background: #26C7DB;color:white;border:none" >同意</button>
<input type="hidden" id='us' value="{$username}"/>
<input type="hidden" id='code' value="{$code}"/>
<br><br><br><br>
<br><br><br><br>
</div>
@ -247,20 +245,10 @@ and open the template in the editor.
$(function() {
var username = document.getElementById('us').value;
var code = document.getElementById('code').value;
$("#ag").on('click',function(event) {
$.ajax({
type:"POST",
url:"{:U('Safe/ajaxAgree')}",
data:{'username':username,'code':code},
dataType:'json',
success:function(res) {
window.localStorage.setItem('checked','checked');
window.history.back(-1);
}
});
})
window.localStorage.setItem('checked','checked');
window.location.href = "/index.php?s=/Home/Safe/modifyBaseInfo.html"
});
})
</script>

Loading…
Cancel
Save