|
@@ -1,7 +1,5 @@
|
|
|
package cn.com.qmth.examcloud.service.examwork.api;
|
|
|
|
|
|
-import cn.com.qmth.examcloud.common.uac.entity.AccessUser;
|
|
|
-import cn.com.qmth.examcloud.common.util.ErrorMsg;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
import java.util.Date;
|
|
@@ -11,8 +9,12 @@ import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
+import org.springframework.data.domain.Sort;
|
|
|
+import org.springframework.data.domain.Sort.Direction;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
@@ -25,12 +27,12 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.common.uac.entity.AccessUser;
|
|
|
+import cn.com.qmth.examcloud.common.util.ErrorMsg;
|
|
|
import cn.com.qmth.examcloud.service.examwork.dao.ExamRepo;
|
|
|
import cn.com.qmth.examcloud.service.examwork.entity.Exam;
|
|
|
import cn.com.qmth.examcloud.service.examwork.service.ExamService;
|
|
|
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-
|
|
|
/**
|
|
|
* 考试服务API
|
|
|
* Created by songyue on 17/1/13.
|
|
@@ -57,7 +59,7 @@ public class ExamApi {
|
|
|
}else{
|
|
|
return new ResponseEntity(HttpStatus.NOT_FOUND);
|
|
|
}
|
|
|
- return new ResponseEntity(examService.getAllExam(examCriteria,new PageRequest(curPage,pageSize)), HttpStatus.OK);
|
|
|
+ return new ResponseEntity(examService.getAllExam(examCriteria,new PageRequest(curPage,pageSize, new Sort(Direction.DESC,"id"))), HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value="查询所有考试批次(包含有效)",notes = "不分页带查询")
|