diff --git a/application/common/Logic/OrderLogic.php b/application/common/Logic/OrderLogic.php index 4f89558..f77415a 100644 --- a/application/common/Logic/OrderLogic.php +++ b/application/common/Logic/OrderLogic.php @@ -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;