| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.SvyLibTopicRes; |
| | | import com.smartor.domain.SvyLibScript; |
| | | import com.smartor.domain.SvyLibScriptRes; |
| | | import com.smartor.domain.SvyTopic; |
| | | import com.smartor.domain.SvyTopicReq; |
| | | import com.smartor.service.ISvyTopicService; |
| | |
| | | /** |
| | | * 查询题目列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:topic:list')") |
| | | @PostMapping("/list") |
| | | //@PreAuthorize("@ss.hasPermi('system:topic:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody SvyTopic svyTopic) { |
| | | startPage(); |
| | | List<SvyTopic> list = svyTopicService.selectSvyTopicList(svyTopic); |
| | |
| | | /** |
| | | * 导出题目列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:topic:export')") |
| | | //@PreAuthorize("@ss.hasPermi('system:topic:export')") |
| | | @Log(title = "题目", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SvyTopic svyTopic) { |
| | |
| | | /** |
| | | * 获取题目详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:topic:query')") |
| | | //@PreAuthorize("@ss.hasPermi('system:topic:query')") |
| | | @GetMapping(value = "/{topicid}") |
| | | public AjaxResult getInfo(@PathVariable("topicid") Long topicid) { |
| | | return success(svyTopicService.selectSvyTopicByTopicid(topicid)); |
| | |
| | | /** |
| | | * 新增题目 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:topic:add')") |
| | | //@PreAuthorize("@ss.hasPermi('system:topic:add')") |
| | | @Log(title = "题目", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SvyTopic svyTopic) { |
| | |
| | | /** |
| | | * 修改题目 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:topic:edit')") |
| | | //@PreAuthorize("@ss.hasPermi('system:topic:edit')") |
| | | @Log(title = "题目", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SvyTopic svyTopic) { |
| | |
| | | /** |
| | | * 删除题目 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:topic:remove')") |
| | | //@PreAuthorize("@ss.hasPermi('system:topic:remove')") |
| | | @Log(title = "题目", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{topicids}") |
| | | public AjaxResult remove(@PathVariable Long[] topicids) { |
| | |
| | | @ApiOperation("导入题目模板") |
| | | @PostMapping("/importTopicTemplate") |
| | | public void importTopicTemplate(HttpServletResponse response) { |
| | | ExcelUtil<SvyLibTopicRes> util = new ExcelUtil<SvyLibTopicRes>(SvyLibTopicRes.class); |
| | | ExcelUtil<SvyLibScriptRes> util = new ExcelUtil<SvyLibScriptRes>(SvyLibScriptRes.class); |
| | | util.importTemplateExcel(response, "导入题目"); |
| | | } |
| | | |