1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- package com.ruoyi.file.service;
- import com.ruoyi.file.domain.FileUpdateInfo;
- import com.ruoyi.file.domain.FileWithId;
- import com.usky.common.core.bean.CommonPage;
- import org.springframework.web.bind.annotation.RequestParam;
- public interface FileUpdateInfoService {
- /**
- * 获取文件的运行状态
- * @param fileName 文件名
- * @return 状态码(1: 运行中,2: 已停止,0: 未知)
- */
- int getFileStatus(String fileName);
- //添加服务信息
- void addFileToDatabase(FileUpdateInfo fileUpdateInfo) throws Exception;
- //检查服务更新
- boolean checkFileUpdate(Long id) throws Exception;
- //执行服务更新
- void performFileUpdate(Long id) throws Exception;
- // 获取所有服务信息(分页)
- CommonPage<FileUpdateInfo> getAllFiles(
- @RequestParam(required = false, defaultValue = "1") int current,
- @RequestParam(required = false, defaultValue = "10") int size) throws Exception;
- // 根据文件名模糊查询服务信息(分页)
- CommonPage<FileUpdateInfo> getFilesByFileNameContaining(
- @RequestParam(required = false) String fileName,
- @RequestParam(required = false, defaultValue = "1") int current,
- @RequestParam(required = false, defaultValue = "10") int size) throws Exception;
- //根据id查询服务信息
- FileUpdateInfo getFileById(Long id) throws Exception;
- //删除服务信息
- void deleteFileById(Long id) throws Exception;
- //控制服务运行状态
- void controlApplication(String fileName, String action) throws Exception;
- // 扫描 JAR 文件所在的目录并获取文件列表
- CommonPage<FileWithId> scanFilesInServiceDir(
- @RequestParam(required = false, defaultValue = "1") int current,
- @RequestParam(required = false, defaultValue = "10") int size) throws Exception;
- }
|