| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | return R.data(subject); |
| | | } |
| | | |
| | | /** |
| | | * 返回当前时间 |
| | | */ |
| | | @GetMapping("/getdate") |
| | | @ApiOperationSupport(order = 9) |
| | | public R getdate() { |
| | | Date date = new Date(); |
| | | String strDateFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat); |
| | | System.out.println(sdf.format(date)); |
| | | return R.data(sdf.format(date)); |
| | | } |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * @param examPaper |
| | | * @return |
| | | */ |
| | | @GetMapping("/page-tree") |
| | | public R pageTree(ExamPaper examPaper) { |
| | | List<ExamPaper> pages = examPaperService.selectExamPaperPageTree(examPaper); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 解除绑定 |
| | | */ |
| | | @GetMapping("/UnbindSubject") |
| | | public R UnbindSubject(String paperid,String subjectid){ |
| | | |
| | | return R.status(examPaperService.UnbindSubject(paperid,subjectid)); |
| | | } |
| | | } |