|
|
|
@ -71,14 +71,37 @@ class SocietyInfoController extends ThinkController
|
|
|
|
|
$map['communication_time'] = array('elt', time() - $gap * 86400);
|
|
|
|
|
}
|
|
|
|
|
if (I('sociaty_level') && I('sociaty_level') != '0') $map['sociaty_level'] = I('sociaty_level');
|
|
|
|
|
|
|
|
|
|
//获取分页数据
|
|
|
|
|
$query = $model->where($map)->order("communication_time desc");
|
|
|
|
|
$count = $query->count();
|
|
|
|
|
|
|
|
|
|
$order_query = $query
|
|
|
|
|
->where($map);
|
|
|
|
|
|
|
|
|
|
if (I('data_order')) {
|
|
|
|
|
$data_order = reset(explode(',', $_REQUEST['data_order']));
|
|
|
|
|
$data_order_type = end(explode(',', $_REQUEST['data_order']));
|
|
|
|
|
|
|
|
|
|
if ($data_order == 4 && $data_order_type == "create_time") {
|
|
|
|
|
$order_query = $order_query->order("create_time desc");
|
|
|
|
|
} else if($data_order == 3 && $data_order_type == "create_time") {
|
|
|
|
|
$order_query = $order_query->order("create_time asc");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($data_order == 4 && $data_order_type == "communication_time") {
|
|
|
|
|
$order_query = $order_query->order("communication_time desc");
|
|
|
|
|
} else if($data_order == 3 && $data_order_type == "communication_time") {
|
|
|
|
|
$order_query = $order_query->order("communication_time asc");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->assign('userarpu_order', $data_order);
|
|
|
|
|
$this->assign('userarpu_order_type', $data_order_type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($is_export){
|
|
|
|
|
$map['id'] = ['in',$_REQUEST['ids']];
|
|
|
|
|
$parseData = $query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale,sociaty_level, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account")
|
|
|
|
|
->where($map)
|
|
|
|
|
->order("communication_time desc")
|
|
|
|
|
$parseData = $order_query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale,sociaty_level, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account")
|
|
|
|
|
->select();
|
|
|
|
|
foreach ($parseData as &$v) {
|
|
|
|
|
$v['sociaty_level'] = $this->level[$v['sociaty_level']];
|
|
|
|
@ -96,7 +119,7 @@ class SocietyInfoController extends ThinkController
|
|
|
|
|
$this->export($head, $parseData, "公会信息-".date('Ymd'));
|
|
|
|
|
return ;
|
|
|
|
|
} else {
|
|
|
|
|
$societyInfos = $model->where($map)->order("communication_time desc")->field("*")->page($page,$row)->select();
|
|
|
|
|
$societyInfos = $order_query->page($page,$row)->field("*")->select();
|
|
|
|
|
// dump($societyInfos);die();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|