fix : site

This commit is contained in:
2025-03-31 14:58:23 +08:00
parent 4caaefe1f0
commit 003613a918

View File

@@ -107,11 +107,12 @@ class SiteService extends BaseService
Db::transaction(function () use ($info) {
if ($info->is_default == SiteCode::USER_DEFAULT) {
$updateInfo = $this->userSiteModel->getUserNoDefaultIdByUserId($this->userId);
if (!empty($updateInfo)) {
$updateInfo->is_default = SiteCode::USER_DEFAULT;
if(!$updateInfo->save()) throw new ErrException('删除失败-修改联动数据失败');
}
}
if (!$info->delete()) throw new ErrException('删除失败');
});