Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-microservice-exam
Project
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
汪想
spring-microservice-exam
Commits
9be7ebae
Commit
9be7ebae
authored
Aug 04, 2020
by
wenww
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多选题逻辑判断修改
parent
4f7978f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
24 deletions
+14
-24
MultipleChoicesAnswerHandler.java
...angyi/exam/handler/impl/MultipleChoicesAnswerHandler.java
+8
-1
pom.xml
pom.xml
+6
-23
No files found.
modules/exam-service-parent/exam-service/src/main/java/com/github/tangyi/exam/handler/impl/MultipleChoicesAnswerHandler.java
View file @
9be7ebae
...
@@ -54,13 +54,20 @@ public class MultipleChoicesAnswerHandler extends AbstractAnswerHandler {
...
@@ -54,13 +54,20 @@ public class MultipleChoicesAnswerHandler extends AbstractAnswerHandler {
@Override
@Override
public
boolean
judgeRight
(
Answer
answer
,
SubjectDto
subject
)
{
public
boolean
judgeRight
(
Answer
answer
,
SubjectDto
subject
)
{
int
right
=
0
;
String
[]
correctAnswers
=
AnswerHandlerUtil
.
replaceComma
(
subject
.
getAnswer
().
getAnswer
()).
split
(
CommonConstant
.
COMMA
);
String
[]
correctAnswers
=
AnswerHandlerUtil
.
replaceComma
(
subject
.
getAnswer
().
getAnswer
()).
split
(
CommonConstant
.
COMMA
);
for
(
String
as
:
answer
.
getAnswer
().
split
(
CommonConstant
.
COMMA
))
{
for
(
String
as
:
answer
.
getAnswer
().
split
(
CommonConstant
.
COMMA
))
{
if
(!
ArrayUtils
.
contains
(
correctAnswers
,
as
))
{
if
(!
ArrayUtils
.
contains
(
correctAnswers
,
as
))
{
return
false
;
return
false
;
}
else
{
right
++;
}
}
}
}
return
true
;
if
(
right
==
correctAnswers
.
length
)
{
return
true
;
}
else
{
return
false
;
}
}
}
@Override
@Override
...
...
pom.xml
View file @
9be7ebae
...
@@ -403,31 +403,13 @@
...
@@ -403,31 +403,13 @@
</pluginManagement>
</pluginManagement>
</build>
</build>
<!--指定仓库-->
<repositories>
<repositories>
<repository>
<repository>
<id>
spring-milestone
</id>
<id>
nexus-central
</id>
<snapshots>
<url>
http://nexus.ui-tech.cn/repository/maven-public/
</url>
<enabled>
false
</enabled>
<releases><enabled>
true
</enabled></releases>
</snapshots>
<snapshots><enabled>
true
</enabled></snapshots>
<url>
http://repo.spring.io/milestone
</url>
</repository>
<repository>
<id>
spring-snapshot
</id>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
<url>
http://repo.spring.io/snapshot
</url>
</repository>
<repository>
<id>
sonatype-nexus-snapshots
</id>
<name>
Sonatype Nexus Snapshots
</name>
<url>
https://oss.sonatype.org/content/repositories/snapshots/
</url>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
<releases>
<enabled>
false
</enabled>
</releases>
</repository>
</repository>
</repositories>
</repositories>
</project>
</project>
\ No newline at end of file
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