This commit is contained in:
xman 2025-06-13 09:30:54 +08:00
parent 165a310a33
commit 17dcdd4c06

View File

@ -69,14 +69,13 @@ class OrderLogic
}
$params['role'] = $roleInfo['role'];
$params['auth'] = $roleInfo['auth'];
$auth = clone $roleInfo['auth'];
$params['order']= $order;
$params['remark'] = $roleInfo['remark'] ?? $orderDispatch->remark;
Hook::listen('order_change', $params);
if($roleInfo['role'] == 1){ //后台操作
$auth = $roleInfo['auth'];
$groups = $auth->getGroups($auth->id);
$groupName = '';
if(!empty($groups)){
@ -129,8 +128,11 @@ class OrderLogic
//取消
$dispatch->allowField(true)->save(['status' => OrderDispatch::STATUS_CANCEL, 'follow'=>2,'remark' => $remark]);
$auth2 = null;
if(!empty($auth)){
$auth2 = clone $auth;
$groups = $auth->getGroups($auth->id);
$groupName = '';
if(!empty($groups)){
@ -160,7 +162,7 @@ class OrderLogic
$order->save();
$params['order'] = $order;
$params['role'] = 1;
$params['auth'] = $auth;
$params['auth'] = $auth2;
$params['remark'] = '取消任务,订单状态回退';
if (!empty($remark)) {
$params['remark'] .= ',备注:' . $remark;