ÎļþÃû´Ó ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTopicCategoryController.java ÐÞ¸Ä |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.SvyLibTopicCategory; |
| | | import com.smartor.domain.SvyLibTopicCategoryVO; |
| | | import com.smartor.service.ISvyLibTopicCategoryService; |
| | | import com.smartor.domain.SvyLibScriptCategory; |
| | | import com.smartor.domain.SvyLibScriptCategoryVO; |
| | | import com.smartor.service.ISvyLibScriptCategoryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | */ |
| | | @Api(description = "é®å·é¢åºåç±»") |
| | | @RestController |
| | | @RequestMapping("/smartor/svyLibTopicCategory") |
| | | public class SvyLibTopicCategoryController extends BaseController { |
| | | @RequestMapping("/smartor/svyLibScriptCategory") |
| | | public class SvyLibScriptCategoryController extends BaseController { |
| | | @Autowired |
| | | private ISvyLibTopicCategoryService svyLibTopicCategoryService; |
| | | private ISvyLibScriptCategoryService svyLibScriptCategoryService; |
| | | |
| | | /** |
| | | * æ¥è¯¢é®å·é¢ç®åç±»å表 |
| | |
| | | @ApiOperation("æ¥è¯¢é®å·é¢ç®åç±»å表") |
| | | @PreAuthorize("@ss.hasPermi('smartor:category:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody SvyLibTopicCategory svyLibTopicCategory) { |
| | | public TableDataInfo list(@RequestBody SvyLibScriptCategory svyLibScriptCategory) { |
| | | startPage(); |
| | | List<SvyLibTopicCategoryVO> list = svyLibTopicCategoryService.selectSvyLibTopicCategoryList(svyLibTopicCategory); |
| | | List<SvyLibScriptCategoryVO> list = svyLibScriptCategoryService.selectSvyLibScriptCategoryList(svyLibScriptCategory); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:category:export')") |
| | | @Log(title = "é®å·é¢ç®åç±»", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SvyLibTopicCategory svyLibTopicCategory) { |
| | | List<SvyLibTopicCategoryVO> list = svyLibTopicCategoryService.selectSvyLibTopicCategoryList(svyLibTopicCategory); |
| | | ExcelUtil<SvyLibTopicCategoryVO> util = new ExcelUtil<SvyLibTopicCategoryVO>(SvyLibTopicCategoryVO.class); |
| | | public void export(HttpServletResponse response, SvyLibScriptCategory svyLibScriptCategory) { |
| | | List<SvyLibScriptCategoryVO> list = svyLibScriptCategoryService.selectSvyLibScriptCategoryList(svyLibScriptCategory); |
| | | ExcelUtil<SvyLibScriptCategoryVO> util = new ExcelUtil<SvyLibScriptCategoryVO>(SvyLibScriptCategoryVO.class); |
| | | util.exportExcel(response, list, "é®å·é¢ç®åç±»æ°æ®"); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:category:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(svyLibTopicCategoryService.selectSvyLibTopicCategoryById(id)); |
| | | return success(svyLibScriptCategoryService.selectSvyLibScriptCategoryById(id)); |
| | | } |
| | | |
| | | // /** |
| | |
| | | // @PreAuthorize("@ss.hasPermi('smartor:category:add')") |
| | | // @Log(title = "é®å·é¢ç®åç±»", businessType = BusinessType.INSERT) |
| | | // @PostMapping("/add") |
| | | // public AjaxResult add(@RequestBody SvyLibTopicCategory svyLibTopicCategory) { |
| | | // return toAjax(svyLibTopicCategoryService.insertSvyLibTopicCategory(svyLibTopicCategory)); |
| | | // public AjaxResult add(@RequestBody SvyLibScriptCategory svyLibScriptCategory) { |
| | | // return toAjax(svyLibScriptCategoryService.insertSvyLibScriptCategory(svyLibScriptCategory)); |
| | | // } |
| | | |
| | | /** |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:category:edit')") |
| | | @Log(title = "é®å·é¢ç®åç±»", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SvyLibTopicCategory svyLibTopicCategory) { |
| | | return toAjax(svyLibTopicCategoryService.updateSvyLibTopicCategory(svyLibTopicCategory)); |
| | | public AjaxResult edit(@RequestBody SvyLibScriptCategory svyLibScriptCategory) { |
| | | return toAjax(svyLibScriptCategoryService.updateSvyLibScriptCategory(svyLibScriptCategory)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Log(title = "é®å·é¢ç®åç±»", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(svyLibTopicCategoryService.deleteSvyLibTopicCategoryByIds(ids)); |
| | | return toAjax(svyLibScriptCategoryService.deleteSvyLibScriptCategoryByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Log(title = "é®å·é¢ç®åç±»æ ", businessType = BusinessType.INSERT) |
| | | @ApiOperation("é®å·é¢ç®åç±»æ ") |
| | | @PostMapping("/addtree") |
| | | public AjaxResult addtree(@RequestBody SvyLibTopicCategoryVO svyLibTopicCategoryVO) { |
| | | return toAjax(svyLibTopicCategoryService.insertSvyLibTopicCategoryTree(svyLibTopicCategoryVO)); |
| | | public AjaxResult addtree(@RequestBody SvyLibScriptCategoryVO svyLibScriptCategoryVO) { |
| | | return toAjax(svyLibScriptCategoryService.insertSvyLibScriptCategoryTree(svyLibScriptCategoryVO)); |
| | | } |
| | | } |