소스 검색

fix adm 数据迁移 新增sql脚本 方式 info 脚本处理

lvxianyun 2 년 전
부모
커밋
8741df7c43

+ 2 - 2
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/DefineInfoMigration.java

@@ -156,7 +156,7 @@ public class DefineInfoMigration extends MigrationAbstractServiceImpl<ObjectInfo
             sqls.append("'").append(infoDefine.getCategory()).append("',");
             sqls.append("'").append(infoDefine.getFirstTag()).append("',");
             if (infoDefine.getSecondTag() == null) {
-                infoDefine.getSecondTag();
+                sqls.append(infoDefine.getSecondTag()).append(",");
             } else {
                 sqls.append("'").append(infoDefine.getSecondTag()).append("',");
             }
@@ -196,7 +196,7 @@ public class DefineInfoMigration extends MigrationAbstractServiceImpl<ObjectInfo
             sqls.append(infoDefine.getShowOrder()).append(",");
 
             if (infoDefine.getVersion() == null) {
-                infoDefine.getVersion();
+                sqls.append(infoDefine.getVersion()).append(",");
             } else {
                 sqls.append("'").append(infoDefine.getVersion()).append("',");
             }

+ 15 - 3
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/ObjectRelationMigration.java

@@ -233,14 +233,26 @@ public class ObjectRelationMigration extends MigrationAbstractServiceImpl<Object
                 sqls.append("'").append(relation.getGraphId()).append("',");
             }
             sqls.append("'").append(relation.getGraphCode()).append("',");
-            sqls.append("'").append(relation.getRelCode()).append("',");;
+            sqls.append("'").append(relation.getRelCode()).append("',");
+
             if (relation.getRelValue() == null) {
                 sqls.append(relation.getRelValue()).append(",");
             } else {
                 sqls.append("'").append(relation.getRelValue()).append("',");
             }
-            sqls.append("'").append(relation.getObjFrom()).append("',");
-            sqls.append("'").append(relation.getObjTo()).append("',");
+
+            if (relation.getObjFrom() == null) {
+                sqls.append(relation.getObjFrom()).append(",");
+            } else {
+                sqls.append("'").append(relation.getObjFrom()).append("',");
+            }
+
+            if (relation.getObjTo() == null) {
+                sqls.append(relation.getObjTo()).append(",");
+            } else {
+                sqls.append("'").append(relation.getObjTo()).append("',");
+            }
+
             if (relation.getCreateApp() == null) {
                 sqls.append(relation.getCreateApp()).append(",");
             } else {