|  | @@ -4,6 +4,8 @@ import java.util.List;
 | 
	
		
			
				|  |  |  import javax.servlet.http.HttpServletResponse;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import com.ruoyi.sim.service.impl.RealExamService;
 | 
	
		
			
				|  |  | +import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | +import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.GetMapping;
 | 
	
	
		
			
				|  | @@ -30,6 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  |  @RestController
 | 
	
		
			
				|  |  |  @RequestMapping("/sim/real-exam")
 | 
	
		
			
				|  |  | +@Api("考试Controller")
 | 
	
		
			
				|  |  |  public class RealExamController extends BaseController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private RealExamService realExamService;
 | 
	
	
		
			
				|  | @@ -37,20 +40,31 @@ public class RealExamController extends BaseController {
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 查询考试列表
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermi('sim:real-exam:list')")
 | 
	
		
			
				|  |  | -    @GetMapping("/list")
 | 
	
		
			
				|  |  | +    // @PreAuthorize("@ss.hasPermi('sim:real-exam:list')")
 | 
	
		
			
				|  |  | +    // @GetMapping("/list")
 | 
	
		
			
				|  |  | +    // @ApiOperation("查询考试列表")
 | 
	
		
			
				|  |  |      public TableDataInfo list(RealExam realExam) {
 | 
	
		
			
				|  |  |          startPage();
 | 
	
		
			
				|  |  |          List<RealExam> list = realExamService.selectRealExamList(realExam);
 | 
	
		
			
				|  |  |          return getDataTable(list);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @GetMapping("/listByUserId/{userId}")
 | 
	
		
			
				|  |  | +    @ApiOperation("查询userId学生考试列表")
 | 
	
		
			
				|  |  | +    public TableDataInfo listByUserId(@PathVariable("userId") Long userId) {
 | 
	
		
			
				|  |  | +        // todo:
 | 
	
		
			
				|  |  | +        RealExam realExam = new RealExam();
 | 
	
		
			
				|  |  | +        startPage();
 | 
	
		
			
				|  |  | +        List<RealExam> list = realExamService.selectRealExamList(realExam);
 | 
	
		
			
				|  |  | +        return getDataTable(list);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 导出考试列表
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermi('sim:real-exam:export')")
 | 
	
		
			
				|  |  | +    // @PreAuthorize("@ss.hasPermi('sim:real-exam:export')")
 | 
	
		
			
				|  |  |      @Log(title = "考试", businessType = BusinessType.EXPORT)
 | 
	
		
			
				|  |  | -    @PostMapping("/export")
 | 
	
		
			
				|  |  | +    // @PostMapping("/export")
 | 
	
		
			
				|  |  |      public void export(HttpServletResponse response, RealExam realExam) {
 | 
	
		
			
				|  |  |          List<RealExam> list = realExamService.selectRealExamList(realExam);
 | 
	
		
			
				|  |  |          ExcelUtil<RealExam> util = new ExcelUtil<RealExam>(RealExam.class);
 | 
	
	
		
			
				|  | @@ -60,8 +74,9 @@ public class RealExamController extends BaseController {
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 获取考试详细信息
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermi('sim:real-exam:query')")
 | 
	
		
			
				|  |  | +    // @PreAuthorize("@ss.hasPermi('sim:real-exam:query')")
 | 
	
		
			
				|  |  |      @GetMapping(value = "/{examId}")
 | 
	
		
			
				|  |  | +    @ApiOperation("获取考试详细信息")
 | 
	
		
			
				|  |  |      public AjaxResult getInfo(@PathVariable("examId") Long examId) {
 | 
	
		
			
				|  |  |          return success(realExamService.selectRealExamByExamId(examId));
 | 
	
		
			
				|  |  |      }
 | 
	
	
		
			
				|  | @@ -69,7 +84,7 @@ public class RealExamController extends BaseController {
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 新增考试
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermi('sim:real-exam:add')")
 | 
	
		
			
				|  |  | +    // @PreAuthorize("@ss.hasPermi('sim:real-exam:add')")
 | 
	
		
			
				|  |  |      @Log(title = "考试", businessType = BusinessType.INSERT)
 | 
	
		
			
				|  |  |      @PostMapping
 | 
	
		
			
				|  |  |      public AjaxResult add(@RequestBody RealExam realExam) {
 | 
	
	
		
			
				|  | @@ -79,7 +94,7 @@ public class RealExamController extends BaseController {
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 修改考试
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermi('sim:real-exam:edit')")
 | 
	
		
			
				|  |  | +    // @PreAuthorize("@ss.hasPermi('sim:real-exam:edit')")
 | 
	
		
			
				|  |  |      @Log(title = "考试", businessType = BusinessType.UPDATE)
 | 
	
		
			
				|  |  |      @PutMapping
 | 
	
		
			
				|  |  |      public AjaxResult edit(@RequestBody RealExam realExam) {
 | 
	
	
		
			
				|  | @@ -89,9 +104,9 @@ public class RealExamController extends BaseController {
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 删除考试
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    @PreAuthorize("@ss.hasPermi('sim:real-exam:remove')")
 | 
	
		
			
				|  |  | +    // @PreAuthorize("@ss.hasPermi('sim:real-exam:remove')")
 | 
	
		
			
				|  |  |      @Log(title = "考试", businessType = BusinessType.DELETE)
 | 
	
		
			
				|  |  | -    @DeleteMapping("/{examIds}")
 | 
	
		
			
				|  |  | +    // @DeleteMapping("/{examIds}")
 | 
	
		
			
				|  |  |      public AjaxResult remove(@PathVariable Long[] examIds) {
 | 
	
		
			
				|  |  |          return toAjax(realExamService.deleteRealExamByExamIds(examIds));
 | 
	
		
			
				|  |  |      }
 |