添加日志

This commit is contained in:
xman 2025-04-14 15:52:54 +08:00
parent 361008509a
commit 850c962340
3 changed files with 10 additions and 5 deletions

View File

@ -382,7 +382,7 @@ class Order extends Backend
//日志 //日志
$hookParams = [ $hookParams = [
'dispatch' => $orderDispatch, 'dispatch' => $orderDispatch,
'remark' => '', 'remark' => '自动派单,操作人:'.$this->auth->nickname,
]; ];
Hook::listen('order_dispatch_change', $hookParams); Hook::listen('order_dispatch_change', $hookParams);
@ -482,7 +482,7 @@ class Order extends Backend
if(!empty($order->dispatch)){ if(!empty($order->dispatch)){
$orderLogic = new OrderLogic(); $orderLogic = new OrderLogic();
$orderLogic->cancelOrderDispatch($order->dispatch,$this->auth,$params['remark']??'后台取消',false); $orderLogic->cancelOrderDispatch($order->dispatch,$this->auth,'后台取消订单,操作人'.$this->auth->nickname,false);
} }
//日志 //日志

View File

@ -165,7 +165,7 @@ class Dispatch extends Backend
//dispatch log //dispatch log
$hookParams2 = [ $hookParams2 = [
'dispatch' => $this->model->get($this->model->id), 'dispatch' => $this->model->get($this->model->id),
'remark' => '', 'remark' => '手动派单,操作人:'.$this->auth->nickname,
]; ];
Hook::listen('order_dispatch_change', $hookParams2); Hook::listen('order_dispatch_change', $hookParams2);

View File

@ -247,7 +247,7 @@ class Dispatch2 extends Backend
//修改订单状态 //修改订单状态
$OrderLogic = new OrderLogic(); $OrderLogic = new OrderLogic();
$OrderLogic -> dispachFinishAfter($row,['role'=>1,'auth'=>$this->auth,'remark'=>'后台操作adminId:'.$this->auth->id]); $OrderLogic -> dispachFinishAfter($row,['role'=>1,'auth'=>$this->auth,'remark'=>'后台操作完成任务,操作人:'.$this->auth->nickname]);
Db::commit(); Db::commit();
} catch (ValidateException | PDOException | Exception $e) { } catch (ValidateException | PDOException | Exception $e) {
Db::rollback(); Db::rollback();
@ -378,7 +378,12 @@ class Dispatch2 extends Backend
]; ];
Hook::listen('order_dispatch_change', $hookParams);*/ Hook::listen('order_dispatch_change', $hookParams);*/
$OrderLogic->cancelOrderDispatch($item,$this->auth,$remark); $remark2='操作人:'.$this->auth->nickname;
if(!empty($remark)){
$remark2 .= ',说明:'.$remark;
}
$OrderLogic->cancelOrderDispatch($item,$this->auth,$remark2);
} }
Db::commit(); Db::commit();
} catch (PDOException | Exception $e) { } catch (PDOException | Exception $e) {