BUGFIX: 上传校验;

This commit is contained in:
shahaibo
2023-11-01 09:56:02 +08:00
parent 998ad81835
commit 78678efd5d

View File

@@ -170,7 +170,7 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
throw new BusinessException("unknown.parameter.level2Type");
}
}
if (!StringUtils.isEmpty(libraryUploadDTO.getLevel2Type()) || level1TypeEnum.equals(LibraryLevel1TypeEnum.SKETCH_BOARD)) {
if (level1TypeEnum.equals(LibraryLevel1TypeEnum.SKETCH_BOARD) && StringUtils.isEmpty(libraryUploadDTO.getLevel2Type())) {
throw new BusinessException("level2Type.cannot.be.empty");
}
String path = calculateFileUrl(level1TypeEnum, libraryUploadDTO.getLevel2Type(), libraryUploadDTO.getModelSex(), userInfo.getId());