also delete sub accounts when delete account

This commit is contained in:
MaysWind
2020-11-17 01:58:55 +08:00
parent b4bd83e7a0
commit 0573494d7b
+2
View File
@@ -227,6 +227,8 @@ func (s *AccountService) DeleteAccounts(uid int64, ids []int64) error {
return errs.ErrAccountNotFound
}
_, err = sess.Cols("deleted", "deleted_unix_time").In("parent_account_id", ids).Where("uid=? AND deleted=?", uid, false).Update(updateModel)
return err
})
}