mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 09:44:26 +08:00
code refactor
This commit is contained in:
@@ -183,10 +183,8 @@ func (s *TransactionTagService) DeleteTags(uid int64, ids []int64) error {
|
|||||||
return errs.ErrUserIdInvalid
|
return errs.ErrUserIdInvalid
|
||||||
}
|
}
|
||||||
|
|
||||||
tag := &models.TransactionTag{}
|
|
||||||
|
|
||||||
return s.UserDataDB(uid).DoTransaction(func(sess *xorm.Session) error {
|
return s.UserDataDB(uid).DoTransaction(func(sess *xorm.Session) error {
|
||||||
deletedRows, err := sess.In("tag_id", ids).Where("uid=?", uid).Delete(tag)
|
deletedRows, err := sess.In("tag_id", ids).Where("uid=?", uid).Delete(&models.TransactionTag{})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user