From 01545b62ffe4c652a70ee9aede2039042c227d06 Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Wed, 16 Sep 2020 17:32:21 +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 10bda1d..ed5cadc 100644 --- a/app/Service/v3/Implementations/UserAddressService.php +++ b/app/Service/v3/Implementations/UserAddressService.php @@ -57,7 +57,7 @@ class UserAddressService implements UserAddressServiceInterface UserAddress::query()->where([ ['user_id','=',$userId], ['is_default','=',1], - ])->decrement('is_default'); + ])->update(['is_default' => 0]); $userAddress = UserAddress::query()->find($userAddressId); $userAddress->is_default = 1; return $userAddress->save();