fix : site
This commit is contained in:
@@ -107,10 +107,11 @@ 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;
|
||||
|
||||
$updateInfo->is_default = SiteCode::USER_DEFAULT;
|
||||
|
||||
if(!$updateInfo->save()) throw new ErrException('删除失败-修改联动数据失败');
|
||||
if(!$updateInfo->save()) throw new ErrException('删除失败-修改联动数据失败');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$info->delete()) throw new ErrException('删除失败');
|
||||
|
||||
Reference in New Issue
Block a user