添加日志

This commit is contained in:
xman 2025-04-14 10:28:53 +08:00
parent a37cd1b7f3
commit 25f1c91271

View File

@ -154,6 +154,21 @@ class Dispatch extends Backend
$result = $this->model->allowField(true)->save($insert);
$order->status = Order::STATUS_DISPATCHED;
$order->save();
//order log
$hookparams['order'] = $order;
$hookparams['role'] = 1;
$hookparams['auth'] = $this->auth;
$hookparams['remark'] = '';
Hook::listen('order_change', $hookparams);
//dispatch log
$hookParams2 = [
'dispatch' => $this->model->get($this->model->id),
'remark' => '',
];
Hook::listen('order_dispatch_change', $hookParams2);
Db::commit();
} catch (ValidateException | PDOException | Exception $e) {
Db::rollback();