mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 01:04:25 +08:00
also delete sub accounts when delete account
This commit is contained in:
@@ -227,6 +227,8 @@ func (s *AccountService) DeleteAccounts(uid int64, ids []int64) error {
|
|||||||
return errs.ErrAccountNotFound
|
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
|
return err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user