Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
online-edu
online-edu-backend
Commits
80730267
Commit
80730267
authored
Jul 02, 2021
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提问后返回问题ID
parent
5782105c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
QAService.java
...ain/java/com/qkdata/biz/management/service/QAService.java
+2
-2
FrontendQAController.java
...a/com/qkdata/biz/web/controller/FrontendQAController.java
+3
-3
No files found.
src/main/java/com/qkdata/biz/management/service/QAService.java
View file @
80730267
...
...
@@ -107,7 +107,7 @@ public class QAService {
* @param model
*/
@Transactional
public
void
ask
(
AskModel
model
)
{
public
Long
ask
(
AskModel
model
)
{
QuestionPO
questionPO
=
new
QuestionPO
();
questionPO
.
setUserId
(
UserContext
.
getUserId
());
questionPO
.
setCourseId
(
model
.
getCourseId
());
...
...
@@ -121,7 +121,7 @@ public class QAService {
answerPO
.
setType
(
AnswerTypeEnum
.
USER
);
answerPO
.
setContent
(
questionPO
.
getContent
());
answerMapper
.
insert
(
answerPO
);
return
questionPO
.
getId
();
}
/**
...
...
src/main/java/com/qkdata/biz/web/controller/FrontendQAController.java
View file @
80730267
...
...
@@ -27,9 +27,9 @@ public class FrontendQAController {
@SysLog
(
"提问"
)
@PostMapping
(
"/ask"
)
@RequiresRoles
(
value
=
{
BizConstants
.
ROLE_USER
,
BizConstants
.
ROLE_ENTERPRISE_ADMIN
},
logical
=
Logical
.
OR
)
public
Result
<
Stri
ng
>
ask
(
@RequestBody
@Validated
AskModel
model
){
qaService
.
ask
(
model
);
return
Result
.
succeed
(
"ok"
);
public
Result
<
Lo
ng
>
ask
(
@RequestBody
@Validated
AskModel
model
){
Long
id
=
qaService
.
ask
(
model
);
return
Result
.
succeed
(
id
);
}
@ApiOperation
(
"我的提问列表"
)
...
...
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