1.图像列表上传问题修复

This commit is contained in:
cuizhibin 2025-07-04 13:50:30 +08:00
parent cffae035db
commit cbe77aeef3
1 changed files with 2 additions and 2 deletions

View File

@ -132,7 +132,7 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
@Transactional(rollbackFor = Exception.class)
@Override
public List<ImageReq> batchUploadDefectImage(String partId, String imageSource, ImageCollectReq collectReq, MultipartFile[] files) {
if (StrUtil.isEmpty(imageSource) || Objects.nonNull(ImageSourceEnum.getByCode(imageSource))) {
if (StrUtil.isEmpty(imageSource) || Objects.isNull(ImageSourceEnum.getByCode(imageSource))) {
throw new ServiceException(Message.IMAGE_SOURCE_IS_NOT_EXIST);
}
if(null == partService.getById(partId)){
@ -160,7 +160,7 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
ImageReq imageReq = imageRespBuilder(path);
BeanUtil.copyProperties(imageReq, imageEntity);
list.add(imageReq);
imageEntity.setImagePath(path);
imageEntity.setImagePath(FilePathEnum.IMAGE_TEMP.getFileDownPath(path));
imageEntity.setPartId(partId);
imageEntity.setCollectId(imageCollect.getCollectId());
imageList.add(imageEntity);