重复insert user info的 bug修复

This commit is contained in:
wangjinlei
2025-09-05 11:41:28 +08:00
parent 91c233f0b9
commit 599ac5736d
2 changed files with 12 additions and 4 deletions

View File

@@ -33,17 +33,23 @@ class Auto extends Base
public function incaptar(){
$file = "D:/33.docx";
$file = "D:/55.docx";
$cc = docxReader($file);
// echo $cc;die;
$ch = curl_init("http://chat.taimed.cn/v1/chat/completions");
$content = "阅读下面内容按照医生学者的标准总结。内容要求要有疾病诊断、主要症状、六经辨证、药方、思想应用。如果某些内容没有请留空。这些内容可能有多个比如患者多次求医的历史记录。都需要总结。不要带list符号药方无需讲药理直接列出多版本的需要分别列出。";
$content = "阅读下面内容按照医生学者的标准总结。内容要求要有疾病诊断、主要症状、六经辨证、药方、思想应用。如果某些内容没有请留空。这些内容可能有多个比如患者多次求医的历史记录。都需要总结。不要带list符号药方无需讲药理直接列出多版本的需要分别列出。最好以吴雄志的医疗思想去总结思想应用;";
$content .= "内容开始:".$cc . " 内容结束";
echo $content;die;
$data = [
"model" => "llama3",
"messages" => [["role" => "user", "content" => $content]],
"messages" => [
["role"=>"system", "content"=> "你是一名医学学者,请将问题的答案分别回答"],
["role"=>"user", "content" => $content]],
"stream" => false
];

View File

@@ -51,7 +51,9 @@ class Ucenter extends Base{
if(!$reviewer_info){
$insert_reviewer['reviewer_id'] = $data['user_id'];
$insert_reviewer['test_from'] = "getUserInfo";
$this->user_reviewer_info_obj->insert($insert_reviewer);
if(!$this->user_reviewer_info_obj->where("reviewer_id",$data['user_id'])->find()){
$this->user_reviewer_info_obj->insert($insert_reviewer);
}
}
$userInfo['baseInfo']=$this->user_obj