sb
This commit is contained in:
parent
165a310a33
commit
17dcdd4c06
|
|
@ -69,14 +69,13 @@ class OrderLogic
|
||||||
}
|
}
|
||||||
$params['role'] = $roleInfo['role'];
|
$params['role'] = $roleInfo['role'];
|
||||||
$params['auth'] = $roleInfo['auth'];
|
$params['auth'] = $roleInfo['auth'];
|
||||||
|
$auth = clone $roleInfo['auth'];
|
||||||
$params['order']= $order;
|
$params['order']= $order;
|
||||||
$params['remark'] = $roleInfo['remark'] ?? $orderDispatch->remark;
|
$params['remark'] = $roleInfo['remark'] ?? $orderDispatch->remark;
|
||||||
|
|
||||||
Hook::listen('order_change', $params);
|
Hook::listen('order_change', $params);
|
||||||
|
|
||||||
if($roleInfo['role'] == 1){ //后台操作
|
if($roleInfo['role'] == 1){ //后台操作
|
||||||
|
|
||||||
$auth = $roleInfo['auth'];
|
|
||||||
$groups = $auth->getGroups($auth->id);
|
$groups = $auth->getGroups($auth->id);
|
||||||
$groupName = '';
|
$groupName = '';
|
||||||
if(!empty($groups)){
|
if(!empty($groups)){
|
||||||
|
|
@ -129,8 +128,11 @@ class OrderLogic
|
||||||
//取消
|
//取消
|
||||||
$dispatch->allowField(true)->save(['status' => OrderDispatch::STATUS_CANCEL, 'follow'=>2,'remark' => $remark]);
|
$dispatch->allowField(true)->save(['status' => OrderDispatch::STATUS_CANCEL, 'follow'=>2,'remark' => $remark]);
|
||||||
|
|
||||||
|
$auth2 = null;
|
||||||
if(!empty($auth)){
|
if(!empty($auth)){
|
||||||
|
|
||||||
|
$auth2 = clone $auth;
|
||||||
|
|
||||||
$groups = $auth->getGroups($auth->id);
|
$groups = $auth->getGroups($auth->id);
|
||||||
$groupName = '';
|
$groupName = '';
|
||||||
if(!empty($groups)){
|
if(!empty($groups)){
|
||||||
|
|
@ -160,7 +162,7 @@ class OrderLogic
|
||||||
$order->save();
|
$order->save();
|
||||||
$params['order'] = $order;
|
$params['order'] = $order;
|
||||||
$params['role'] = 1;
|
$params['role'] = 1;
|
||||||
$params['auth'] = $auth;
|
$params['auth'] = $auth2;
|
||||||
$params['remark'] = '取消任务,订单状态回退';
|
$params['remark'] = '取消任务,订单状态回退';
|
||||||
if (!empty($remark)) {
|
if (!empty($remark)) {
|
||||||
$params['remark'] .= ',备注:' . $remark;
|
$params['remark'] .= ',备注:' . $remark;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user