|
|
|
@ -53,6 +53,14 @@ class PartnerController extends ThinkController
|
|
|
|
|
$map["_string"] = "(contract_start_time <= {$time_end} ) OR (contract_end_time <= {$time_end})";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($_REQUEST['original_package_name']) {
|
|
|
|
|
$game_map['original_package_name'] = ['like',"%{$_REQUEST['original_package_name']}%"];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($_REQUEST['relation_game_name']) {
|
|
|
|
|
$game_map['relation_game_name'] = ['like',"%{$_REQUEST['relation_game_name']}%"];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$page = intval(I('get.p', 0));
|
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
|
$row = intval(I('row', 0));
|
|
|
|
@ -75,10 +83,10 @@ class PartnerController extends ThinkController
|
|
|
|
|
}else{
|
|
|
|
|
$partners = $query
|
|
|
|
|
->field("p.*")
|
|
|
|
|
->page($page,$row)
|
|
|
|
|
// ->page($page,$row)
|
|
|
|
|
->select();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dump($partners);die();
|
|
|
|
|
|
|
|
|
|
//获取公司id
|
|
|
|
|
$partner_ids = array_column($partners, 'id');
|
|
|
|
@ -145,7 +153,6 @@ class PartnerController extends ThinkController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$parseData = array();
|
|
|
|
|
foreach ($partners as $key =>$value) {
|
|
|
|
|
$tmpr = D("CompanyRelation")->getCompanyRelation(1,$value['id']);
|
|
|
|
@ -187,6 +194,18 @@ class PartnerController extends ThinkController
|
|
|
|
|
$value['row'] = empty($row2) ? 1: $row2;
|
|
|
|
|
$parseData[] = $value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['original_package_name'] || $_REQUEST['relation_game_name']) {
|
|
|
|
|
|
|
|
|
|
foreach ( $parseData as $key => $value ) {
|
|
|
|
|
|
|
|
|
|
if (!$value['game']) {
|
|
|
|
|
unset($parseData[$key]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($is_export){
|
|
|
|
|
$this->assign('listData', $parseData);
|
|
|
|
|
$GetData = $_GET;
|
|
|
|
@ -195,10 +214,12 @@ class PartnerController extends ThinkController
|
|
|
|
|
$this->display("export");
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$count = count($parseData);
|
|
|
|
|
/* 查询记录总数 */
|
|
|
|
|
$count = $model
|
|
|
|
|
->where($map)
|
|
|
|
|
->count();
|
|
|
|
|
// $count = $model
|
|
|
|
|
// ->where($map)
|
|
|
|
|
// ->count();
|
|
|
|
|
//分页
|
|
|
|
|
$parameter['p'] = $page;
|
|
|
|
|
$parameter['row'] = $row;
|
|
|
|
@ -206,6 +227,17 @@ class PartnerController extends ThinkController
|
|
|
|
|
if ($page) {
|
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$arraypage = $page;
|
|
|
|
|
$size = $row;//每页显示的记录数
|
|
|
|
|
$parseData = array_slice($parseData, ($arraypage - 1) * $size, $size);
|
|
|
|
|
// $page = set_pagination($count, $row, $parameter);
|
|
|
|
|
// if ($page) {
|
|
|
|
|
// $this->assign('_page', $page);
|
|
|
|
|
// }
|
|
|
|
|
// dump($arraypage);
|
|
|
|
|
// dump($size);die();
|
|
|
|
|
|
|
|
|
|
$this->checkListOrCountAuthRestMap($map,[]);
|
|
|
|
|
$this->assign('listData', $parseData);
|
|
|
|
|
$this->assign('count', $count);
|
|
|
|
|