|
@@ -6,8 +6,10 @@ import com.xhkjedu.annotation.Action;
|
6
|
6
|
import com.xhkjedu.sstudy.model.question.TQuestion;
|
7
|
7
|
import com.xhkjedu.sstudy.model.question.TQuestionCollect;
|
8
|
8
|
import com.xhkjedu.sstudy.model.subjectbook.TDirector;
|
|
9
|
+import com.xhkjedu.sstudy.model.subjectbook.TPoint;
|
9
|
10
|
import com.xhkjedu.sstudy.service.question.QuestionService;
|
10
|
11
|
import com.xhkjedu.sstudy.service.subjectbook.DirectorService;
|
|
12
|
+import com.xhkjedu.sstudy.service.subjectbook.PointService;
|
11
|
13
|
import com.xhkjedu.sstudy.vo.question.QuestionCollectVo;
|
12
|
14
|
import com.xhkjedu.sstudy.vo.question.QuestionVo;
|
13
|
15
|
import com.xhkjedu.sstudy.vo.system.CollectVo;
|
|
@@ -38,6 +40,8 @@ public class QuestionController {
|
38
|
40
|
private QuestionService tQuestionService;
|
39
|
41
|
@Resource
|
40
|
42
|
private DirectorService directorService;
|
|
43
|
+ @Resource
|
|
44
|
+ private PointService pointService;
|
41
|
45
|
|
42
|
46
|
@PostMapping("/update_state")
|
43
|
47
|
@Action("试题管理-修改状态")
|
|
@@ -112,6 +116,20 @@ public class QuestionController {
|
112
|
116
|
Integer page = tQuestion.getPage();
|
113
|
117
|
Integer pageSize = tQuestion.getPageSize();
|
114
|
118
|
N_Utils.validation(new Object[]{page,"显示页码",1,pageSize,"显示条数",1});
|
|
119
|
+ //获取所选知识点信息
|
|
120
|
+ if(N_Utils.isNotEmpty(tQuestion.getPointid()) && !"0".equals(tQuestion.getPointid())){
|
|
121
|
+ TPoint point = pointService.getPointInfoById(tQuestion.getPointid());
|
|
122
|
+
|
|
123
|
+ if(point.getSonnum() == 0){
|
|
124
|
+ //没有子知识点,属于叶子节点
|
|
125
|
+ tQuestion.setPointLeaf(1);
|
|
126
|
+ }else{
|
|
127
|
+ //说明有子知识点,直接获取
|
|
128
|
+ tQuestion.setPointLeaf(0);
|
|
129
|
+ tQuestion.setPointall(point.getPointall());
|
|
130
|
+ }
|
|
131
|
+ }
|
|
132
|
+
|
115
|
133
|
PageHelper.startPage(page, pageSize);
|
116
|
134
|
tQuestion.setLsbid(null);
|
117
|
135
|
List<Map<String, Object>> list = tQuestionService.listForSelect(tQuestion);
|