浏览代码

mybatis plus,生成po逻辑调整

lin.liu 3 周之前
父节点
当前提交
bf41f9f2ef
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      secure-producting-host/src/test/java/com/customs/cq/datacenter/host/GenCodeRun.java

+ 7 - 6
secure-producting-host/src/test/java/com/customs/cq/datacenter/host/GenCodeRun.java

@@ -379,12 +379,13 @@ public class GenCodeRun {
             listColumn.add(SET_PRO_DESC_TPL.replaceAll("\\{\\#\\=desc\\}", desc));
 
             if (Objects.equals(isPK, 1)) {
-                listColumn.add("\t@TableId");
-                if (Objects.equals(isIdentity, 1)) {
-                    listColumn.add("(type = IdType.AUTO)");
-                } else {
-                    listColumn.add("(type = IdType.ASSIGN_ID)");
-                }
+                String idStr = "\t@TableId";
+//                if (Objects.equals(isIdentity, 1)) {
+//                    idStr += "(type = IdType.AUTO)";
+//                } else {
+//                    idStr += "(type = IdType.ASSIGN_ID)";
+//                }
+                listColumn.add(idStr);
             }
             if ("is_delete".equalsIgnoreCase(name)) {
                 String columnAnnotation = "\t@TableLogic";