更新星火认知模型分析信息

This commit is contained in:
yaooo 2023-10-14 17:24:49 +08:00
parent de6c6021e4
commit 76a52dc9d9
2 changed files with 6 additions and 5 deletions

View File

@ -121,8 +121,11 @@ class UserInformationg extends BaseModel
'status' => 1,
'information_id' => $id,
];
queue(AiAianalyse::class, $data);
return UserInformationgDemand::create($data);
$res = UserInformationgDemand::create($data);
if ($res) {
queue(AiAianalyse::class, $data);
}
return $res;
}
public static function details($id)

View File

@ -80,14 +80,12 @@ class AiAianalyse
break;
}
}
$update_data = [
'ai_aianalyse' => $answer,
'update_time' => time(),
];
unset($data['data'], $data['data_field']);
$id = Db::name('user_informationg_demand')->where($data)->fetchSql(false)->value('id');
Db::name('user_informationg_demand')->where('id', $id)->fetchSql(false)->update($update_data);
Db::name('user_informationg_demand')->where($data)->fetchSql(false)->update($update_data);
}
} catch (\Exception $e) {}
$job->delete();