增加了一段注释代码。排除

This commit is contained in:
wucongxing8150 2024-11-20 18:24:30 +08:00
parent 51e05abb5f
commit 4e529ecb7f

View File

@ -251,3 +251,23 @@ func (r *QuestionDao) GetQuestionCountSearch(req requests.GetQuestionCount) (tot
return totalRecords, nil 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
//}