diff --git a/api/service/Question.go b/api/service/Question.go index bc7b802..ad1e6c9 100644 --- a/api/service/Question.go +++ b/api/service/Question.go @@ -2,7 +2,6 @@ package service import ( "errors" - "fmt" "gorm.io/gorm" "hepa-calc-api/api/dao" "hepa-calc-api/api/model" @@ -50,7 +49,6 @@ func (r *QuestionService) GetGuessUserLIkeList(userId int64) (m []*model.Questio var questions []*model.Question - fmt.Println(userId) if userId != 0 { maps := make(map[string]interface{}) maps["user_id"] = userId @@ -61,8 +59,8 @@ func (r *QuestionService) GetGuessUserLIkeList(userId int64) (m []*model.Questio // 参与过 if len(orderSingles) > 0 { - for i, single := range orderSingles { - questions[i] = single.Question + for _, single := range orderSingles { + questions = append(questions, single.Question) } } }