Showing
1 changed file
with
7 additions
and
3 deletions
@@ -37,20 +37,22 @@ public class TkConfigurationContentServiceImpl | @@ -37,20 +37,22 @@ public class TkConfigurationContentServiceImpl | ||
37 | @Transactional | 37 | @Transactional |
38 | public ConfigurationContentDTO saveConfigurationContent( | 38 | public ConfigurationContentDTO saveConfigurationContent( |
39 | ConfigurationContentDTO configurationContentDTO) { | 39 | ConfigurationContentDTO configurationContentDTO) { |
40 | - freshNodeData(configurationContentDTO.getTenantId(), configurationContentDTO.getContentId(), configurationContentDTO.getNodeIds()); | 40 | + freshNodeData(configurationContentDTO.getConfigurationId(),configurationContentDTO.getTenantId(), configurationContentDTO.getContentId(), configurationContentDTO.getNodeIds()); |
41 | baseMapper.insert(configurationContentDTO.getEntity(TkConfigurationContentEntity.class)); | 41 | baseMapper.insert(configurationContentDTO.getEntity(TkConfigurationContentEntity.class)); |
42 | return configurationContentDTO; | 42 | return configurationContentDTO; |
43 | } | 43 | } |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * 刷新组态的结点数据 | 46 | * 刷新组态的结点数据 |
47 | + * @param configurationId 组态ID | ||
47 | * @param tenantId 租户ID | 48 | * @param tenantId 租户ID |
48 | * @param contentId 页签ID | 49 | * @param contentId 页签ID |
49 | * @param nodeIds 页面内组件集合 | 50 | * @param nodeIds 页面内组件集合 |
50 | */ | 51 | */ |
51 | - private void freshNodeData(String tenantId,String contentId,List<String> nodeIds){ | 52 | + private void freshNodeData(String configurationId, String tenantId,String contentId,List<String> nodeIds){ |
52 | LambdaQueryWrapper<TkConfigurationDatasourceEntity> datasourceFilter = new QueryWrapper<TkConfigurationDatasourceEntity>().lambda() | 53 | LambdaQueryWrapper<TkConfigurationDatasourceEntity> datasourceFilter = new QueryWrapper<TkConfigurationDatasourceEntity>().lambda() |
53 | .eq(TkConfigurationDatasourceEntity::getTenantId,tenantId) | 54 | .eq(TkConfigurationDatasourceEntity::getTenantId,tenantId) |
55 | + .eq(TkConfigurationDatasourceEntity::getConfigurationId,configurationId) | ||
54 | .eq(TkConfigurationDatasourceEntity::getContentId,contentId); | 56 | .eq(TkConfigurationDatasourceEntity::getContentId,contentId); |
55 | List<TkConfigurationDatasourceEntity> datasources =datasourceMapper.selectList(datasourceFilter); | 57 | List<TkConfigurationDatasourceEntity> datasources =datasourceMapper.selectList(datasourceFilter); |
56 | datasources.forEach(item ->{ | 58 | datasources.forEach(item ->{ |
@@ -63,6 +65,7 @@ public class TkConfigurationContentServiceImpl | @@ -63,6 +65,7 @@ public class TkConfigurationContentServiceImpl | ||
63 | 65 | ||
64 | LambdaQueryWrapper<TkConfigurationEventEntity> eventFilter = new QueryWrapper<TkConfigurationEventEntity>().lambda() | 66 | LambdaQueryWrapper<TkConfigurationEventEntity> eventFilter = new QueryWrapper<TkConfigurationEventEntity>().lambda() |
65 | .eq(TkConfigurationEventEntity::getTenantId,tenantId) | 67 | .eq(TkConfigurationEventEntity::getTenantId,tenantId) |
68 | + .eq(TkConfigurationEventEntity::getConfigurationId,configurationId) | ||
66 | .eq(TkConfigurationEventEntity::getContentId,contentId); | 69 | .eq(TkConfigurationEventEntity::getContentId,contentId); |
67 | List<TkConfigurationEventEntity> events =eventMapper.selectList(eventFilter); | 70 | List<TkConfigurationEventEntity> events =eventMapper.selectList(eventFilter); |
68 | events.forEach(item ->{ | 71 | events.forEach(item ->{ |
@@ -75,6 +78,7 @@ public class TkConfigurationContentServiceImpl | @@ -75,6 +78,7 @@ public class TkConfigurationContentServiceImpl | ||
75 | 78 | ||
76 | LambdaQueryWrapper<TkConfigurationActEntity> actFilter = new QueryWrapper<TkConfigurationActEntity>().lambda() | 79 | LambdaQueryWrapper<TkConfigurationActEntity> actFilter = new QueryWrapper<TkConfigurationActEntity>().lambda() |
77 | .eq(TkConfigurationActEntity::getTenantId,tenantId) | 80 | .eq(TkConfigurationActEntity::getTenantId,tenantId) |
81 | + .eq(TkConfigurationActEntity::getConfigurationId,configurationId) | ||
78 | .eq(TkConfigurationActEntity::getContentId,contentId); | 82 | .eq(TkConfigurationActEntity::getContentId,contentId); |
79 | List<TkConfigurationActEntity> acts =actMapper.selectList(actFilter); | 83 | List<TkConfigurationActEntity> acts =actMapper.selectList(actFilter); |
80 | acts.forEach(item ->{ | 84 | acts.forEach(item ->{ |
@@ -95,7 +99,7 @@ public class TkConfigurationContentServiceImpl | @@ -95,7 +99,7 @@ public class TkConfigurationContentServiceImpl | ||
95 | if (!configurationContent.getTenantId().equals(configurationContentDTO.getTenantId())) { | 99 | if (!configurationContent.getTenantId().equals(configurationContentDTO.getTenantId())) { |
96 | throw new TkDataValidationException(ErrorMessage.TENANT_MISMATCHING.getMessage()); | 100 | throw new TkDataValidationException(ErrorMessage.TENANT_MISMATCHING.getMessage()); |
97 | } | 101 | } |
98 | - freshNodeData(configurationContentDTO.getTenantId(), configurationContentDTO.getContentId(), configurationContentDTO.getNodeIds()); | 102 | + freshNodeData(configurationContentDTO.getConfigurationId(),configurationContentDTO.getTenantId(), configurationContentDTO.getContentId(), configurationContentDTO.getNodeIds()); |
99 | baseMapper.updateById(configurationContentDTO.getEntity(TkConfigurationContentEntity.class)); | 103 | baseMapper.updateById(configurationContentDTO.getEntity(TkConfigurationContentEntity.class)); |
100 | return configurationContentDTO; | 104 | return configurationContentDTO; |
101 | } | 105 | } |