| | |
| | | import com.ruoyi.approve.pojo.RpaProcessAutomation; |
| | | import com.ruoyi.approve.service.KnowledgeBaseService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getList") |
| | | @Log(title = "获取知识库管理列表", businessType = BusinessType.OTHER) |
| | | public AjaxResult getList(@RequestParam(defaultValue = "1") long current, |
| | | @RequestParam(defaultValue = "10") long size, KnowledgeBase knowledgeBase) { |
| | | Page page = new Page(current, size); |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @Log(title = "新增知识库管理", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody KnowledgeBase knowledgeBase){ |
| | | return AjaxResult.success(knowledgeBaseService.save(knowledgeBase)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/update") |
| | | @Log(title = "修改知识库管理", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody KnowledgeBase knowledgeBase){ |
| | | return AjaxResult.success(knowledgeBaseService.updateById(knowledgeBase)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | @Log(title = "删除知识库管理", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | | return AjaxResult.success(knowledgeBaseService.removeByIds(ids)); |
| | |
| | | |
| | | @ApiOperation(value = "知识库管理导出") |
| | | @PostMapping("/export") |
| | | @Log(title = "知识库管理导出", businessType = BusinessType.EXPORT) |
| | | public void export(HttpServletResponse response) { |
| | | List<KnowledgeBase> accountExpenses = knowledgeBaseService.list(); |
| | | ExcelUtil<KnowledgeBase> util = new ExcelUtil<KnowledgeBase>(KnowledgeBase.class); |