fixed
This commit is contained in:
@@ -55,11 +55,11 @@ class Reportty
|
||||
return json(Tools::set_fail('用户不存在'));
|
||||
}
|
||||
|
||||
$day3 = date('Y-m-d 00:00:00',strtotime('-3 day'));
|
||||
//$day3 = date('Y-m-d 00:00:00',strtotime('-3 day'));
|
||||
$his_record = Db::table('fa_ty_chathistory')
|
||||
//->where('username',$user['username'])
|
||||
->order('id asc')
|
||||
->where('createtime','>',$day3)//3天之内
|
||||
//->where('createtime','>',$day3)//3天之内
|
||||
->select();
|
||||
$config = [
|
||||
'stream'=>false,
|
||||
@@ -72,7 +72,7 @@ class Reportty
|
||||
}
|
||||
$chatobj->setBefore($content);
|
||||
|
||||
$chatobj->chat($question,$config,$answer_json_arr);
|
||||
$chatobj->returnAnswer($question,$config,$answer_json_arr);
|
||||
//把返回的报告保存起来
|
||||
foreach ($answer_json_arr as $josn){
|
||||
$item = json_decode($josn,true);
|
||||
@@ -81,12 +81,13 @@ class Reportty
|
||||
$data = [
|
||||
'doctor'=>$user['username'],
|
||||
//病人
|
||||
'username'=>Db::table('fa_ty_users')->where('doctor',$user['username'])->value('username'),
|
||||
//'username'=>Db::table('fa_ty_users')->where('doctor',$user['username'])->value('username'),
|
||||
'report_content'=>$choice['message']['content'],
|
||||
];
|
||||
Db::table('fa_ty_medical_report')->insert($data);
|
||||
}
|
||||
}
|
||||
return json(Tools::set_ok());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user