Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzksxtfw
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
xzksxtfw
Commits
784f3d1f
Commit
784f3d1f
authored
Dec 27, 2023
by
宋珺琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
答题系统-添加多选题
parent
06b5e8c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
src/main/java/com/exam/entity/MultiQuestion.java
+3
-0
src/main/java/com/exam/mapper/MultiQuestionMapper.java
+2
-2
No files found.
src/main/java/com/exam/entity/MultiQuestion.java
View file @
784f3d1f
...
...
@@ -29,4 +29,6 @@ public class MultiQuestion {
private
Integer
score
;
private
String
oneOrMore
;
//单选还是多选 1是单选 2是多选
}
\ No newline at end of file
src/main/java/com/exam/mapper/MultiQuestionMapper.java
View file @
784f3d1f
...
...
@@ -29,8 +29,8 @@ public interface MultiQuestionMapper {
MultiQuestion
findOnlyQuestionId
();
@Options
(
useGeneratedKeys
=
true
,
keyProperty
=
"questionId"
)
@Insert
(
"insert into multi_question(subject,question,answerA,answerB,answerC,answerD,rightAnswer,analysis,section,level) "
+
"values(#{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}
,#{oneOrMore}
)"
)
int
add
(
MultiQuestion
multiQuestion
);
@Select
(
"select questionId from multi_question where subject =#{subject} order by rand() desc limit #{pageNo}"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment