文件还在测试中

This commit is contained in:
2026-08-08 15:53:53 +08:00
parent 5f1e7adb64
commit 8101177cb5
241 changed files with 18074 additions and 22 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Models;
use Core\Model;
class Order extends Model
{
protected $table = 'orders';
protected $orderBy = 'id';
/** 按订单号查询 */
public function byNo(string $no)
{
return $this->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;
}
}