Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
exam-project
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
exam-project
Commits
a7491c75
Commit
a7491c75
authored
Nov 25, 2025
by
wangxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页滚动提示
parent
cc3ee936
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
141 additions
and
0 deletions
+141
-0
cloud-exam-api/src/main/java/com/yizhi/exam/application/feign/MyExamClient.java
+11
-0
cloud-exam-api/src/main/java/com/yizhi/exam/application/vo/MyExamVO.java
+6
-0
cloud-exam/src/main/java/com/yizhi/application/controller/api/MyExamController.java
+41
-0
cloud-exam/src/main/java/com/yizhi/application/mapper/ExamMapper.java
+15
-0
cloud-exam/src/main/java/com/yizhi/application/service/IExamService.java
+10
-0
cloud-exam/src/main/java/com/yizhi/application/service/impl/ExamServiceImpl.java
+58
-0
cloud-exam/src/main/resources/mapper/ExamMapper.xml
+0
-0
No files found.
cloud-exam-api/src/main/java/com/yizhi/exam/application/feign/MyExamClient.java
View file @
a7491c75
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
package
com
.
yizhi
.
exam
.
application
.
feign
;
package
com
.
yizhi
.
exam
.
application
.
feign
;
import
com.yizhi.exam.application.vo.MyExamParameterVO
;
import
com.yizhi.exam.application.vo.MyExamParameterVO
;
import
com.yizhi.exam.application.vo.MyExamVO
;
import
com.yizhi.exam.application.vo.exam.MyExamPageVO
;
import
com.yizhi.exam.application.vo.exam.MyExamPageVO
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -33,6 +34,16 @@ public interface MyExamClient {
...
@@ -33,6 +34,16 @@ public interface MyExamClient {
@PostMapping
(
"/api/exam/list"
)
@PostMapping
(
"/api/exam/list"
)
MyExamPageVO
getMyExamList
(
@RequestBody
MyExamParameterVO
myExamParameterVO
);
MyExamPageVO
getMyExamList
(
@RequestBody
MyExamParameterVO
myExamParameterVO
);
@PostMapping
(
"/api/exam/list1"
)
MyExamPageVO
getMyExamListNew
(
@RequestBody
MyExamParameterVO
myExamParameterVO
);
/**
* 获取4天内创建的所有考试信息(不用分页)
* @param myExamParameterVO
* @return
*/
@PostMapping
(
"/api/exam/listFour"
)
List
<
MyExamVO
>
getMyExamListFour
(
@RequestBody
MyExamParameterVO
myExamParameterVO
);
/**
/**
* pc端我的考试列表
* pc端我的考试列表
...
...
cloud-exam-api/src/main/java/com/yizhi/exam/application/vo/MyExamVO.java
View file @
a7491c75
...
@@ -64,4 +64,10 @@ public class MyExamVO {
...
@@ -64,4 +64,10 @@ public class MyExamVO {
@ApiModelProperty
(
value
=
"考试logo图片"
)
@ApiModelProperty
(
value
=
"考试logo图片"
)
private
String
logoImg
;
private
String
logoImg
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"创建人ID"
)
private
Long
createById
;
@ApiModelProperty
(
value
=
"创建人姓名"
)
private
String
createByName
;
}
}
cloud-exam/src/main/java/com/yizhi/application/controller/api/MyExamController.java
View file @
a7491c75
...
@@ -54,6 +54,47 @@ public class MyExamController {
...
@@ -54,6 +54,47 @@ public class MyExamController {
}
}
/**
/**
* 我的考试
*
* @param myExamParameterVO
* @return
*/
@PostMapping
(
"/list1"
)
public
MyExamPageVO
getMyExamList1
(
@RequestBody
MyExamParameterVO
myExamParameterVO
)
{
try
{
MyExamPageVO
myExamPageVO
=
new
MyExamPageVO
();
/*Map<String,Integer> page=new HashMap<String,Integer>();
page.put("pageSize",myExamParameterVO.getPageSize());
page.put("pageNo",myExamParameterVO.getPageNo());*/
List
<
MyExamVO
>
myExamVOS
=
iExamService
.
MyExam1
(
myExamParameterVO
);
/* page.put("pageTotal",iExamService.selectTotal(myExamParameterVO));
map.put("list",myExamVOS);
map.put("page",page);*/
myExamPageVO
.
setExamVOS
(
myExamVOS
);
myExamPageVO
.
setPageTotal
(
iExamService
.
selectTotal1
(
myExamParameterVO
));
return
myExamPageVO
;
}
catch
(
Exception
e
)
{
LOG
.
error
(
""
,
e
);
e
.
printStackTrace
();
return
null
;
}
}
/**
* 我的考试
*
* @param myExamParameterVO
* @return
*/
@PostMapping
(
"/listFour"
)
public
List
<
MyExamVO
>
getMyExamlistFour
(
@RequestBody
MyExamParameterVO
myExamParameterVO
)
{
return
iExamService
.
MyExamFour
(
myExamParameterVO
);
}
/**
* pc端我的考试列表
* pc端我的考试列表
*
*
* @param myExamParameterVO
* @param myExamParameterVO
...
...
cloud-exam/src/main/java/com/yizhi/application/mapper/ExamMapper.java
View file @
a7491c75
...
@@ -52,11 +52,26 @@ public interface ExamMapper extends BaseMapper<Exam> {
...
@@ -52,11 +52,26 @@ public interface ExamMapper extends BaseMapper<Exam> {
List
<
MyExamVO
>
selectMyExamInfo
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"end"
)
Integer
end
,
@Param
(
"ids"
)
List
<
Long
>
ids
,
List
<
MyExamVO
>
selectMyExamInfo
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"end"
)
Integer
end
,
@Param
(
"ids"
)
List
<
Long
>
ids
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"siteId"
)
Long
siteId
);
@Param
(
"state"
)
Integer
state
,
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"siteId"
)
Long
siteId
);
List
<
MyExamVO
>
selectMyExamInfo1
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"end"
)
Integer
end
,
@Param
(
"ids"
)
List
<
Long
>
ids
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"siteId"
)
Long
siteId
);
/**
* 获取4天内创建的所有考试信息(不用分页)
* @param ids
* @param state
* @param accountId
* @param siteId
* @return
*/
List
<
MyExamVO
>
selectMyExamInfoFour
(
@Param
(
"ids"
)
List
<
Long
>
ids
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"siteId"
)
Long
siteId
);
@Select
(
"select count(*) from tr_exam_answer where exam_id= #{examId} and account_id = #{accountId}"
)
@Select
(
"select count(*) from tr_exam_answer where exam_id= #{examId} and account_id = #{accountId}"
)
Integer
submitCount
(
@Param
(
"examId"
)
Long
examId
,
@Param
(
"accountId"
)
Long
accountId
);
Integer
submitCount
(
@Param
(
"examId"
)
Long
examId
,
@Param
(
"accountId"
)
Long
accountId
);
Integer
selectTotalInfo
(
@Param
(
"ids"
)
List
<
Long
>
ids
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"siteId"
)
Long
siteId
);
Integer
selectTotalInfo
(
@Param
(
"ids"
)
List
<
Long
>
ids
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"siteId"
)
Long
siteId
);
Integer
selectTotalInfo1
(
@Param
(
"ids"
)
List
<
Long
>
ids
,
@Param
(
"state"
)
Integer
state
,
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"siteId"
)
Long
siteId
);
List
<
MyExamVO
>
selectMyExamnation
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"end"
)
Integer
end
,
@Param
(
"accountId"
)
Long
accountId
);
List
<
MyExamVO
>
selectMyExamnation
(
@Param
(
"start"
)
Integer
start
,
@Param
(
"end"
)
Integer
end
,
@Param
(
"accountId"
)
Long
accountId
);
...
...
cloud-exam/src/main/java/com/yizhi/application/service/IExamService.java
View file @
a7491c75
...
@@ -146,6 +146,15 @@ public interface IExamService extends IService<Exam> {
...
@@ -146,6 +146,15 @@ public interface IExamService extends IService<Exam> {
*/
*/
List
<
MyExamVO
>
MyExam
(
MyExamParameterVO
myExamParameterVO
);
List
<
MyExamVO
>
MyExam
(
MyExamParameterVO
myExamParameterVO
);
List
<
MyExamVO
>
MyExam1
(
MyExamParameterVO
myExamParameterVO
);
/**
* 获取4天内创建的所有考试信息(不用分页)
* @param myExamParameterVO
* @return
*/
List
<
MyExamVO
>
MyExamFour
(
MyExamParameterVO
myExamParameterVO
);
/**
/**
* 得到exam
* 得到exam
* @param examId
* @param examId
...
@@ -170,6 +179,7 @@ public interface IExamService extends IService<Exam> {
...
@@ -170,6 +179,7 @@ public interface IExamService extends IService<Exam> {
ExamDetailsVO
examDetail
(
Long
examId
,
Long
accountId
);
ExamDetailsVO
examDetail
(
Long
examId
,
Long
accountId
);
Integer
selectTotal
(
MyExamParameterVO
myExamParameterVO
);
Integer
selectTotal
(
MyExamParameterVO
myExamParameterVO
);
Integer
selectTotal1
(
MyExamParameterVO
myExamParameterVO
);
List
<
MyExamVO
>
selectMyExamnation
(
Integer
pageNo
,
Integer
pageSize
,
Long
accountId
);
List
<
MyExamVO
>
selectMyExamnation
(
Integer
pageNo
,
Integer
pageSize
,
Long
accountId
);
...
...
cloud-exam/src/main/java/com/yizhi/application/service/impl/ExamServiceImpl.java
View file @
a7491c75
...
@@ -168,6 +168,60 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, com.yizhi.applicati
...
@@ -168,6 +168,60 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, com.yizhi.applicati
return
list
;
return
list
;
}
}
@Override
public
List
<
MyExamVO
>
MyExam1
(
MyExamParameterVO
myExamParameterVO
)
{
Integer
strat
=
(
myExamParameterVO
.
getPageNo
()
-
1
)
*
myExamParameterVO
.
getPageSize
();
Integer
end
=
myExamParameterVO
.
getPageSize
();
List
<
Long
>
examIds
=
getMyVisableExam
(
myExamParameterVO
.
getIds
(),
myExamParameterVO
.
getSiteId
());
if
(!
CollectionUtils
.
isEmpty
(
examIds
))
{
myExamParameterVO
.
setIds
(
examIds
);
}
//获取所有考试信息
//查询
Long
siteId
=
myExamParameterVO
.
getSiteId
();
Long
accountId
=
myExamParameterVO
.
getAccountId
();
List
<
MyExamVO
>
list
=
examMapper
.
selectMyExamInfo1
(
strat
,
end
,
examIds
,
myExamParameterVO
.
getState
(),
accountId
,
siteId
);
if
(
myExamParameterVO
.
getState
()
!=
null
&&
myExamParameterVO
.
getState
()
==
1
)
{
for
(
MyExamVO
myExamVO
:
list
)
{
List
<
ExamOnlineReadOverVo
>
examOnlineReadOverVos
=
trExamOnlineReadOverMapper
.
selectStateList
(
myExamVO
.
getId
(),
myExamParameterVO
.
getAccountId
());
if
(
examOnlineReadOverVos
.
size
()
>
0
)
{
for
(
ExamOnlineReadOverVo
examOnlineReadOverVo
:
examOnlineReadOverVos
)
{
if
(
examOnlineReadOverVo
.
getState
()
==
1
)
{
myExamVO
.
setIsQualified
(
2
+
""
);
}
}
}
}
}
return
list
;
}
@Override
public
List
<
MyExamVO
>
MyExamFour
(
MyExamParameterVO
myExamParameterVO
)
{
List
<
Long
>
examIds
=
getMyVisableExam
(
myExamParameterVO
.
getIds
(),
myExamParameterVO
.
getSiteId
());
if
(!
CollectionUtils
.
isEmpty
(
examIds
))
{
myExamParameterVO
.
setIds
(
examIds
);
}
//获取所有考试信息
//查询
Long
siteId
=
myExamParameterVO
.
getSiteId
();
Long
accountId
=
myExamParameterVO
.
getAccountId
();
List
<
MyExamVO
>
list
=
examMapper
.
selectMyExamInfoFour
(
examIds
,
myExamParameterVO
.
getState
(),
accountId
,
siteId
);
if
(
myExamParameterVO
.
getState
()
!=
null
&&
myExamParameterVO
.
getState
()
==
1
)
{
for
(
MyExamVO
myExamVO
:
list
)
{
List
<
ExamOnlineReadOverVo
>
examOnlineReadOverVos
=
trExamOnlineReadOverMapper
.
selectStateList
(
myExamVO
.
getId
(),
myExamParameterVO
.
getAccountId
());
if
(
examOnlineReadOverVos
.
size
()
>
0
)
{
for
(
ExamOnlineReadOverVo
examOnlineReadOverVo
:
examOnlineReadOverVos
)
{
if
(
examOnlineReadOverVo
.
getState
()
==
1
)
{
myExamVO
.
setIsQualified
(
2
+
""
);
}
}
}
}
}
return
list
;
}
/**
/**
* 考试策略 更新 保存, 预览
* 考试策略 更新 保存, 预览
*/
*/
...
@@ -1154,6 +1208,10 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, com.yizhi.applicati
...
@@ -1154,6 +1208,10 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, com.yizhi.applicati
public
Integer
selectTotal
(
MyExamParameterVO
myExamParameterVO
)
{
public
Integer
selectTotal
(
MyExamParameterVO
myExamParameterVO
)
{
return
examMapper
.
selectTotalInfo
(
myExamParameterVO
.
getIds
(),
myExamParameterVO
.
getState
(),
myExamParameterVO
.
getAccountId
(),
myExamParameterVO
.
getSiteId
());
return
examMapper
.
selectTotalInfo
(
myExamParameterVO
.
getIds
(),
myExamParameterVO
.
getState
(),
myExamParameterVO
.
getAccountId
(),
myExamParameterVO
.
getSiteId
());
}
}
@Override
public
Integer
selectTotal1
(
MyExamParameterVO
myExamParameterVO
)
{
return
examMapper
.
selectTotalInfo1
(
myExamParameterVO
.
getIds
(),
myExamParameterVO
.
getState
(),
myExamParameterVO
.
getAccountId
(),
myExamParameterVO
.
getSiteId
());
}
@Override
@Override
public
List
<
MyExamVO
>
selectMyExamnation
(
Integer
pageNo
,
Integer
pageSize
,
Long
accountId
)
{
public
List
<
MyExamVO
>
selectMyExamnation
(
Integer
pageNo
,
Integer
pageSize
,
Long
accountId
)
{
...
...
cloud-exam/src/main/resources/mapper/ExamMapper.xml
View file @
a7491c75
This diff is collapsed.
Click to expand it.
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