From 6a6e57d9c60cedb3da1d6e3bbb8a2fb5d1784f4d Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Fri, 18 Sep 2020 21:41:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/UserAddressService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Service/v3/Implementations/UserAddressService.php b/app/Service/v3/Implementations/UserAddressService.php index 4d761f8..90993f7 100644 --- a/app/Service/v3/Implementations/UserAddressService.php +++ b/app/Service/v3/Implementations/UserAddressService.php @@ -41,7 +41,7 @@ class UserAddressService implements UserAddressServiceInterface ]); if(empty($userAddressId)){ UserAddress::query()->where(['user_id'=> $user_id,'is_default'=> 1])->update(['is_default' => 0]); - UserAddress::query()->where('id',$userAddressId)->update(['is_default' => 1]); + UserAddress::query()->where('id',$userAddress->id)->update(['is_default' => 1]); } return $userAddress; }