测试资源

master
sunke 5 years ago
parent bcb71c25cb
commit 9df85a49d4

@ -481,17 +481,7 @@ class DownloadController extends BaseController {
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = '';
if(empty($rs)) {
$map['tab_test_resource.promote_id'] = PID;
}else {
foreach ($rs as $rsKey => $rsValue) {
$id = $rsValue['id'];
$childPromoteIds .= $id.',';
}
$childPromoteIds = rtrim($childPromoteIds, ',');
$childPromoteIds .= ',' . PID;
$map['tab_test_resource.promote_id'] = ['in', $childPromoteIds];
}
$map['tab_test_resource.promote_id'] = PID;
if(!empty(I('role_name'))){
$map['role_name']=['like','%'.I('role_name').'%'];
@ -547,17 +537,7 @@ class DownloadController extends BaseController {
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = '';
if(empty($rs)) {
$map['tab_test_resource.promote_id'] = PID;
}else {
foreach ($rs as $rsKey => $rsValue) {
$id = $rsValue['id'];
$childPromoteIds .= $id.',';
}
$childPromoteIds = rtrim($childPromoteIds, ',');
$childPromoteIds .= ',' . PID;
$map['tab_test_resource.promote_id'] = ['in', $childPromoteIds];
}
$map['tab_test_resource.promote_id'] = PID;
if(!empty(I('type'))||I('type')==='0'){
$map['apply_status']=I('type');
@ -617,33 +597,23 @@ class DownloadController extends BaseController {
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = '';
if(empty($rs)) {
$map['tab_test_resource.promote_id'] = PID;
}else {
foreach ($rs as $rsKey => $rsValue) {
$id = $rsValue['id'];
$childPromoteIds .= $id.',';
}
$childPromoteIds = rtrim($childPromoteIds, ',');
$childPromoteIds .= ',' . PID;
$map['tab_test_resource.promote_id'] = ['in', $childPromoteIds];
}
$map['tab_test_resource.promote_id'] = PID;
if(!empty(I('server_name'))){
$map['tab_test_resource.server_name']=I('server_name');
}
if(!empty(I('game_name'))){
$map['tab_test_resource.game_name']=I('game_name');
}
if(!empty(I('role_name'))){
$map['tab_test_resource.role_name']=['like','%'.I('role_name').'%'];
}
if(!empty(I('user_account'))){
$map['tab_test_resource.user_account']=['like','%'.I('user_account').'%'];
}
if(!empty(I('promote_id'))){
$map['tab_test_resource.promote_id']=I('promote_id');
}
if(!empty(I('server_name'))){
$map['tab_test_resource.server_name']=I('server_name');
}
if(!empty(I('game_name'))){
$map['tab_test_resource.game_name']=I('game_name');
}
if(!empty(I('role_name'))){
$map['tab_test_resource.role_name']=['like','%'.I('role_name').'%'];
}
if(!empty(I('user_account'))){
$map['tab_test_resource.user_account']=['like','%'.I('user_account').'%'];
}
if(!empty(I('promote_id'))){
$map['tab_test_resource.promote_id']=I('promote_id');
}
$conditions = json_encode($map,TRUE);
$addtime = time();
@ -852,7 +822,7 @@ class DownloadController extends BaseController {
}
$levelPromote = $this->getLevelPromote();
$queryPromote = $this->getQueryPromote($levelPromote);
$map2[] = [
'_logic' => 'or',
'id' => $queryPromote['id'],

Loading…
Cancel
Save