BUGFIX:系统模特上传;

This commit is contained in:
shahaibo
2023-10-04 14:58:06 +08:00
parent 9e7ed913ce
commit 00fcdf9cbf
3 changed files with 16 additions and 12 deletions

View File

@@ -12,6 +12,7 @@ import com.ai.da.common.utils.*;
import com.ai.da.mapper.entity.Library;
import com.ai.da.mapper.entity.LibraryModelPoint;
import com.ai.da.model.dto.*;
import com.ai.da.model.enums.ModelType;
import com.ai.da.model.vo.*;
import com.ai.da.service.LibraryModelPointService;
import com.ai.da.service.LibraryService;
@@ -79,7 +80,7 @@ public class LibraryController {
if (StringUtils.isEmpty(modelType)) {
throw new BusinessException("modelType can't be null");
}
if (StringUtils.isEmpty(sex)) {
if (modelType.equals(ModelType.SYSTEM.getValue()) && StringUtils.isEmpty(sex)) {
throw new BusinessException("sex can't be null");
}
FileVO fileVO = FileUtil.getFileSize(file);