This commit is contained in:
wucongxing8150 2024-09-20 10:46:47 +08:00
parent 3007140e84
commit 63ab3fc50c

View File

@ -66,11 +66,13 @@ func (r *QuestionService) GetGuessUserLIkeList(userId int64) (m []*model.Questio
}
// 未参与过/未指定用户
if len(questions) == 0 {
if len(questions) < 3 {
limit := 3 - len(questions)
maps := make(map[string]interface{})
maps["question_status"] = 1
maps["is_hide"] = 0
questions, err = questionDao.GetQuestionListRand(maps, 3)
questions, err = questionDao.GetQuestionListRand(maps, limit)
if err != nil {
return nil, err
}