Просмотр исходного кода

fix 修复 oracle 新建租户报错问题

疯狂的狮子Li 1 год назад
Родитель
Сommit
d80f6ab695

+ 15 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysTenantServiceImpl.java

@@ -179,10 +179,20 @@ public class SysTenantServiceImpl implements ISysTenantService {
         for (SysDictType dictType : dictTypeList) {
         for (SysDictType dictType : dictTypeList) {
             dictType.setDictId(null);
             dictType.setDictId(null);
             dictType.setTenantId(tenantId);
             dictType.setTenantId(tenantId);
+            dictType.setCreateDept(null);
+            dictType.setCreateBy(null);
+            dictType.setCreateTime(null);
+            dictType.setUpdateBy(null);
+            dictType.setUpdateTime(null);
         }
         }
         for (SysDictData dictData : dictDataList) {
         for (SysDictData dictData : dictDataList) {
             dictData.setDictCode(null);
             dictData.setDictCode(null);
             dictData.setTenantId(tenantId);
             dictData.setTenantId(tenantId);
+            dictData.setCreateDept(null);
+            dictData.setCreateBy(null);
+            dictData.setCreateTime(null);
+            dictData.setUpdateBy(null);
+            dictData.setUpdateTime(null);
         }
         }
         dictTypeMapper.insertBatch(dictTypeList);
         dictTypeMapper.insertBatch(dictTypeList);
         dictDataMapper.insertBatch(dictDataList);
         dictDataMapper.insertBatch(dictDataList);
@@ -192,6 +202,11 @@ public class SysTenantServiceImpl implements ISysTenantService {
         for (SysConfig config : sysConfigList) {
         for (SysConfig config : sysConfigList) {
             config.setConfigId(null);
             config.setConfigId(null);
             config.setTenantId(tenantId);
             config.setTenantId(tenantId);
+            config.setCreateDept(null);
+            config.setCreateBy(null);
+            config.setCreateTime(null);
+            config.setUpdateBy(null);
+            config.setUpdateTime(null);
         }
         }
         configMapper.insertBatch(sysConfigList);
         configMapper.insertBatch(sysConfigList);
 
 

+ 5 - 0
ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwDefinitionServiceImpl.java

@@ -219,6 +219,11 @@ public class FlwDefinitionServiceImpl implements IFlwDefinitionService {
             .eq(FlowCategory::getTenantId, DEFAULT_TENANT_ID).eq(FlowCategory::getCategoryId, FlowConstant.FLOW_CATEGORY_ID));
             .eq(FlowCategory::getTenantId, DEFAULT_TENANT_ID).eq(FlowCategory::getCategoryId, FlowConstant.FLOW_CATEGORY_ID));
         flowCategory.setCategoryId(null);
         flowCategory.setCategoryId(null);
         flowCategory.setTenantId(tenantId);
         flowCategory.setTenantId(tenantId);
+        flowCategory.setCreateDept(null);
+        flowCategory.setCreateBy(null);
+        flowCategory.setCreateTime(null);
+        flowCategory.setUpdateBy(null);
+        flowCategory.setUpdateTime(null);
         flwCategoryMapper.insert(flowCategory);
         flwCategoryMapper.insert(flowCategory);
         List<Long> defIds = StreamUtils.toList(flowDefinitions, FlowDefinition::getId);
         List<Long> defIds = StreamUtils.toList(flowDefinitions, FlowDefinition::getId);
         List<FlowNode> flowNodes = flowNodeMapper.selectList(new LambdaQueryWrapper<FlowNode>().in(FlowNode::getDefinitionId, defIds));
         List<FlowNode> flowNodes = flowNodeMapper.selectList(new LambdaQueryWrapper<FlowNode>().in(FlowNode::getDefinitionId, defIds));