|
|
@@ -91,6 +91,12 @@ public class SceneInfoService extends SuperService {
|
|
|
return ResultContent.buildSuccess(PageEntityUtil.concurrent2PageModel(page, this::toModel));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 得到应用详情(包括组件)
|
|
|
+ *
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public ResultContent<SceneInfoAboutComModel> getDetailById(String id) {
|
|
|
SceneInfo entity = sceneInfoDao.findTopById(id);
|
|
|
if (ObjectUtils.isEmpty(entity)) {
|
|
|
@@ -156,6 +162,8 @@ public class SceneInfoService extends SuperService {
|
|
|
if (ObjectUtils.isEmpty(component)) {
|
|
|
component = new SceneComponent();
|
|
|
}
|
|
|
+ component.setSceneInfo(sceneInfo);
|
|
|
+ component.setSceneInfoId(sceneInfo.getId());
|
|
|
BeanUtils.copyProperties(param, component);
|
|
|
componentEntitys.add(component);
|
|
|
if (StringUtils.isNotEmpty(param.getId()) && ids.contains(param.getId())) {
|
|
|
@@ -224,7 +232,7 @@ public class SceneInfoService extends SuperService {
|
|
|
if (ObjectUtils.isNotEmpty(entity)) {
|
|
|
BeanUtils.copyProperties(entity, model);
|
|
|
// 场景包含的组件
|
|
|
- model.setChildren(getSceneAllComponents(entity.getId()));
|
|
|
+ model.setComponents(getSceneAllComponents(entity.getId()));
|
|
|
}
|
|
|
return model;
|
|
|
}
|