|
|
@@ -448,7 +448,20 @@ class System extends Base
|
|
|
|
|
|
public function toexcel()
|
|
|
{
|
|
|
- $result = db('service_log')->order('start_time', 'desc')->select();
|
|
|
+ $param = input('param.');
|
|
|
+ $start = $param['start'];
|
|
|
+ $end = $param['end'];
|
|
|
+ $where = [];
|
|
|
+ if(!empty($param['user_id'])){
|
|
|
+ $where['user_id'] = $param['user_id'];
|
|
|
+ }
|
|
|
+ if(!empty($param['group_id'])){
|
|
|
+ $where['group_id'] = $param['group_id'];
|
|
|
+ }
|
|
|
+ if(!empty($param['username'])){
|
|
|
+ $where['user_name'] = $param['username'];
|
|
|
+ }
|
|
|
+ $result = db('service_log')->whereBetween('start_time', [strtotime($start), strtotime($end . ' 23:59:59')])->where($where)->order('start_time', 'desc')->select();
|
|
|
|
|
|
//所有客服
|
|
|
$users = db('users')->select();
|