feat: 徽章api

This commit is contained in:
Blizzard
2026-02-12 14:34:31 +08:00
parent 01e13e736c
commit 0405968597
22 changed files with 1150 additions and 62 deletions
+2 -2
View File
@@ -79,11 +79,11 @@ func (s *TopicService) Detail(id string) (t plant.Topic, err error) {
// DeleteTopics 删除话题
func (s *TopicService) DeleteTopics(req common.IdsReq) error {
var topics []plant.Topic
err := global.DB.Where("id in (?)", req.Ids).Find(&topics).Error
err := global.DB.Where("id in ?", req.Ids).Find(&topics).Error
if err != nil {
return err
}
err = global.DB.Unscoped().Delete(&plant.Topic{}).Error
err = global.DB.Unscoped().Delete(&topics).Error
if err != nil {
return err
}