1.图像列表上传问题修复
This commit is contained in:
parent
cffae035db
commit
cbe77aeef3
|
@ -132,7 +132,7 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public List<ImageReq> batchUploadDefectImage(String partId, String imageSource, ImageCollectReq collectReq, MultipartFile[] files) {
|
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);
|
throw new ServiceException(Message.IMAGE_SOURCE_IS_NOT_EXIST);
|
||||||
}
|
}
|
||||||
if(null == partService.getById(partId)){
|
if(null == partService.getById(partId)){
|
||||||
|
@ -160,7 +160,7 @@ public class ImageServiceImpl extends ServiceImpl<ImageMapper, ImageEntity> impl
|
||||||
ImageReq imageReq = imageRespBuilder(path);
|
ImageReq imageReq = imageRespBuilder(path);
|
||||||
BeanUtil.copyProperties(imageReq, imageEntity);
|
BeanUtil.copyProperties(imageReq, imageEntity);
|
||||||
list.add(imageReq);
|
list.add(imageReq);
|
||||||
imageEntity.setImagePath(path);
|
imageEntity.setImagePath(FilePathEnum.IMAGE_TEMP.getFileDownPath(path));
|
||||||
imageEntity.setPartId(partId);
|
imageEntity.setPartId(partId);
|
||||||
imageEntity.setCollectId(imageCollect.getCollectId());
|
imageEntity.setCollectId(imageCollect.getCollectId());
|
||||||
imageList.add(imageEntity);
|
imageList.add(imageEntity);
|
||||||
|
|
Loading…
Reference in New Issue