Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
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
李丛阳
education
Commits
edb7d68c
Commit
edb7d68c
authored
Jan 31, 2018
by
YangZhaoJun1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善
parent
b36a2e83
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
5 deletions
+15
-5
TExamInfoRepository.java
...g/rcisoft/business/texaminfo/dao/TExamInfoRepository.java
+8
-0
TExamInfo.java
...java/org/rcisoft/business/texaminfo/entity/TExamInfo.java
+5
-2
TQuestionController.java
...ft/business/tquestion/controller/TQuestionController.java
+1
-2
TQuestionServiceImpl.java
...business/tquestion/service/impl/TQuestionServiceImpl.java
+1
-1
No files found.
src/main/java/org/rcisoft/business/texaminfo/dao/TExamInfoRepository.java
View file @
edb7d68c
package
org
.
rcisoft
.
business
.
texaminfo
.
dao
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Update
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.business.texaminfo.entity.TExamInfo
;
import
org.apache.ibatis.annotations.ResultMap
;
...
...
@@ -29,5 +31,11 @@ public interface TExamInfoRepository extends BaseMapper<TExamInfo> {
@Select
(
"<script>select * from t_exam_info where p_id = #{paperId} and del_flag = 0 and flag = 1 limit 1</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
TExamInfo
selectExamInfoByPid
(
String
paperId
);
@Select
(
"<script> select business_id from t_paper where chap_id = #{chapterId} and status = '0' </script>"
)
List
<
String
>
queryPidByChapterId
(
@Param
(
"chapterId"
)
String
chapterId
);
@Update
(
"<script> update t_paper set status = '1' where business_id = #{pId} </script>"
)
void
updateStatus
(
@Param
(
"pId"
)
String
pId
);
}
src/main/java/org/rcisoft/business/texaminfo/entity/TExamInfo.java
View file @
edb7d68c
...
...
@@ -32,9 +32,12 @@ public class TExamInfo extends IdEntity<TExamInfo> {
private
Integer
sorder
;
private
String
ip
;
public
TExamInfo
(
String
pId
)
{
public
TExamInfo
(
String
pId
)
{
this
.
pId
=
pId
;
}
}
}
src/main/java/org/rcisoft/business/tquestion/controller/TQuestionController.java
View file @
edb7d68c
...
...
@@ -131,14 +131,13 @@ public class TQuestionController extends PaginationController<TQuestion> {
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"slId"
,
value
=
"课程ID"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"chapId"
,
value
=
"章节ID"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"pcompose"
,
value
=
"1全部 2本节"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"composeBeforeUpdate"
,
value
=
"
修改之前的从属 1 全部 2 本节
"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"composeBeforeUpdate"
,
value
=
"
是否查询inUse 1是 2否
"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"stateBeforeUpdate"
,
value
=
"修改之前的状态 1 随机 2 自主"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"qtype"
,
value
=
"题型"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"qtitle"
,
value
=
"题干关键字"
,
required
=
false
,
dataType
=
"varchar"
)})
@GetMapping
(
value
=
"/queryTQuestions"
)
@PreAuthorize
(
"hasRole('ROLE_1002')"
)
public
Result
queryTQuestion
(
TQuestion
tQuestion
)
{
//tQuestion.setCreateBy(UserUtil.getUserInfoProp(getToken(),UserUtil.USER_ID));
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
...
...
src/main/java/org/rcisoft/business/tquestion/service/impl/TQuestionServiceImpl.java
View file @
edb7d68c
...
...
@@ -157,7 +157,7 @@ public class TQuestionServiceImpl implements TQuestionService {
List
<
TQuestionOptions
>
options
=
tQuestionOptionsRepository
.
queryTQuestionOptions
(
question
.
getBusinessId
());
question
.
setOptions
(
options
);
}
if
(
tQuestion
.
getStateBeforeUpdate
().
equals
(
"2"
)&&(
tQuestion
.
get
Pcompose
().
equals
(
tQuestion
.
getComposeBeforeUpdate
()
))){
if
(
tQuestion
.
getStateBeforeUpdate
().
equals
(
"2"
)&&(
tQuestion
.
get
ComposeBeforeUpdate
().
equals
(
"1"
))){
for
(
TQuestion
chapterQuestion
:
chapterQuestions
){
//判断是否已被添加
if
(
question
.
getBusinessId
().
equals
(
chapterQuestion
.
getBusinessId
())){
...
...
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