feat(device): 新增设备截图管理功能
- 新增截图列表查询、单张删除、一键清空接口 - 上传截图时清洗文件名防路径穿越,filePath 仅存相对路径 - 截图静态资源映射禁用缓存,避免浏览器复用旧图 - 新增 ScreenshotVO 视图对象及 ScreenshotService 实现
This commit is contained in:
@@ -2,7 +2,33 @@ package com.youlai.boot.device.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.youlai.boot.device.model.entity.SnScreenshot;
|
||||
import com.youlai.boot.device.model.vo.ScreenshotVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ScreenshotService extends IService<SnScreenshot> {
|
||||
|
||||
/**
|
||||
* 根据设备序列号查询截图列表(按上传时间倒序)
|
||||
*
|
||||
* @param sn 设备序列号
|
||||
* @return 截图视图对象列表
|
||||
*/
|
||||
List<ScreenshotVO> listBySn(String sn);
|
||||
|
||||
/**
|
||||
* 删除单张截图(同时删除数据库记录与磁盘文件)
|
||||
*
|
||||
* @param id 截图ID
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
boolean deleteById(Long id);
|
||||
|
||||
/**
|
||||
* 清空指定设备的全部截图(同时删除数据库记录与磁盘文件)
|
||||
*
|
||||
* @param sn 设备序列号
|
||||
* @return 删除记录数
|
||||
*/
|
||||
int clearBySn(String sn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user