|
@@ -38,7 +38,7 @@ public class AgeServiceImpl implements AgeService {
|
|
|
ConfigConstant configConstant;
|
|
|
|
|
|
@Override
|
|
|
- public Result uploadAge(MultipartFile file) {
|
|
|
+ public Result uploadAge(MultipartFile file, String name) {
|
|
|
|
|
|
|
|
|
String sceneCode = getSceneCode(file);
|
|
@@ -48,6 +48,7 @@ public class AgeServiceImpl implements AgeService {
|
|
|
if (dbEntity == null) {
|
|
|
//创建父级
|
|
|
dbEntity = new SceneEntity();
|
|
|
+ dbEntity.setSceneTitle(name);
|
|
|
dbEntity.setSceneCode(sceneCode);
|
|
|
dbEntity.setVersion(1);
|
|
|
sceneService.save(dbEntity);
|
|
@@ -70,10 +71,11 @@ public class AgeServiceImpl implements AgeService {
|
|
|
VisionToVisionModelData(ageBaseSceneCodePath);
|
|
|
createSomeDataJaon(ageBaseSceneCodePath, newSceneCode);
|
|
|
createData2Js(ageBaseSceneCodePath);
|
|
|
- String scenePath = configConstant.serverBasePath + "/" + newSceneCode;
|
|
|
+ String scenePath = configConstant.serverBasePath + "/data/" + newSceneCode;
|
|
|
moveFile(ageBaseSceneCodePath, scenePath);
|
|
|
|
|
|
SceneEntity sceneEntity = new SceneEntity();
|
|
|
+ sceneEntity.setSceneTitle(name);
|
|
|
sceneEntity.setSceneCode(newSceneCode);
|
|
|
sceneEntity.setPath("/data/" + newSceneCode);
|
|
|
Long parentId = dbEntity.getId();
|