音频处理服务
This commit is contained in:
@ -3,7 +3,7 @@ package com.fuyuanshen.equipment.domain.vo;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 数据总览
|
||||
* 首页数据总览
|
||||
*
|
||||
* @author: 默苍璃
|
||||
* @date: 2025-09-0114:24
|
||||
|
||||
@ -66,11 +66,6 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
|
||||
private final ISysRoleService roleService;
|
||||
|
||||
@Value("${file.device.pic}")
|
||||
private String filePath;
|
||||
@Value("${file.device.ip}")
|
||||
private String ip;
|
||||
|
||||
private final DeviceMapper deviceMapper;
|
||||
private final DeviceTypeMapper deviceTypeMapper;
|
||||
private final CustomerMapper customerMapper;
|
||||
@ -301,35 +296,6 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 保存设备图片并返回访问路径
|
||||
*
|
||||
* @param file MultipartFile
|
||||
* @param deviceMac 设备MAC用于生成唯一文件名
|
||||
* @return 文件存储路径 URL 形式
|
||||
*/
|
||||
private String saveDeviceImage(MultipartFile file, String deviceMac) throws IOException {
|
||||
if (file == null || file.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String originalFileName = file.getOriginalFilename();
|
||||
String fileExtension = originalFileName.substring(originalFileName.lastIndexOf(".") + 1);
|
||||
String newFileName = "PS_" + deviceMac + "." + fileExtension;
|
||||
|
||||
File newFile = new File(filePath + DeviceConstants.FILE_ACCESS_ISOLATION + File.separator + newFileName);
|
||||
|
||||
if (!newFile.getParentFile().exists()) {
|
||||
newFile.getParentFile().mkdirs();
|
||||
}
|
||||
|
||||
log.info("图片保存路径: {}", newFile.getAbsolutePath());
|
||||
file.transferTo(newFile);
|
||||
|
||||
return ip + DeviceConstants.FILE_ACCESS_PREFIX + "/" + DeviceConstants.FILE_ACCESS_ISOLATION + "/" + newFileName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除设备
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user