|
@@ -1,15 +1,10 @@
|
|
|
package cn.com.qmth.examcloud.core.questions.api.controller;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
-import cn.com.qmth.examcloud.api.commons.enums.DataRuleType;
|
|
|
-import cn.com.qmth.examcloud.api.commons.security.bean.UserDataRule;
|
|
|
-import cn.com.qmth.examcloud.web.security.DataRule;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.data.domain.PageImpl;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
@@ -73,7 +68,6 @@ public class QuesController extends ControllerSupport {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- @DataRule(type=DataRuleType.COURSE)
|
|
|
@ApiOperation(value = "分页查询试题", notes = "分页查询试题")
|
|
|
@GetMapping(value = "/question/{curPage}/{pageSize}")
|
|
|
public ResponseEntity<Object> getAllQuestion(@ModelAttribute QuestionSearchCondition searchCondition,
|
|
@@ -81,13 +75,7 @@ public class QuesController extends ControllerSupport {
|
|
|
@PathVariable int pageSize) {
|
|
|
User user = getAccessUser();
|
|
|
searchCondition.setOrgId(user.getRootOrgId().toString());
|
|
|
- UserDataRule userDataRule = super.getUserDataRule(DataRuleType.COURSE);
|
|
|
- if (userDataRule.assertEmptyQueryResult()) {
|
|
|
- return new ResponseEntity<>(new PageImpl<>(new ArrayList<>()), HttpStatus.OK);
|
|
|
- }
|
|
|
-
|
|
|
- return new ResponseEntity<>(quesService.findAll(searchCondition, curPage, pageSize,
|
|
|
- userDataRule.getRefIds(), user.getUserId()), HttpStatus.OK);
|
|
|
+ return new ResponseEntity<>(quesService.findAll(searchCondition, curPage, pageSize), HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
/**
|