diff --git a/service/tag.go b/service/tag.go index e9fc089..355733e 100644 --- a/service/tag.go +++ b/service/tag.go @@ -29,6 +29,7 @@ func (s *TagService) ListByUserId(userId uint) (res *model.TagList) { func (s *TagService) ListByUserIdAndCollectionId(userId, cid uint) (res *model.TagList) { res = s.List(1, 1000, func(tx *gorm.DB) { tx.Where("user_id = ? and collection_id = ?", userId, cid) + tx.Order("name asc") }) return }