Commit 323ddf37 by 冷斌

update

parent 7dee52f5
......@@ -47,7 +47,6 @@ class UserauthController extends AdminbaseController
foreach ($lists as $k => $v) {
$userinfo = M("users")->field("user_nicename")->where("id='$v[uid]'")->find();
$lists[$k]['userinfo'] = $userinfo;
}
$this->assign('lists', $lists);
......@@ -58,8 +57,54 @@ class UserauthController extends AdminbaseController
}
function export() {
var_dump($_POST);
echo 1; die;
$map = [];
if ($_REQUEST['status'] != '') {
$map['status'] = $_REQUEST['status'];
}
if ($_REQUEST['start_time'] != '') {
$map['addtime'] = ["gt", strtotime($_REQUEST['start_time'])];
}
if ($_REQUEST['end_time'] != '') {
$map['addtime'] = ["lt", strtotime($_REQUEST['end_time'])];
}
if ($_REQUEST['start_time'] != '' && $_REQUEST['end_time'] != '') {
$map['addtime'] = ["between", [strtotime($_REQUEST['start_time']), strtotime($_REQUEST['end_time'])]];
}
if ($_REQUEST['keyword'] != '') {
$map['uid|real_name|mobile'] = ["like", "%" . $_REQUEST['keyword'] . "%"];
}
$status=array("0"=>"处理中","1"=>"审核成功", "2"=>"审核失败");
$xlsName = "Excel";
$auth = M("users_auth");
$xlsData=$auth->where($map)->order("addtime DESC")->select();
foreach ($xlsData as $k => $v) {
$userinfo = M("users")->field("user_nicename")->where("id='$v[uid]'")->find();
$xlsData[$k]['user_nicename']= $userinfo['user_nicename']."(".$v['uid'].")";
$xlsData[$k]['addtime']=date("Y-m-d H:i:s",$v['addtime']);
$xlsData[$k]['status']=$status[$v['status']];
$process = '处理中';
if ($v['status'] != 0) {
$process = date("Y-m-d H:i:s",$v['uptime']);
}
$xlsData[$k]['process'] = $process;
}
$action="导出充值记录:".$auth->getLastSql();
setAdminLog($action);
$cellName = array('A','B','C','D','E','F','G','H');
$xlsCell = array(
array('id','序号'),
array('user_nicename','会员'),
array('real_name','真实姓名'),
array('mobile','手机号码'),
array('cer_no','身份证号'),
array('status','审核状态'),
array('addtime','提交时间'),
array('process','处理时间'),
);
exportExcel($xlsName,$xlsCell,$xlsData,$cellName);
}
function del()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment