feat : spu

This commit is contained in:
2025-03-25 15:10:20 +08:00
parent e66ee22015
commit 618b1fd83a
2 changed files with 3 additions and 0 deletions

View File

@@ -87,6 +87,8 @@ class CateringController
/** /**
* 配餐 * 配餐
* @return array * @return array
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
#[RequestMapping(path: "meal/catering", methods: "GET")] #[RequestMapping(path: "meal/catering", methods: "GET")]
#[Scene(scene: "meal_catering")] #[Scene(scene: "meal_catering")]

View File

@@ -85,6 +85,7 @@ class CycleListService extends CateringBaseService
$spuList = $this->spuModel $spuList = $this->spuModel
->leftjoin('sku','spu.id','=','sku.spu_id') ->leftjoin('sku','spu.id','=','sku.spu_id')
->where('spu.caterer_id',$this->adminId) ->where('spu.caterer_id',$this->adminId)
->where('sku.cycle_id',$this->cycleId)
->select(['spu.title','spu.sub_title','spu.id','sku.id as sku_id','sku.title as sku_title']) ->select(['spu.title','spu.sub_title','spu.id','sku.id as sku_id','sku.title as sku_title'])
->get(); ->get();
if ($spuList->isEmpty()) return $this->return->success('success',['list' => []]); if ($spuList->isEmpty()) return $this->return->success('success',['list' => []]);