From 3a7df99b5eb79a5560610f252cc662749eae1ec4 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Thu, 19 Sep 2024 15:58:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=8C=9C=E4=BD=A0=E5=96=9C?= =?UTF-8?q?=E6=AC=A2=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3111?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/service/Question.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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) } } }