|
|
@@ -1,33 +1,28 @@
|
|
|
package com.izouma.wenlvju.web;
|
|
|
|
|
|
-import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.izouma.wenlvju.domain.ExamRoom;
|
|
|
import com.izouma.wenlvju.dto.PageQuery;
|
|
|
import com.izouma.wenlvju.exception.BusinessException;
|
|
|
import com.izouma.wenlvju.repo.ExamRoomRepo;
|
|
|
import com.izouma.wenlvju.service.ExamRoomService;
|
|
|
-import com.izouma.wenlvju.utils.JpaUtils;
|
|
|
import com.izouma.wenlvju.utils.ObjUtils;
|
|
|
import com.izouma.wenlvju.utils.excel.ExcelUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
-import org.springframework.data.domain.PageImpl;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import javax.persistence.criteria.Predicate;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/examRoom")
|
|
|
@AllArgsConstructor
|
|
|
public class ExamRoomController extends BaseController {
|
|
|
- private final ExamRoomService examRoomService;
|
|
|
- private final ExamRoomRepo examRoomRepo;
|
|
|
-
|
|
|
+ private final ExamRoomService examRoomService;
|
|
|
+ private final ExamRoomRepo examRoomRepo;
|
|
|
|
|
|
|
|
|
//@PreAuthorize("hasRole('ADMIN')")
|
|
|
@@ -79,8 +74,11 @@ public class ExamRoomController extends BaseController {
|
|
|
}
|
|
|
|
|
|
@PostMapping("/byRecord")
|
|
|
- public Page<ExamRoom> byRecord(PageQuery pageQuery, Long recordId) {
|
|
|
- return null;
|
|
|
+ public Page<ExamRoom> byRecord(PageQuery pageQuery) {
|
|
|
+ Object recordId = pageQuery.getQuery().get("recordId");
|
|
|
+ //转换
|
|
|
+ Long id = Convert.convert(Long.class, recordId);
|
|
|
+ return examRoomService.byRecord(id, pageQuery);
|
|
|
}
|
|
|
}
|
|
|
|