调整基类更新后置方法&&增加转交、业务单详情
This commit is contained in:
@@ -175,9 +175,14 @@ trait CrudServiceTrait
|
||||
protected function postProcess(string $op, mixed $data): mixed
|
||||
{
|
||||
$hook = "afterService{$op}";
|
||||
return method_exists($this, $hook)
|
||||
? $this->{$hook}($data)
|
||||
: $data;
|
||||
if (method_exists($this, $hook)) {
|
||||
$args = func_get_args();
|
||||
array_shift($args);
|
||||
array_shift($args);
|
||||
$params = array_merge([$data], $args);
|
||||
return call_user_func_array([$this, $hook], $params);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user