优化考试随机出题

master
xiaochanghai 3 months ago
parent 2234cef1b3
commit 29a6f6eeb5
  1. 2
      Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs

@ -640,7 +640,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
if (config.QuestionId != null) if (config.QuestionId != null)
sql += $" AND Id='{config.QuestionId}'"; sql += $" AND Id='{config.QuestionId}'";
if (examPaperQuestionIds.Any()) if (examPaperQuestionIds.Any())
sql += $" AND Id NOT IN ('{string.Join(",", examPaperQuestionIds)}')"; sql += $" AND Id NOT IN ({string.Join(",", examPaperQuestionIds)})";
sql += $" ORDER BY GuidValue ASC"; sql += $" ORDER BY GuidValue ASC";
var questions2 = await Db.Ado.SqlQueryAsync<Ghre_Question>(sql); var questions2 = await Db.Ado.SqlQueryAsync<Ghre_Question>(sql);

Loading…
Cancel
Save