|
@@ -103,19 +103,23 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
|
}
|
|
|
objPathFile = new File(objPath );
|
|
|
if(!objPathFile.isDirectory()){
|
|
|
+ redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"-1");
|
|
|
throw new BusinessException(ResultCode.UPLOAD_FILE_TYPE_ERROR);
|
|
|
}
|
|
|
List<File> fileList = new ArrayList<>();
|
|
|
FileWriterUtil.getCanRunList(fileList,objPathFile);
|
|
|
|
|
|
if(fileList.size() != 1){
|
|
|
+ redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"-1");
|
|
|
throw new BusinessException(ResultCode.UPLOAD_FILE_TYPE_ERROR);
|
|
|
}
|
|
|
File file1 = fileList.get(0);
|
|
|
if(file1 == null){
|
|
|
+ redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"-1");
|
|
|
throw new BusinessException(ResultCode.UPLOAD_FILE_TYPE_ERROR);
|
|
|
}
|
|
|
if(com.fdkankan.fusion.common.util.StringUtils.isChinese(file1.getName())){
|
|
|
+ redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"-1");
|
|
|
throw new BusinessException(ResultCode.UPLOAD_FILE_CHINA_NAME);
|
|
|
}
|
|
|
redisUtil.set(RedisKeyUtil.modelUpload+model.getModelId(),"20");
|
|
@@ -296,6 +300,6 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
|
|
|
if(redisUtil.hasKey(redisKey)){
|
|
|
return redisUtil.get(redisKey);
|
|
|
}
|
|
|
- return "-1";
|
|
|
+ return "0";
|
|
|
}
|
|
|
}
|