public function batchQuery($sqlArray = [])
{
if (!is_array($sqlArray)) {
return false;
}
// 自动启动事务支持
$this->startTrans();
try {
foreach ($sqlArray as $sql) {
$this->execute($sql);
}
// 提交事务
$this->commit();
} catch (\Exception $e) {
$this->rollback();
throw $e;
}
return true;
}