- 新增截图列表查询、单张删除、一键清空接口 - 上传截图时清洗文件名防路径穿越,filePath 仅存相对路径 - 截图静态资源映射禁用缓存,避免浏览器复用旧图 - 新增 ScreenshotVO 视图对象及 ScreenshotService 实现
35 lines
919 B
Java
35 lines
919 B
Java
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);
|
|
}
|