Commit 784f3d1f by 宋珺琪

答题系统-添加多选题

parent 06b5e8c3
...@@ -29,4 +29,6 @@ public class MultiQuestion { ...@@ -29,4 +29,6 @@ public class MultiQuestion {
private Integer score; private Integer score;
private String oneOrMore; //单选还是多选 1是单选 2是多选
} }
\ No newline at end of file
...@@ -29,8 +29,8 @@ public interface MultiQuestionMapper { ...@@ -29,8 +29,8 @@ public interface MultiQuestionMapper {
MultiQuestion findOnlyQuestionId(); MultiQuestion findOnlyQuestionId();
@Options(useGeneratedKeys = true,keyProperty = "questionId") @Options(useGeneratedKeys = true,keyProperty = "questionId")
@Insert("insert into multi_question(subject,question,answerA,answerB,answerC,answerD,rightAnswer,analysis,section,level) " + @Insert("insert into multi_question(subject,question,answerA,answerB,answerC,answerD,rightAnswer,analysis,section,level,oneOrMore) " +
"values(#{subject},#{question},#{answerA},#{answerB},#{answerC},#{answerD},#{rightAnswer},#{analysis},#{section},#{level})") "values(#{subject},#{question},#{answerA},#{answerB},#{answerC},#{answerD},#{rightAnswer},#{analysis},#{section},#{level},#{oneOrMore})")
int add(MultiQuestion multiQuestion); int add(MultiQuestion multiQuestion);
@Select("select questionId from multi_question where subject =#{subject} order by rand() desc limit #{pageNo}") @Select("select questionId from multi_question where subject =#{subject} order by rand() desc limit #{pageNo}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment