Files
hyperf_service/app/Service/Api/Driver/GetSiteListService.php
2025-04-01 11:49:50 +08:00

51 lines
939 B
PHP

<?php
/**
* This service file is part of item.
*
* @author ctexthuang
* @contact ctexthuang@qq.com
*/
declare(strict_types=1);
namespace App\Service\Api\Driver;
use App\Constants\Admin\CateringCode;
use App\Constants\Common\GoodCode;
use App\Exception\ErrException;
use App\Model\OrderMealCateringLog;
use App\Model\OrderOptionCateringLog;
use App\Model\Site;
use App\Model\Sku;
use Hyperf\Di\Annotation\Inject;
class GetSiteListService extends BaseDriverService
{
/**
* @var Sku
*/
#[Inject]
protected Sku $skuModel;
/**
* @var array
*/
protected array $siteIds;
/**
* @return array
*/
public function handle(): array
{
$res = $this->getTodayList();
if (empty($res)) $res = $this->buildListData();
return $this->return->success('success', ['list' => $res]);
}
// private function setCache() {} //todo 赶时间 后续优化
}