作者 lyh

gx

@@ -36,6 +36,7 @@ class ChatLogic extends BaseLogic @@ -36,6 +36,7 @@ class ChatLogic extends BaseLogic
36 if(isset($this->param['chat_id'])){ 36 if(isset($this->param['chat_id'])){
37 $chatInfo = $this->model->read(['id'=>$this->param['chat_id']]); 37 $chatInfo = $this->model->read(['id'=>$this->param['chat_id']]);
38 if($chatInfo !== false){ 38 if($chatInfo !== false){
  39 + $this->saveChatItem($chatInfo['id'],$this->param['message']);
39 $list = $this->itemModel->list(['chat_id'=>$chatInfo['id']],'id',['*'],'desc',2); 40 $list = $this->itemModel->list(['chat_id'=>$chatInfo['id']],'id',['*'],'desc',2);
40 $message[] = ['role' => 'system', 'content' => "You are now the marketing customer service of 深圳创贸集团"]; 41 $message[] = ['role' => 'system', 'content' => "You are now the marketing customer service of 深圳创贸集团"];
41 foreach ($list as $val){ 42 foreach ($list as $val){