|
@@ -4,6 +4,7 @@ import java.util.List;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.xzl.common.core.domain.entity.KnowledgeFile;
|
|
|
+import com.xzl.common.core.domain.entity.SysFileFolder;
|
|
|
import com.xzl.web.service.KnowledgeFileService;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -102,4 +103,17 @@ public class KnowledgeFileController extends BaseController
|
|
|
{
|
|
|
return toAjax(knowledgeFileService.deleteSysFileByFileIds(fileIds));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改文件状态
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:file:edit')")
|
|
|
+ @Log(title = "文件", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping("/changeStatus")
|
|
|
+ public AjaxResult changeStatus(@RequestBody KnowledgeFile knowledgeFile) {
|
|
|
+ if (knowledgeFile.getFileId() == null || knowledgeFile.getStatus() == null) {
|
|
|
+ return AjaxResult.error("fileId 和 status 不能为空");
|
|
|
+ }
|
|
|
+ return toAjax(knowledgeFileService.updateSysFileStatus(knowledgeFile.getFileId(), knowledgeFile.getStatus()));
|
|
|
+ }
|
|
|
}
|