diff --git a/beike/Repositories/CustomerRepo.php b/beike/Repositories/CustomerRepo.php index 4a91c287..48a5b92b 100644 --- a/beike/Repositories/CustomerRepo.php +++ b/beike/Repositories/CustomerRepo.php @@ -105,7 +105,7 @@ class CustomerRepo } /** - * @param $customer, Customer对象或id + * @param $customer , Customer对象或id * @param $productId * @return Customer|Builder|Builder[]|Collection|Model|mixed|null */ @@ -120,7 +120,7 @@ class CustomerRepo } /** - * @param $customer, Customer对象或id + * @param $customer , Customer对象或id * @param $productId * @return void */ @@ -144,12 +144,15 @@ class CustomerRepo } /** - * @param $product, 商品id或对象 - * @param $customer, 顾客id或对象 + * @param $product , 商品id或对象 + * @param $customer , 顾客id或对象 * @return int */ public static function inWishlist($product, $customer) { + if (!$customer) { + return false; + } if ($product instanceof Product) { $product = $product->id; }