Commit dbc501be by 杨树贤

默认地址问题

parent 494f55aa
Showing with 2 additions and 0 deletions
......@@ -22,6 +22,8 @@ class UserAddressService
$hasDefaultAddress = UserAddressModel::where('user_id', $user->id)->where('is_default', 1)->exists();
if (!$hasDefaultAddress) {
$address['is_default'] = 1;
}else{
$address['is_default'] = 0;
}
return UserAddressModel::insertGetId($address);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment