Commit 710c52f5 authored by linruibiao's avatar linruibiao

接口编写

parent 62d4f26b
...@@ -322,8 +322,8 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane ...@@ -322,8 +322,8 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
where.eq(InstrumentPanelConfig::getPanelId, instrumentPanelId); where.eq(InstrumentPanelConfig::getPanelId, instrumentPanelId);
where.eq(InstrumentPanelConfig::getPublished, published.value); where.eq(InstrumentPanelConfig::getPublished, published.value);
InstrumentPanelConfig config = baseMapper.selectOne(where); InstrumentPanelConfig config = baseMapper.selectOne(where);
InstrumentPanelConfigVo vo=new InstrumentPanelConfigVo();
if(ObjectUtils.isNotEmpty(config)) { if(ObjectUtils.isNotEmpty(config)) {
InstrumentPanelConfigVo vo = new InstrumentPanelConfigVo();
BeanUtils.copyProperties(config, vo); BeanUtils.copyProperties(config, vo);
if (ObjectUtils.isNotEmpty(vo)) { if (ObjectUtils.isNotEmpty(vo)) {
try { try {
...@@ -332,21 +332,20 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane ...@@ -332,21 +332,20 @@ public class InstrumentPanelConfigServiceImpl extends ServiceImpl<InstrumentPane
e.printStackTrace(); e.printStackTrace();
throw new SysException("仪表板配置详情解密异常"); throw new SysException("仪表板配置详情解密异常");
} }
vo.setPermissions(permissionService.getPublishPermissionByPanelId(instrumentPanelId, published.value));
InstrumentPanelVo panelVo = new InstrumentPanelVo();
if (PublishedStatus.PUBLISHED.value.equals(published.value)) {
InstrumentPanelDraft panel = draftService.getByPanelId(instrumentPanelId);
BeanUtils.copyProperties(panel, panelVo);
} else {
InstrumentPanel panel = panelService.getById(instrumentPanelId);
BeanUtils.copyProperties(panel, panelVo);
}
vo.setPanel(panelVo);
return vo;
} }
} }
return null; vo.setPermissions(permissionService.getPublishPermissionByPanelId(instrumentPanelId, published.value));
InstrumentPanelVo panelVo = new InstrumentPanelVo();
if (PublishedStatus.PUBLISHED.value.equals(published.value)) {
InstrumentPanelDraft panel = draftService.getByPanelId(instrumentPanelId);
BeanUtils.copyProperties(panel, panelVo);
} else {
InstrumentPanel panel = panelService.getById(instrumentPanelId);
BeanUtils.copyProperties(panel, panelVo);
vo.setPanelId(instrumentPanelId);
}
vo.setPanel(panelVo);
return vo;
} }
private void fillPanelProp(InstrumentPanelPermissionDTO permission, InstrumentPanel panel,String publishStatus) { private void fillPanelProp(InstrumentPanelPermissionDTO permission, InstrumentPanel panel,String publishStatus) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment