|
@@ -189,10 +189,19 @@ class UserAddress extends UserAddressModel
|
|
$userId = UserService::getCurrentLoginUserId();
|
|
$userId = UserService::getCurrentLoginUserId();
|
|
$detail = self::get(['user_id' => $userId, 'address_id' => $addressId]);
|
|
$detail = self::get(['user_id' => $userId, 'address_id' => $addressId]);
|
|
if (empty($detail)) {
|
|
if (empty($detail)) {
|
|
- throwError('未找到该收货地址');
|
|
|
|
|
|
+ throwError('Address Not found.');
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
return $detail;
|
|
return $detail;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static function detailInner(int $addressId)
|
|
|
|
+ {
|
|
|
|
+ $userId = UserService::getCurrentLoginUserId();
|
|
|
|
+ $detail = self::get(['user_id' => $userId, 'address_id' => $addressId]);
|
|
|
|
+ if (empty($detail)) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ return $detail;
|
|
|
|
+ }
|
|
}
|
|
}
|