From ccf6656ad79a246ff868648d43ba2fae08eadc02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E9=B9=84?= <1182383+zhc02@users.noreply.gitee.com> Date: Mon, 16 Dec 2019 23:50:37 +0800 Subject: [PATCH] 1 --- application/admin/controller/Visitor.php | 63 ++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 application/admin/controller/Visitor.php diff --git a/application/admin/controller/Visitor.php b/application/admin/controller/Visitor.php new file mode 100644 index 0000000..16b12d7 --- /dev/null +++ b/application/admin/controller/Visitor.php @@ -0,0 +1,63 @@ +isAjax()) { + $limit = input('param.limit'); + $list = VisitorLogic::getVisitorList( $limit); + return $this->response->api($list->items() ? $list->items() : '', self::SUCCESS_CODE, '操作成功', ['count' => $list->total()]); + } + return $this->fetch(); + } + + /** + * 获取聊天记录 + * @param $param + * @return array + */ + public function chatLogList(){ + if (request()->isAjax()) { + $name =input('param.name'); + $limit = input('param.limit'); + $list = ChatLogLogic::getChatLogList('',$name, $limit); + return $this->response->api($list->items() ? $list->items() : '', self::SUCCESS_CODE, '操作成功', ['count' => $list->total()]); + } + return $this->fetch(); + + } + /** + * 获取服务记录列表 + * @param $param + * @return array + */ + public function serviceList(){ + if (request()->isAjax()) { + $limit = input('param.limit'); + $name =input('param.name'); + $where=[]; + if($name){ + $where[]=['kefu_name','=',$name]; + } + $list = VisitorLogic::getServiceList($where, $limit); + return $this->response->api($list->items() ? $list->items() : '', self::SUCCESS_CODE, '操作成功', ['count' => $list->total()]); + } + return $this->fetch(); + } +} \ No newline at end of file