新增猜你喜欢列表接口111

This commit is contained in:
wucongxing8150 2024-09-19 15:58:19 +08:00
parent e77d7b18b8
commit 3a7df99b5e

View File

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