feat: invite num

This commit is contained in:
2025-04-01 10:06:59 +08:00
parent 93a33ffba3
commit a7b99e2cf4

View File

@@ -135,9 +135,9 @@ class SiteService extends BaseService
if (!empty($updateInfo)) { if (!empty($updateInfo)) {
if ($updateInfo->id == $id) throw new ErrException('该地址已经是默认地址'); if ($updateInfo->id == $id) throw new ErrException('该地址已经是默认地址');
$updateInfo->is_default = SiteCode::USER_NO_DEFAULT; $update = $this->userSiteModel->where('user_id', $this->userId)->update(['is_default' => SiteCode::USER_NO_DEFAULT]);
if(!$updateInfo->save()) throw new ErrException('修改失败-修改联动数据失败'); if(!$update) throw new ErrException('修改失败-修改联动数据失败');
} }
$info->is_default = SiteCode::USER_DEFAULT; $info->is_default = SiteCode::USER_DEFAULT;