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)