调整基类更新后置方法&&增加转交、业务单详情

This commit is contained in:
mzl
2025-09-24 15:24:29 +08:00
parent 8f2c47d8cb
commit 07af16ed9d
6 changed files with 173 additions and 10 deletions
+8 -3
View File
@@ -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;
}
/**