eee
This commit is contained in:
@@ -116,8 +116,9 @@ class Model extends Base\Model
|
||||
$connection->commit();
|
||||
return $select;
|
||||
} catch (\Throwable $throwable) {
|
||||
$connection->rollback();
|
||||
return \Kiri::getLogger()->failure($throwable);
|
||||
$model->getLogger()->json_log($throwable);
|
||||
$connection->rollback();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,8 +146,9 @@ class Model extends Base\Model
|
||||
$connection->commit();
|
||||
return $select;
|
||||
} catch (\Throwable $throwable) {
|
||||
$connection->rollback();
|
||||
return \Kiri::getLogger()->failure($throwable);
|
||||
$model->getLogger()->json_log($throwable);
|
||||
$connection->rollback();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,9 +208,10 @@ class Model extends Base\Model
|
||||
public static function inserts(array $data): bool
|
||||
{
|
||||
if (empty($data)) {
|
||||
return trigger_print_error('Insert data empty.', 'mysql');
|
||||
}
|
||||
return static::query()->insert($data);
|
||||
return \Kiri::getLogger()->logCategory('Insert data empty.', 'mysql');
|
||||
} else {
|
||||
return static::query()->insert($data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user