【步骤为空时,保存出错】
This commit is contained in:
parent
8ff182e6e7
commit
04b7a35a6b
@ -144,6 +144,7 @@ public class Training2DraftService {
|
|||||||
//
|
//
|
||||||
this.trainingDao.updateByExampleSelective(b, example);
|
this.trainingDao.updateByExampleSelective(b, example);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置用户实训草稿
|
* 重置用户实训草稿
|
||||||
*/
|
*/
|
||||||
@ -169,6 +170,7 @@ public class Training2DraftService {
|
|||||||
//
|
//
|
||||||
this.trainingDao.updateByExampleSelective(b, example);
|
this.trainingDao.updateByExampleSelective(b, example);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新用户实训草稿的地图定位信息
|
* 更新用户实训草稿的地图定位信息
|
||||||
*/
|
*/
|
||||||
@ -354,13 +356,13 @@ public class Training2DraftService {
|
|||||||
}
|
}
|
||||||
// 保存当前背景
|
// 保存当前背景
|
||||||
Simulation simulation = this.roupSimulationService.getSimulationByGroup(group);
|
Simulation simulation = this.roupSimulationService.getSimulationByGroup(group);
|
||||||
|
DraftTraining2WithBLOBs updateObj = new DraftTraining2WithBLOBs();
|
||||||
|
updateObj.setId(trainingId);
|
||||||
String stepJson;
|
String stepJson;
|
||||||
if (CollectionUtils.isEmpty(step2VOList)) {
|
if (CollectionUtils.isEmpty(step2VOList)) {
|
||||||
stepJson = StringUtil.EMPTY_STRING;
|
updateObj.setStepJson(StringUtil.EMPTY_STRING);
|
||||||
} else {
|
} else {
|
||||||
stepJson = JsonUtils.writeValueAsString(step2VOList);
|
stepJson = JsonUtils.writeValueAsString(step2VOList);
|
||||||
}
|
|
||||||
// 扮演者集合
|
// 扮演者集合
|
||||||
List<String> playerList = step2VOList.stream().
|
List<String> playerList = step2VOList.stream().
|
||||||
filter(s -> !StringUtils.isEmpty(s.getMemberId())).map(s -> s.getMemberId())
|
filter(s -> !StringUtils.isEmpty(s.getMemberId())).map(s -> s.getMemberId())
|
||||||
@ -368,10 +370,9 @@ public class Training2DraftService {
|
|||||||
if (CollectionUtils.isEmpty(playerList)) {
|
if (CollectionUtils.isEmpty(playerList)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Data_Not_Exist, "错误数据:无扮演者");
|
throw new SimulationException(SimulationExceptionType.Data_Not_Exist, "错误数据:无扮演者");
|
||||||
}
|
}
|
||||||
DraftTraining2WithBLOBs updateObj = new DraftTraining2WithBLOBs();
|
|
||||||
updateObj.setId(trainingId);
|
|
||||||
updateObj.setStepJson(stepJson);
|
|
||||||
updateObj.setPlayerIdJson(JsonUtils.writeValueAsString(playerList));
|
updateObj.setPlayerIdJson(JsonUtils.writeValueAsString(playerList));
|
||||||
|
updateObj.setStepJson(stepJson);
|
||||||
|
}
|
||||||
// 背景
|
// 背景
|
||||||
StorageSimulation scenesSaving = new StorageSimulation(simulation, false);
|
StorageSimulation scenesSaving = new StorageSimulation(simulation, false);
|
||||||
updateObj.setFinalScenesJson(JsonUtils.writeValueAsString(scenesSaving));
|
updateObj.setFinalScenesJson(JsonUtils.writeValueAsString(scenesSaving));
|
||||||
|
Loading…
Reference in New Issue
Block a user