增加了一段注释代码。排除
This commit is contained in:
parent
51e05abb5f
commit
4e529ecb7f
@ -251,3 +251,23 @@ func (r *QuestionDao) GetQuestionCountSearch(req requests.GetQuestionCount) (tot
|
||||
|
||||
return totalRecords, nil
|
||||
}
|
||||
|
||||
//
|
||||
//// GetQuestionNotInListRand 获取列表-随机-排除
|
||||
//func (r *QuestionDao) GetQuestionNotInListRand(maps interface{}, notQuestionId []int64, limit int) (m []*model.Question, err error) {
|
||||
// query := global.Db.Model(&model.Question{})
|
||||
// query = query.Where(maps)
|
||||
//
|
||||
// // 排除选项
|
||||
// if len(notQuestionId) > 0 {
|
||||
// query = query.Where("question_id not in (?)", notQuestionId)
|
||||
// }
|
||||
//
|
||||
// query = query.Limit(limit).Order("rand()")
|
||||
//
|
||||
// err = query.Find(&m).Error
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
// return m, nil
|
||||
//}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user