测试资源

master
sunke 5 years ago
parent bcb71c25cb
commit 9df85a49d4

@ -481,17 +481,7 @@ class DownloadController extends BaseController {
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%']; $map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select(); $rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = ''; $childPromoteIds = '';
if(empty($rs)) {
$map['tab_test_resource.promote_id'] = PID; $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];
}
if(!empty(I('role_name'))){ if(!empty(I('role_name'))){
$map['role_name']=['like','%'.I('role_name').'%']; $map['role_name']=['like','%'.I('role_name').'%'];
@ -547,17 +537,7 @@ class DownloadController extends BaseController {
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%']; $map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select(); $rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = ''; $childPromoteIds = '';
if(empty($rs)) {
$map['tab_test_resource.promote_id'] = PID; $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];
}
if(!empty(I('type'))||I('type')==='0'){ if(!empty(I('type'))||I('type')==='0'){
$map['apply_status']=I('type'); $map['apply_status']=I('type');
@ -617,17 +597,7 @@ class DownloadController extends BaseController {
$map1['chain'] = ['like','%'.'/'.PID.'/'.'%']; $map1['chain'] = ['like','%'.'/'.PID.'/'.'%'];
$rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select(); $rs = M('promote','tab_')->where($map1)->field('id,account,nickname')->select();
$childPromoteIds = ''; $childPromoteIds = '';
if(empty($rs)) {
$map['tab_test_resource.promote_id'] = PID; $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];
}
if(!empty(I('server_name'))){ if(!empty(I('server_name'))){
$map['tab_test_resource.server_name']=I('server_name'); $map['tab_test_resource.server_name']=I('server_name');

Loading…
Cancel
Save