15 小时以前 af94c2246fd1aa7ea506a180f001525d416105c8
fix(product): 修复产品模型文件迁移逻辑

- 调整了临时文件删除和正式文件迁移的执行顺序
- 确保只有在存在临时文件时才执行文件迁移操作
- 优化了文件服务调用的条件判断逻辑
已修改1个文件
2 ■■■ 文件已修改
src/main/java/com/ruoyi/basic/service/impl/ProductModelServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/basic/service/impl/ProductModelServiceImpl.java
@@ -83,8 +83,8 @@
                product.setProductName(productModelDto.getProductName());
                productMapper.updateById(product);
            }
            commonFileService.deleteByBusinessIds(Collections.singletonList(productModelDto.getId()), FileNameType.PRODUCT_MODEL.getValue());
            if(CollectionUtils.isNotEmpty(productModelDto.getTempFileIds())){
                commonFileService.deleteByBusinessIds(Collections.singletonList(productModelDto.getId()), FileNameType.PRODUCT_MODEL.getValue());
                commonFileService.migrateTempFilesToFormal(productModelDto.getId(), productModelDto.getTempFileIds());
            }
            return productModelMapper.updateById(productModelDto);