From e838124ed314621563d0bc61b3893b2b1dc7c206 Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Wed, 9 Apr 2025 16:14:30 +0800 Subject: [PATCH] feat : rank --- app/Model/Sku.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/Model/Sku.php b/app/Model/Sku.php index 390a11d..8180c79 100644 --- a/app/Model/Sku.php +++ b/app/Model/Sku.php @@ -96,11 +96,12 @@ class Sku extends Model ->get(); } + /** * @param array $spuIds - * @return Collection|null + * @return \Hyperf\Database\Model\Model|\Hyperf\Database\Query\Builder|null */ - public function getAddStapleFoodListBySpuIds(array $spuIds): Collection|null + public function getAddStapleFoodListBySpuIds(array $spuIds): \Hyperf\Database\Query\Builder|\Hyperf\Database\Model\Model|null { return $this ->whereIn('spu_id',$spuIds) @@ -114,9 +115,9 @@ class Sku extends Model /** * @param int $spuId - * @return Collection|null + * @return Builder[]|\Hyperf\Database\Model\Collection */ - public function getListBySpuId(int $spuId): Collection|null + public function getListBySpuId(int $spuId): \Hyperf\Database\Model\Collection|array { return $this ->where('spu_id',$spuId)