feat : catering

This commit is contained in:
2025-03-12 17:26:11 +08:00
parent 3858bc4a5d
commit 467f44f847
12 changed files with 1114 additions and 54 deletions

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Model;
use App\Constants\Common\OrderCode;
use Hyperf\Database\Concerns\BuildsQueries;
use Hyperf\Database\Model\Builder;
use Hyperf\Database\Model\Collection;
@@ -74,4 +75,15 @@ class Order extends Model
{
return $this->where('order_sno',$orderSno)->first();
}
/**
* @param array $orderIds
* @return int
*/
public function isCateringByOrderIds(array $orderIds): int
{
return $this->whereIn('id', $orderIds)->update([
'status' => OrderCode::PLAN
]);
}
}