huminmin
5 天以前 7a8827c634b53bb1cb861ebc1fd4ac6d1ae6cb5a
src/main/java/com/ruoyi/approve/controller/KnowledgeBaseController.java
@@ -7,6 +7,8 @@
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;
@@ -30,6 +32,7 @@
     * @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);
@@ -40,6 +43,7 @@
     * @return
     */
    @PostMapping("/add")
    @Log(title = "新增知识库管理", businessType = BusinessType.INSERT)
    public AjaxResult add(@RequestBody KnowledgeBase knowledgeBase){
        return AjaxResult.success(knowledgeBaseService.save(knowledgeBase));
    }
@@ -48,6 +52,7 @@
     * @return
     */
    @PostMapping("/update")
    @Log(title = "修改知识库管理", businessType = BusinessType.UPDATE)
    public AjaxResult update(@RequestBody KnowledgeBase knowledgeBase){
        return AjaxResult.success(knowledgeBaseService.updateById(knowledgeBase));
    }
@@ -56,6 +61,7 @@
     * @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));
@@ -63,6 +69,7 @@
    @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);