Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea_resource_api
Project
Project
Details
Activity
Releases
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
高宇
tea_resource_api
Commits
02bf23fc
Commit
02bf23fc
authored
Jul 25, 2024
by
刘帅阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
290581d2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
15 deletions
+48
-15
PcManage.java
...n/java/org/rcisoft/business/pcmanage/entity/PcManage.java
+9
-0
PcManageServiceImpl.java
...t/business/pcmanage/service/impl/PcManageServiceImpl.java
+2
-0
PostLessonUserController.java
...ness/postblesson/controller/PostLessonUserController.java
+2
-2
PostTeaExamQuestionsExamination.java
...s/postblesson/entity/PostTeaExamQuestionsExamination.java
+1
-0
PostBLessonServiceImpl.java
...ness/postblesson/service/impl/PostBLessonServiceImpl.java
+24
-9
ExaminationPaperVO.java
...g/rcisoft/business/postblesson/vo/ExaminationPaperVO.java
+5
-0
PostBLessonRepository.xml
...per/business/postblesson/mapper/PostBLessonRepository.xml
+5
-4
No files found.
src/main/java/org/rcisoft/business/pcmanage/entity/PcManage.java
View file @
02bf23fc
...
...
@@ -108,5 +108,14 @@ public class PcManage extends CyIdIncreEntity<PcManage> {
@TableField
(
exist
=
false
)
private
String
endTime
;
/**
* 分页
* */
@TableField
(
exist
=
false
)
private
Integer
pageNum
;
@TableField
(
exist
=
false
)
private
Integer
pageSize
;
}
src/main/java/org/rcisoft/business/pcmanage/service/impl/PcManageServiceImpl.java
View file @
02bf23fc
...
...
@@ -196,6 +196,8 @@ public class PcManageServiceImpl extends ServiceImpl<PcManageRepository,PcManage
@Override
public
IPage
<
PcManage
>
findAllByPagination
(
CyPageInfo
<
PcManage
>
paginationUtility
,
PcManage
pcManage
){
paginationUtility
.
setSize
(
pcManage
.
getPageSize
());
paginationUtility
.
setCurrent
(
pcManage
.
getPageNum
());
IPage
<
PcManage
>
pcManageIPage
=
baseMapper
.
queryPcManagesPaged
(
paginationUtility
,
pcManage
);
return
pcManageIPage
;
}
...
...
src/main/java/org/rcisoft/business/postblesson/controller/PostLessonUserController.java
View file @
02bf23fc
...
...
@@ -92,8 +92,8 @@ public class PostLessonUserController extends CyPaginationController<QuestionsEx
@CyOpeLogAnno
(
title
=
"system-试题表管理-用户答题"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@ApiOperation
(
value
=
"用户答题"
,
notes
=
"用户答题"
)
@GetMapping
(
"/submit
/{businessId:\\w+}
"
)
public
CyResult
submit
(
@PathVariable
Integer
businessId
)
{
@GetMapping
(
"/submit"
)
public
CyResult
submit
(
Integer
businessId
)
{
PostExamQuestionResultDto
postExamQuestionResultDto
=
bLessonServiceImpl
.
selectByQuestionsId
(
businessId
);
return
CyResultGenUtil
.
builder
(
new
CyPersistModel
(
1
),
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
...
...
src/main/java/org/rcisoft/business/postblesson/entity/PostTeaExamQuestionsExamination.java
View file @
02bf23fc
...
...
@@ -3,6 +3,7 @@ package org.rcisoft.business.postblesson.entity;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
org.rcisoft.core.entity.CyIdEntity
;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
/**
...
...
src/main/java/org/rcisoft/business/postblesson/service/impl/PostBLessonServiceImpl.java
View file @
02bf23fc
...
...
@@ -74,6 +74,8 @@ public class PostBLessonServiceImpl extends ServiceImpl<PostBLessonRepository, P
@Autowired
private
PostTeaExamQuestionsExaminationRepository
teaExamQuestionsExaminationRepository
;
/**
* 分页查询用户数据
*
...
...
@@ -457,6 +459,14 @@ public class PostBLessonServiceImpl extends ServiceImpl<PostBLessonRepository, P
if
(
queryTeaExamOptionsDTO
==
null
||
queryTeaExamOptionsDTO
.
getStatus
().
equals
(
ItemStatus
.
NOT_START
.
getStatus
()))
{
//开始答题
answerStatus
.
setStatus
(
ItemStatus
.
NOT_START
.
getStatus
());
PostTeaExamExaminationPaper
postTeaExamExaminationPaper
=
new
PostTeaExamExaminationPaper
();
postTeaExamExaminationPaper
.
setFlag
(
"1"
);
postTeaExamExaminationPaper
.
setCourseId
(
courseId
);
postTeaExamExaminationPaper
.
setAnswerId
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
postTeaExamExaminationPaper
.
setStartTime
(
new
Date
());
postTeaExamExaminationPaper
.
setStatus
(
ItemStatus
.
LEARNING
.
getStatus
());
teaExamExaminationPaperRepository
.
insert
(
postTeaExamExaminationPaper
);
answerStatus
.
setBusinessId
(
postTeaExamExaminationPaper
.
getBusinessId
());
}
else
{
if
(
queryTeaExamOptionsDTO
.
getStatus
().
equals
(
ItemStatus
.
FINISH
.
getStatus
()))
{
//重新答题
...
...
@@ -487,15 +497,20 @@ public class PostBLessonServiceImpl extends ServiceImpl<PostBLessonRepository, P
teaExamExaminationPaper
.
setStatus
(
ItemStatus
.
LEARNING
.
getStatus
());
insert
=
teaExamExaminationPaperRepository
.
insert
(
teaExamExaminationPaper
);
}
else
{
PostTeaExamExaminationPaper
postTeaExamExaminationPaper
=
teaExamExaminationPaperRepository
.
selectById
(
examPaperVO
.
getBusinessId
());
if
(
postTeaExamExaminationPaper
==
null
||
postTeaExamExaminationPaper
.
getStatus
().
equals
(
ItemStatus
.
FINISH
.
getStatus
()))
{
teaExamExaminationPaper
.
setAnswerId
(
examPaperVO
.
getUserId
());
teaExamExaminationPaper
.
setStartTime
(
new
Date
());
teaExamExaminationPaper
.
setCourseId
(
examPaperVO
.
getLessonId
());
teaExamExaminationPaper
.
setStatus
(
ItemStatus
.
LEARNING
.
getStatus
());
insert
=
teaExamExaminationPaperRepository
.
insert
(
teaExamExaminationPaper
);
}
else
{
PostTeaExamExaminationPaper
postTeaExamExaminationPaper
=
teaExamExaminationPaperRepository
.
selectById
(
examPaperVO
.
getBusinessId
());
if
(
examPaperVO
.
getStatus
().
equals
(
ItemStatus
.
LEARNING
.
getStatus
()))
{
if
(
postTeaExamExaminationPaper
==
null
||
postTeaExamExaminationPaper
.
getStatus
().
equals
(
ItemStatus
.
FINISH
.
getStatus
()))
{
teaExamExaminationPaper
.
setAnswerId
(
examPaperVO
.
getUserId
());
teaExamExaminationPaper
.
setStartTime
(
new
Date
());
teaExamExaminationPaper
.
setCourseId
(
examPaperVO
.
getLessonId
());
teaExamExaminationPaper
.
setStatus
(
ItemStatus
.
LEARNING
.
getStatus
());
insert
=
teaExamExaminationPaperRepository
.
insert
(
teaExamExaminationPaper
);
}
else
{
teaExamExaminationPaper
=
postTeaExamExaminationPaper
;
}
}
else
{
teaExamExaminationPaper
=
postTeaExamExaminationPaper
;
}
}
...
...
src/main/java/org/rcisoft/business/postblesson/vo/ExaminationPaperVO.java
View file @
02bf23fc
...
...
@@ -26,4 +26,9 @@ public class ExaminationPaperVO {
* 用户id
*/
private
Integer
userId
;
/**
* 接口状态 1 考试
*/
private
String
status
;
}
src/main/resources/mapper/business/postblesson/mapper/PostBLessonRepository.xml
View file @
02bf23fc
...
...
@@ -195,11 +195,12 @@
<select
id=
"querySysUnit"
resultType=
"org.rcisoft.business.postblesson.entity.PostSysUnit"
>
SELECT sun.*
FROM (SELECT * FROM sys_user WHERE business_id = #{userId}) su
LEFT JOIN sys_user su1 ON su.dept_id = su1.dept_id
LEFT JOIN sys_unit sun ON su
1.business_id = sun.user
_id
WHERE sun.user_id = #{userId}
LEFT JOIN sys_unit sun ON su
.dept_id = sun.business
_id
</select>
...
...
@@ -221,7 +222,7 @@
from tea_post_exam_examination_paper
WHERE answer_id = #{userId}
and course_id = #{courseId}
GROUP
BY create_date DESC
order
BY create_date DESC
LIMIT 1
</select>
...
...
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