Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
research-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
research-project
Commits
d09a6680
Commit
d09a6680
authored
Apr 02, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
问题排序
parent
e76cebb1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
0 deletions
+30
-0
cloud-research-api/src/main/java/com/yizhi/research/application/feign/ResearchQuestionClient.java
+4
-0
cloud-research-api/src/main/java/com/yizhi/research/application/vo/api/QuestionJumpVo.java
+3
-0
cloud-research-service/src/main/java/com/yizhi/research/application/controller/TrResearchQuestionController.java
+5
-0
cloud-research-service/src/main/java/com/yizhi/research/application/mapper/TrResearchQuestionMapper.java
+2
-0
cloud-research-service/src/main/java/com/yizhi/research/application/mapper/TrResearchQuestionMapper.xml
+4
-0
cloud-research-service/src/main/java/com/yizhi/research/application/service/ITrResearchQuestionService.java
+3
-0
cloud-research-service/src/main/java/com/yizhi/research/application/service/impl/TrResearchQuestionServiceImpl.java
+9
-0
No files found.
cloud-research-api/src/main/java/com/yizhi/research/application/feign/ResearchQuestionClient.java
View file @
d09a6680
...
@@ -40,6 +40,10 @@ public interface ResearchQuestionClient {
...
@@ -40,6 +40,10 @@ public interface ResearchQuestionClient {
@PostMapping
(
"/researchQuestion/update"
)
@PostMapping
(
"/researchQuestion/update"
)
int
batchUpdate
(
@RequestBody
ModifyQuestionModel
modifyQuestionModel
);
int
batchUpdate
(
@RequestBody
ModifyQuestionModel
modifyQuestionModel
);
@PostMapping
(
"/researchQuestion/updateNo"
)
int
updateNo
(
@RequestBody
QuestionJumpVo
vo
);
/**
/**
* 分页查询 一个调研下面的问题
* 分页查询 一个调研下面的问题
*
*
...
...
cloud-research-api/src/main/java/com/yizhi/research/application/vo/api/QuestionJumpVo.java
View file @
d09a6680
...
@@ -20,6 +20,9 @@ public class QuestionJumpVo {
...
@@ -20,6 +20,9 @@ public class QuestionJumpVo {
@ApiModelProperty
(
value
=
"根据指定跳题策略时的题号"
)
@ApiModelProperty
(
value
=
"根据指定跳题策略时的题号"
)
private
Integer
jumpNo
;
private
Integer
jumpNo
;
@ApiModelProperty
(
value
=
"题号,不能为空"
)
private
Integer
no
;
@ApiModelProperty
(
value
=
"跳题策略类型 1表示根据选项跳题,2表示指定跳题"
)
@ApiModelProperty
(
value
=
"跳题策略类型 1表示根据选项跳题,2表示指定跳题"
)
private
Integer
type
;
private
Integer
type
;
...
...
cloud-research-service/src/main/java/com/yizhi/research/application/controller/TrResearchQuestionController.java
View file @
d09a6680
...
@@ -91,6 +91,11 @@ public class TrResearchQuestionController {
...
@@ -91,6 +91,11 @@ public class TrResearchQuestionController {
return
researchQuestionService
.
batchUpdate
(
model
);
return
researchQuestionService
.
batchUpdate
(
model
);
}
}
@PostMapping
(
"/updateNo"
)
public
int
updateNo
(
@RequestBody
QuestionJumpVo
vo
)
{
return
researchQuestionService
.
updateNo
(
vo
);
}
/**
/**
* 分页查询 一个调研下面的问题
* 分页查询 一个调研下面的问题
*
*
...
...
cloud-research-service/src/main/java/com/yizhi/research/application/mapper/TrResearchQuestionMapper.java
View file @
d09a6680
...
@@ -55,6 +55,8 @@ public interface TrResearchQuestionMapper extends BaseMapper<TrResearchQuestion>
...
@@ -55,6 +55,8 @@ public interface TrResearchQuestionMapper extends BaseMapper<TrResearchQuestion>
int
updateNo
(
@Param
(
"id"
)
Long
id
,
@Param
(
"jumpNo"
)
Integer
jumpNo
);
int
updateNo
(
@Param
(
"id"
)
Long
id
,
@Param
(
"jumpNo"
)
Integer
jumpNo
);
int
updateQNoById
(
@Param
(
"id"
)
Long
id
,
@Param
(
"no"
)
Integer
no
);
/**
/**
* 选择跳题时的问题列表
* 选择跳题时的问题列表
*
*
...
...
cloud-research-service/src/main/java/com/yizhi/research/application/mapper/TrResearchQuestionMapper.xml
View file @
d09a6680
...
@@ -138,6 +138,10 @@
...
@@ -138,6 +138,10 @@
update tr_research_question_option set jump_num = -1 where id = #{id}
update tr_research_question_option set jump_num = -1 where id = #{id}
</update>
</update>
<update
id=
"updateQNoById"
>
update tr_research_question set no = #{no} where id = #{id}
</update>
<!-- 选择跳题时的问题列表 -->
<!-- 选择跳题时的问题列表 -->
<select
id=
"listAllForJump"
resultMap=
"BaseResultMap"
>
<select
id=
"listAllForJump"
resultMap=
"BaseResultMap"
>
...
...
cloud-research-service/src/main/java/com/yizhi/research/application/service/ITrResearchQuestionService.java
View file @
d09a6680
...
@@ -39,6 +39,9 @@ public interface ITrResearchQuestionService extends IService<TrResearchQuestion>
...
@@ -39,6 +39,9 @@ public interface ITrResearchQuestionService extends IService<TrResearchQuestion>
*/
*/
int
batchUpdate
(
ModifyQuestionModel
modifyQuestionModel
)
throws
Exception
;
int
batchUpdate
(
ModifyQuestionModel
modifyQuestionModel
)
throws
Exception
;
int
updateNo
(
QuestionJumpVo
vo
);
/**
/**
* 分页查询调研问题
* 分页查询调研问题
*
*
...
...
cloud-research-service/src/main/java/com/yizhi/research/application/service/impl/TrResearchQuestionServiceImpl.java
View file @
d09a6680
...
@@ -121,6 +121,14 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
...
@@ -121,6 +121,14 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
}
}
@Override
@Override
public
int
updateNo
(
QuestionJumpVo
vo
){
if
(
vo
.
getQuestionId
()!=
null
){
return
researchQuestionMapper
.
updateQNoById
(
vo
.
getQuestionId
(),
vo
.
getNo
());
}
return
0
;
}
@Override
public
int
batchUpdate
(
ModifyQuestionModel
modifyQuestionModel
)
throws
Exception
{
public
int
batchUpdate
(
ModifyQuestionModel
modifyQuestionModel
)
throws
Exception
{
int
result
=
0
;
int
result
=
0
;
boolean
hasOptions
=
false
;
boolean
hasOptions
=
false
;
...
@@ -790,6 +798,7 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
...
@@ -790,6 +798,7 @@ public class TrResearchQuestionServiceImpl extends ServiceImpl<TrResearchQuestio
question
.
setUpdateById
(
context
.
getAccountId
());
question
.
setUpdateById
(
context
.
getAccountId
());
question
.
setUpdateByName
(
context
.
getAccountName
());
question
.
setUpdateByName
(
context
.
getAccountName
());
question
.
setUpdateTime
(
date
);
question
.
setUpdateTime
(
date
);
question
.
setNo
(
vo
.
getNo
());
num
=
researchQuestionMapper
.
updateById
(
question
);
num
=
researchQuestionMapper
.
updateById
(
question
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
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