From e8c3f021b6152085db427a0299bc47da894a9daa Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 19 Dec 2019 18:08:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E6=9F=A5=E8=AF=A2=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ExportController.class.php | 8 ++++++++ Application/Admin/View/User/rolelist.html | 2 ++ 2 files changed, 10 insertions(+) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 81eec4ed4..15ba5d902 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -111,6 +111,14 @@ class ExportController extends Controller } } + if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { + $map['create_time'] = ['between', [strtotime(I('time_start')), strtotime(I('time_end')) + 86399]]; + } elseif (isset($_REQUEST['time_start'])) { + $map['create_time'] = ['GT', strtotime(I('time_start'))]; + } elseif (isset($_REQUEST['time_end'])) { + $map['create_time'] = ['LT', strtotime(I('time_end')) + 86399]; + } + $csvFileName = $xlsName.'.csv'; //设置好告诉浏览器要下载excel文件的headers header('Content-Description: File Transfer'); diff --git a/Application/Admin/View/User/rolelist.html b/Application/Admin/View/User/rolelist.html index 21e55318c..abd7077d9 100644 --- a/Application/Admin/View/User/rolelist.html +++ b/Application/Admin/View/User/rolelist.html @@ -167,6 +167,8 @@ 'promote_id'=>I('promote_id'), 'game_type'=>I('game_type'), 'xlsname'=>'玩家_角色查询', + 'time_start'=>I('time_start'), + 'time_end'=>I('time_end'), ))}">导出 {$_page}