where('order_no', $no); } /** 某客户的订单列表(按手机号或邮箱匹配) */ public function byCustomer(string $phone): array { $out = []; foreach ($this->all() as $r) { if (($r['phone'] ?? '') === $phone || ($r['email'] ?? '') === $phone) $out[] = $r; } return $out; } }