|
|
|
@ -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();
|
|
|
|
@ -831,6 +801,9 @@ class DownloadController extends BaseController {
|
|
|
|
|
* @author sunke
|
|
|
|
|
*/
|
|
|
|
|
public function regist_data_export() {
|
|
|
|
|
if (empty(I('begtime')) || empty(I('endtime'))) {
|
|
|
|
|
$this->error('请选择起止时间');
|
|
|
|
|
}
|
|
|
|
|
$beginTime = strtotime(I('begtime') . ' 00:00:00');
|
|
|
|
|
$endtime = strtotime(I('endtime') . ' 23:59:59');
|
|
|
|
|
if (($endtime - $beginTime) > 31 * 24 * 3600) {
|
|
|
|
@ -852,7 +825,7 @@ class DownloadController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
$levelPromote = $this->getLevelPromote();
|
|
|
|
|
$queryPromote = $this->getQueryPromote($levelPromote);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$map2[] = [
|
|
|
|
|
'_logic' => 'or',
|
|
|
|
|
'id' => $queryPromote['id'],
|
|
|
|
|