|
@@ -215,15 +215,26 @@ public class CourseQuestionAnswerController {
|
|
|
public CommonResult<Map<String,Object>> detail(@Valid QuestionAnswerIdParam questionAnswerIdParam, HttpServletRequest req) {
|
|
public CommonResult<Map<String,Object>> detail(@Valid QuestionAnswerIdParam questionAnswerIdParam, HttpServletRequest req) {
|
|
|
Map param =new HashMap();
|
|
Map param =new HashMap();
|
|
|
param.put("id", req.getParameter("id"));
|
|
param.put("id", req.getParameter("id"));
|
|
|
- Map<String,Object> result=questionAnswerService.queryInfo(param);
|
|
|
|
|
|
|
+ Map<String,Object> result=new HashMap<>();
|
|
|
|
|
+ Map<String,Object> studentAnswer=questionAnswerService.queryInfo(param);
|
|
|
param.clear();
|
|
param.clear();
|
|
|
param.put("isPid", "0");
|
|
param.put("isPid", "0");
|
|
|
param.put("pid", req.getParameter("id"));
|
|
param.put("pid", req.getParameter("id"));
|
|
|
- //查询二级评论问题
|
|
|
|
|
- List<Map<String, Object>> recordChildList = new ArrayList<>();
|
|
|
|
|
|
|
+// result=studentAnswer;
|
|
|
|
|
+// //查询二级评论问题
|
|
|
|
|
+// List<Map<String, Object>> recordChildList = new ArrayList<>();
|
|
|
|
|
+// List<Map<String,Object>> recordTwoList=questionAnswerService.queryMapList(param);
|
|
|
|
|
+// recordChildList.addAll(recordTwoList);
|
|
|
|
|
+// result.put("recordChildList", recordChildList);
|
|
|
|
|
+ //原来是父子级,现在变成一个list
|
|
|
|
|
+ param.clear();
|
|
|
|
|
+ param.put("isPid", "0");
|
|
|
|
|
+ param.put("pid", req.getParameter("id"));
|
|
|
|
|
+ List<Map<String, Object>> recordList = new ArrayList<>();
|
|
|
List<Map<String,Object>> recordTwoList=questionAnswerService.queryMapList(param);
|
|
List<Map<String,Object>> recordTwoList=questionAnswerService.queryMapList(param);
|
|
|
- recordChildList.addAll(recordTwoList);
|
|
|
|
|
- result.put("recordChildList", recordChildList);
|
|
|
|
|
|
|
+ recordList.add(studentAnswer);
|
|
|
|
|
+ recordList.addAll(recordTwoList);
|
|
|
|
|
+ result.put("recordList", recordList);
|
|
|
return CommonResult.data(result);
|
|
return CommonResult.data(result);
|
|
|
}
|
|
}
|
|
|
|
|
|