feat(file-upload): 集成新疆OSS文件上传功能并优化设备删除逻辑

- 实现新疆油田平台OSS文件上传工具类XjOssUtil,支持OAuth2鉴权和文件操作
- 在MyUploadUtil中集成OSS上传逻辑,通过oss_flag配置动态选择上传方式
- 为.tar和.apk文件强制使用MyUploadUtil上传,其他文件根据oss_flag配置决定上传方式
- 在手表设备删除接口中增加绑定用户检查,已绑定用户的手表不允许删除
- 添加GlobalManager依赖注入以支持动态配置读取
- 实现文件上传流程的日志记录和错误处理机制
This commit is contained in:
2026-04-21 17:22:09 +08:00
parent 44b0f6ca2b
commit 1988e031e5
7 changed files with 927 additions and 166 deletions
@@ -357,6 +357,10 @@ public class WatchDeviceController extends JeecgController<WatchDevice, IWatchDe
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
WatchDevice watchDevice = watchDeviceService.getById(id);
// 已绑定用户的手表不允许删除
if (StringUtils.hasLength(watchDevice.getBindUserId())) {
return Result.error("该手表已绑定用户,请先解绑后再删除!");
}
watchDeviceService.removeById(id);
// 删除开关
LambdaQueryWrapper<WatchDeviceSwitch> queryWrapper = new LambdaQueryWrapper<>();