1
This commit is contained in:
parent
3007140e84
commit
63ab3fc50c
@ -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 := make(map[string]interface{})
|
||||||
maps["question_status"] = 1
|
maps["question_status"] = 1
|
||||||
maps["is_hide"] = 0
|
maps["is_hide"] = 0
|
||||||
questions, err = questionDao.GetQuestionListRand(maps, 3)
|
questions, err = questionDao.GetQuestionListRand(maps, limit)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user