问答中心 跳转回填提问和回答问题
This commit is contained in:
+7
-9
@@ -318,20 +318,18 @@ public class AskQuestionsController extends BaseController<AskQuestions> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/jump")
|
@PostMapping("/jump")
|
||||||
public ResponseMessage jump(String standId ,String userId){
|
public ResponseMessage jump(String standId ,String userId) {
|
||||||
if(StringUtils.isNotBlank(standId) && StringUtils.isNotBlank(userId)){
|
if (StringUtils.isNotBlank(standId) && StringUtils.isNotBlank(userId)) {
|
||||||
QueryWrapper<AskQuestions> objectQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<AskQuestions> objectQueryWrapper = new QueryWrapper<>();
|
||||||
objectQueryWrapper.eq("STANDARD_ID",standId);
|
objectQueryWrapper.eq("STANDARD_ID", standId);
|
||||||
objectQueryWrapper.eq("questioner",userId);
|
objectQueryWrapper.eq("questioner", userId);
|
||||||
List<AskQuestions> list = askQuestionsService.list(objectQueryWrapper);
|
List<AskQuestions> list = askQuestionsService.list(objectQueryWrapper);
|
||||||
if(!list.isEmpty()){
|
if (!list.isEmpty()) {
|
||||||
//提问
|
//提问
|
||||||
return Result.success("myQue");
|
return Result.success("myQue");
|
||||||
}else {
|
|
||||||
//回答
|
|
||||||
return askQuestionsService.selectAskReply("myAns");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Result.error();
|
//回答
|
||||||
|
return askQuestionsService.selectAskReply("myAns");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user