|
|
|
@ -34,9 +34,10 @@ class MendController extends ThinkController {
|
|
|
|
|
/**
|
|
|
|
|
* 补链记录
|
|
|
|
|
* @param integer $p 分页
|
|
|
|
|
* @param booble IS_POST post请求时为下一页ajax请求
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function recordList($p=1)
|
|
|
|
|
public function recordList($p=1,$export=false)
|
|
|
|
|
{
|
|
|
|
|
$page = intval($p);
|
|
|
|
|
$page = $page ? $page : 1;
|
|
|
|
@ -52,18 +53,24 @@ class MendController extends ThinkController {
|
|
|
|
|
$map['user_account']=array('like','%'.$_REQUEST['account'].'%');
|
|
|
|
|
unset($_REQUEST['account']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data = M("Mend","tab_")
|
|
|
|
|
->field("id,user_account,promote_account,promote_account_to,op_account,order_time,create_time,remark")
|
|
|
|
|
$data = M("Mend","tab_")
|
|
|
|
|
->field("user_account,promote_account,promote_account_to,order_time,create_time,op_account,remark")
|
|
|
|
|
->where($map)
|
|
|
|
|
->order("create_time desc")
|
|
|
|
|
->page($page, $row)
|
|
|
|
|
->select();
|
|
|
|
|
->order("create_time desc");
|
|
|
|
|
|
|
|
|
|
if($export){
|
|
|
|
|
$data = $data->select();
|
|
|
|
|
}else{
|
|
|
|
|
$data = $data->page($page, $row)->select();
|
|
|
|
|
}
|
|
|
|
|
//格式化信息
|
|
|
|
|
foreach ($data as $key => $value) {
|
|
|
|
|
$data[$key]['create_time'] = date("Y-m-d H:i:s",$value['create_time']);
|
|
|
|
|
$data[$key]['order_time'] = date("Y-m-d",$value['order_time']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($export) db2csv($data,"推广员管理_推广补链_补链记录",["玩家账号","补链前渠道","补链后渠道","切分时间","补链时间","操作人员","备注"]);
|
|
|
|
|
|
|
|
|
|
if(IS_POST){
|
|
|
|
|
$page = set_pagination($_REQUEST['row_count'],$row);
|
|
|
|
|
$this->ajaxReturn(array(
|
|
|
|
@ -83,6 +90,7 @@ class MendController extends ThinkController {
|
|
|
|
|
$this->display();
|
|
|
|
|
// parent::lists("Mend",$p,$map);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function edit($id = null)
|
|
|
|
|
{
|
|
|
|
|