From 959486fed0e54e9025e3e6da32714f35960ab63a Mon Sep 17 00:00:00 2001 From: iqudoo Date: Thu, 16 Apr 2026 19:20:44 +0800 Subject: [PATCH] V1 --- README.md | 1 + ...-mybatis-generator-plugin-1.0-SNAPSHOT.jar | Bin 38186 -> 34878 bytes .../TapeRepositoryGeneratorPlugin.java | 633 ++++-------------- 3 files changed, 113 insertions(+), 521 deletions(-) diff --git a/README.md b/README.md index f2f8772..4df68da 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ + diff --git a/releases/tape-mybatis-generator-plugin-1.0-SNAPSHOT.jar b/releases/tape-mybatis-generator-plugin-1.0-SNAPSHOT.jar index 4f1d0afca859ec29d70bf2dc58a0e59c9ee02461..bc31d8f2788666199c2ad5e4130d7c032de1ff01 100644 GIT binary patch delta 12403 zcmZ9S1yCJN@aJ&?1b26L5AN>n?ykXMLm&`%_(OvPcjw_wa00@DU6O^3{3mX*FwFeZGI23p@Q4$yrLJGo> z!MhKfQz+&>d`IIcjWI}(1cDP*N0O!>$xoyx`MQvxY;K+u#f?poe;mAV7Vzmlsv19+ zhQe>-zN&rwIJ)_`@%Su&Wuv>?DWHuW`+fVy*?sFDC7q9YodLITZ-F`{Ke*r8&Y`K6 zSNvwwKEEfoF-TSsQ2tR+C!+(5pQ40Cxpz2fl+xm$(B;>an>)2Q$`-n4wAe^m)$(FS zbMD5VHiu*LD$6Py8iSR!?}!Ar(w>v|smJnzmZKb$r68?LLC!{2Jce^PD14Era#l*D zPYq#Jc^P^0_QEj&%O!Mn4fK{wF>?81=q@M&%g6a3yf2mwKgKDGKeqw2y*9n&^0hV^ zbCuF8tM#SJh3m>odHO6w;A?z+Z3g-c0hb^XdjkebO*1;(pu1-KPbd7jym)bgeNlIW zb?#mq^C9k~on2*&WQyq!lo0L*?!15v<(g5=c)~0-ir>>H>zZOjk4-cY>LI^r2Lg@+~wA>dPr|L-E>$h5{Ssaps znZlZf8|4s7TjXiqDue53PkugWPwiK3O|zQy%m%P~7xUF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}JO0p2Utf8R%F7DyI^j zpPBl)^WX|*dbpa`AGI-dn0KAj+qyZH>thL$0Tad^`xjUF)6>+KOFtTY+nZh0|1QRv zDt_G4j)3QHM`n~R&xxCecEN(0xbibhYuEP`yV^AE3X>(KQtsBky&c)epvpYyjtmoH zWcm4;5SR;ItrC4yDI2aH__Y|P7!S;RFRaKNMX;xX2J2{DNGEJP&xzAta;<)>-3 z`WM*A$n=e0qeX=I#_i}t)~}Ux|6|k;dE9yfw(8Raluu)C3Ds z>PbP-48LUdS8lRNOtb|~F)beql%I-~sQ6J7?{5kK2Jia-)U$IRH?G#BF`6+Wq zlmNpd|GZ9s!iN+j!$&v15y8hG_ya^+Z`1({a{^(fyu&p@TW{q7Os!hLPZ973YWy2U zgt{NJJzM!;KB*Ar0tj`Fv^|1(VC$mb4`k3QQdmZ$Y5{(K4O-|GODv<@zsBEgRM0D$ zSVr5*0e-Kz&?|S<&{~Jv1V#jot^t6bQpP)o{guM{foAS}x@gr<#4n$Cp6ie-sFk{>Shj#ee-)gLwa| zf3VU&S_Rvq{J%otr2Sx{PycbfpjAVS5rBau3W9+Nfc@`Q1o|bAga(fLS8Dt@2_^L3 zkdx{|2qBQQ|J(f^1v2sfgor~4A(CAFI|P@c9ZKpJa^MhHkpCs3{yQOhiai0@eh^?_WQbs3GXFa^up*F5RFYws=D&+;3nPSJ TjQwj$Cy|5`z}&_DC-MIPf8ADe diff --git a/src/main/java/com/iqudoo/framework/mybatis/TapeRepositoryGeneratorPlugin.java b/src/main/java/com/iqudoo/framework/mybatis/TapeRepositoryGeneratorPlugin.java index a615782..b8ea4bf 100644 --- a/src/main/java/com/iqudoo/framework/mybatis/TapeRepositoryGeneratorPlugin.java +++ b/src/main/java/com/iqudoo/framework/mybatis/TapeRepositoryGeneratorPlugin.java @@ -27,6 +27,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { private String changeLogContextClassPackage = "com.iqudoo.platform.application.domain.changeLog"; private String changeLogContextClassName = "ChangeLogContext"; private String changeLogEnable = "false"; + private String optimisticLockEnable = "false"; private String modelPackage = "com.iqudoo.platform.application.database.model"; private String mapperPackage = "com.iqudoo.platform.application.database.mapper"; private String targetProject = "src/main/java"; @@ -61,11 +62,23 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { changeLogContextClassPackage = stringConfig("changeLogContextClassPackage", changeLogContextClassPackage); changeLogContextClassName = stringConfig("changeLogContextClassName", changeLogContextClassName); changeLogEnable = stringConfig("changeLogEnable", changeLogEnable); + optimisticLockEnable = stringConfig("optimisticLockEnable", optimisticLockEnable); modelPackage = stringConfig("modelPackage", modelPackage); mapperPackage = stringConfig("mapperPackage", mapperPackage); targetProject = stringConfig("targetProject", targetProject); } + private boolean isOptimisticLockEnable() { + try { + boolean b = Boolean.parseBoolean(optimisticLockEnable); + if (b) { + return true; + } + } catch (Throwable ignored) { + } + return false; + } + private boolean isChangeLogEnable() { try { boolean b = Boolean.parseBoolean(changeLogEnable); @@ -153,30 +166,13 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { Interface repositoryInterface = new Interface(facadeRepositoryPackage + "." + interfaceName); repositoryInterface.setVisibility(JavaVisibility.PUBLIC); - // 添加必要的导入(仅保留model和example,移除ModelDataRepository) + // 添加必要的导入 repositoryInterface.addImportedType(new FullyQualifiedJavaType(modelPackage + "." + modelClassName)); repositoryInterface.addImportedType(new FullyQualifiedJavaType(modelPackage + "." + exampleClassName)); repositoryInterface.addImportedType(new FullyQualifiedJavaType("java.util.List")); + repositoryInterface.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.session.RowBounds")); - // 1. trashById - Method trashByIdMethod = new Method("trashById"); - trashByIdMethod.setVisibility(JavaVisibility.PUBLIC); - trashByIdMethod.setReturnType(new FullyQualifiedJavaType("int")); - trashByIdMethod.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "id")); - trashByIdMethod.addException(new FullyQualifiedJavaType("Throwable")); - trashByIdMethod.setAbstract(true); - repositoryInterface.addMethod(trashByIdMethod); - - // 2. trashAll - Method trashAllMethod = new Method("trashAll"); - trashAllMethod.setVisibility(JavaVisibility.PUBLIC); - trashAllMethod.setReturnType(new FullyQualifiedJavaType("int")); - trashAllMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - trashAllMethod.addException(new FullyQualifiedJavaType("Throwable")); - trashAllMethod.setAbstract(true); - repositoryInterface.addMethod(trashAllMethod); - - // 3. deleteById + // 1. deleteById Method deleteByIdMethod = new Method("deleteById"); deleteByIdMethod.setVisibility(JavaVisibility.PUBLIC); deleteByIdMethod.setReturnType(new FullyQualifiedJavaType("int")); @@ -186,7 +182,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { deleteByIdMethod.setAbstract(true); repositoryInterface.addMethod(deleteByIdMethod); - // 4. deleteAll + // 2. deleteAll Method deleteAllMethod = new Method("deleteAll"); deleteAllMethod.setVisibility(JavaVisibility.PUBLIC); deleteAllMethod.setReturnType(new FullyQualifiedJavaType("int")); @@ -196,124 +192,53 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { deleteAllMethod.setAbstract(true); repositoryInterface.addMethod(deleteAllMethod); - // 5. recoverById - Method recoverByIdMethod = new Method("recoverById"); - recoverByIdMethod.setVisibility(JavaVisibility.PUBLIC); - recoverByIdMethod.setReturnType(new FullyQualifiedJavaType("int")); - recoverByIdMethod.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "id")); - recoverByIdMethod.addException(new FullyQualifiedJavaType("Throwable")); - recoverByIdMethod.setAbstract(true); - repositoryInterface.addMethod(recoverByIdMethod); + // 3. findById + Method findByIdMethod = new Method("findById"); + findByIdMethod.setVisibility(JavaVisibility.PUBLIC); + findByIdMethod.setReturnType(new FullyQualifiedJavaType(modelClassName)); + findByIdMethod.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "id")); + findByIdMethod.addException(new FullyQualifiedJavaType("Throwable")); + findByIdMethod.setAbstract(true); + repositoryInterface.addMethod(findByIdMethod); - // 6. recoverAll - Method recoverAllMethod = new Method("recoverAll"); - recoverAllMethod.setVisibility(JavaVisibility.PUBLIC); - recoverAllMethod.setReturnType(new FullyQualifiedJavaType("int")); - recoverAllMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - recoverAllMethod.addException(new FullyQualifiedJavaType("Throwable")); - recoverAllMethod.setAbstract(true); - repositoryInterface.addMethod(recoverAllMethod); + // 4. findOne + Method findOneMethod = new Method("findOne"); + findOneMethod.setVisibility(JavaVisibility.PUBLIC); + findOneMethod.setReturnType(new FullyQualifiedJavaType(modelClassName)); + findOneMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); + findOneMethod.addException(new FullyQualifiedJavaType("Throwable")); + findOneMethod.setAbstract(true); + repositoryInterface.addMethod(findOneMethod); - // 7. findAnyById - Method findAnyByIdMethod = new Method("findAnyById"); - findAnyByIdMethod.setVisibility(JavaVisibility.PUBLIC); - findAnyByIdMethod.setReturnType(new FullyQualifiedJavaType(modelClassName)); - findAnyByIdMethod.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "id")); - findAnyByIdMethod.addException(new FullyQualifiedJavaType("Throwable")); - findAnyByIdMethod.setAbstract(true); - repositoryInterface.addMethod(findAnyByIdMethod); + // 5. list + Method listMethod = new Method("list"); + listMethod.setVisibility(JavaVisibility.PUBLIC); + listMethod.setReturnType(new FullyQualifiedJavaType("List<" + modelClassName + ">")); + listMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); + listMethod.addException(new FullyQualifiedJavaType("Throwable")); + listMethod.setAbstract(true); + repositoryInterface.addMethod(listMethod); - // 8. findValidById - Method findValidByIdMethod = new Method("findValidById"); - findValidByIdMethod.setVisibility(JavaVisibility.PUBLIC); - findValidByIdMethod.setReturnType(new FullyQualifiedJavaType(modelClassName)); - findValidByIdMethod.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "id")); - findValidByIdMethod.addException(new FullyQualifiedJavaType("Throwable")); - findValidByIdMethod.setAbstract(true); - repositoryInterface.addMethod(findValidByIdMethod); + // 5. list + Method listWithRowBoundsMethod = new Method("list"); + listWithRowBoundsMethod.setVisibility(JavaVisibility.PUBLIC); + listWithRowBoundsMethod.setReturnType(new FullyQualifiedJavaType("List<" + modelClassName + ">")); + listWithRowBoundsMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); + listWithRowBoundsMethod.addParameter(new Parameter(new FullyQualifiedJavaType("org.apache.ibatis.session.RowBounds"), "rowBounds")); + listWithRowBoundsMethod.addException(new FullyQualifiedJavaType("Throwable")); + listWithRowBoundsMethod.setAbstract(true); + repositoryInterface.addMethod(listWithRowBoundsMethod); - // 9. findTrashById - Method findTrashByIdMethod = new Method("findTrashById"); - findTrashByIdMethod.setVisibility(JavaVisibility.PUBLIC); - findTrashByIdMethod.setReturnType(new FullyQualifiedJavaType(modelClassName)); - findTrashByIdMethod.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "id")); - findTrashByIdMethod.addException(new FullyQualifiedJavaType("Throwable")); - findTrashByIdMethod.setAbstract(true); - repositoryInterface.addMethod(findTrashByIdMethod); + // 6. count + Method countMethod = new Method("count"); + countMethod.setVisibility(JavaVisibility.PUBLIC); + countMethod.setReturnType(new FullyQualifiedJavaType("long")); + countMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); + countMethod.addException(new FullyQualifiedJavaType("Throwable")); + countMethod.setAbstract(true); + repositoryInterface.addMethod(countMethod); - // 10. findValidOne - Method findValidOneMethod = new Method("findValidOne"); - findValidOneMethod.setVisibility(JavaVisibility.PUBLIC); - findValidOneMethod.setReturnType(new FullyQualifiedJavaType(modelClassName)); - findValidOneMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - findValidOneMethod.addException(new FullyQualifiedJavaType("Throwable")); - findValidOneMethod.setAbstract(true); - repositoryInterface.addMethod(findValidOneMethod); - - // 11. findTrashOne - Method findTrashOneMethod = new Method("findTrashOne"); - findTrashOneMethod.setVisibility(JavaVisibility.PUBLIC); - findTrashOneMethod.setReturnType(new FullyQualifiedJavaType(modelClassName)); - findTrashOneMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - findTrashOneMethod.addException(new FullyQualifiedJavaType("Throwable")); - findTrashOneMethod.setAbstract(true); - repositoryInterface.addMethod(findTrashOneMethod); - - // 12. getValidList - Method getValidListMethod = new Method("getValidList"); - getValidListMethod.setVisibility(JavaVisibility.PUBLIC); - getValidListMethod.setReturnType(new FullyQualifiedJavaType("List<" + modelClassName + ">")); - getValidListMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - getValidListMethod.addException(new FullyQualifiedJavaType("Throwable")); - getValidListMethod.setAbstract(true); - repositoryInterface.addMethod(getValidListMethod); - - // 13. getTrashList - Method getTrashListMethod = new Method("getTrashList"); - getTrashListMethod.setVisibility(JavaVisibility.PUBLIC); - getTrashListMethod.setReturnType(new FullyQualifiedJavaType("List<" + modelClassName + ">")); - getTrashListMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - getTrashListMethod.addException(new FullyQualifiedJavaType("Throwable")); - getTrashListMethod.setAbstract(true); - repositoryInterface.addMethod(getTrashListMethod); - - // 14. countByValid - Method countByValidMethod = new Method("countByValid"); - countByValidMethod.setVisibility(JavaVisibility.PUBLIC); - countByValidMethod.setReturnType(new FullyQualifiedJavaType("long")); - countByValidMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - countByValidMethod.addException(new FullyQualifiedJavaType("Throwable")); - countByValidMethod.setAbstract(true); - repositoryInterface.addMethod(countByValidMethod); - - // 15. countByValidWithPage - Method countByValidWithPageMethod = new Method("countByValidWithPage"); - countByValidWithPageMethod.setVisibility(JavaVisibility.PUBLIC); - countByValidWithPageMethod.setReturnType(new FullyQualifiedJavaType("long")); - countByValidWithPageMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - countByValidWithPageMethod.addException(new FullyQualifiedJavaType("Throwable")); - countByValidWithPageMethod.setAbstract(true); - repositoryInterface.addMethod(countByValidWithPageMethod); - - // 16. countByTrash - Method countByTrashMethod = new Method("countByTrash"); - countByTrashMethod.setVisibility(JavaVisibility.PUBLIC); - countByTrashMethod.setReturnType(new FullyQualifiedJavaType("long")); - countByTrashMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - countByTrashMethod.addException(new FullyQualifiedJavaType("Throwable")); - countByTrashMethod.setAbstract(true); - repositoryInterface.addMethod(countByTrashMethod); - - // 17. countByTrashWithPage - Method countByTrashWithPageMethod = new Method("countByTrashWithPage"); - countByTrashWithPageMethod.setVisibility(JavaVisibility.PUBLIC); - countByTrashWithPageMethod.setReturnType(new FullyQualifiedJavaType("long")); - countByTrashWithPageMethod.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - countByTrashWithPageMethod.addException(new FullyQualifiedJavaType("Throwable")); - countByTrashWithPageMethod.setAbstract(true); - repositoryInterface.addMethod(countByTrashWithPageMethod); - - // 18. insert + // 7. insert Method insertMethod = new Method("insert"); insertMethod.setVisibility(JavaVisibility.PUBLIC); insertMethod.setReturnType(new FullyQualifiedJavaType(modelClassName)); @@ -322,16 +247,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { insertMethod.setAbstract(true); repositoryInterface.addMethod(insertMethod); - // 19. batchInsert - Method batchInsertMethod = new Method("batchInsert"); - batchInsertMethod.setVisibility(JavaVisibility.PUBLIC); - batchInsertMethod.setReturnType(new FullyQualifiedJavaType("List<" + modelClassName + ">")); - batchInsertMethod.addParameter(new Parameter(new FullyQualifiedJavaType("List<" + modelClassName + ">"), "records")); - batchInsertMethod.addException(new FullyQualifiedJavaType("Throwable")); - batchInsertMethod.setAbstract(true); - repositoryInterface.addMethod(batchInsertMethod); - - // 20. update + // 8. update Method updateMethod = new Method("update"); updateMethod.setVisibility(JavaVisibility.PUBLIC); updateMethod.setReturnType(new FullyQualifiedJavaType("int")); @@ -340,7 +256,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { updateMethod.setAbstract(true); repositoryInterface.addMethod(updateMethod); - // 21. updateByExampleSelective + // 9. updateByExampleSelective Method updateByExampleSelectiveMethod = new Method("updateByExampleSelective"); updateByExampleSelectiveMethod.setVisibility(JavaVisibility.PUBLIC); updateByExampleSelectiveMethod.setReturnType(new FullyQualifiedJavaType("int")); @@ -390,27 +306,16 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { implClass.addField(mapperField); // 原有方法生成逻辑(无修改) - generateFindAnyByIdMethod(implClass, modelClassName, mapperFieldName, exampleClassName, hasBLOBColumns); - generateFindValidByIdMethod(implClass, modelClassName, mapperFieldName, exampleClassName, hasBLOBColumns); - generateFindTrashByIdMethod(implClass, modelClassName, mapperFieldName, exampleClassName, hasBLOBColumns); + generateFindByIdMethod(implClass, modelClassName, mapperFieldName, exampleClassName, hasBLOBColumns); + generateFindOneMethod(implClass, modelClassName, exampleClassName); generateInsertMethod(implClass, modelClassName, mapperFieldName, introspectedTable); - generateBatchInsertMethod(implClass, modelClassName, mapperFieldName, introspectedTable); generateUpdateMethod(implClass, modelClassName, exampleClassName, mapperFieldName, introspectedTable, hasBLOBColumns); generateUpdateByExampleSelectiveMethod(implClass, modelClassName, exampleClassName, mapperFieldName, introspectedTable, hasBLOBColumns); generateDeleteByIdMethod(implClass, modelClassName, mapperFieldName); generateDeleteAllMethod(implClass, modelClassName, exampleClassName, mapperFieldName); - generateTrashByIdMethod(implClass, modelClassName, mapperFieldName); - generateTrashAllMethod(implClass, modelClassName, exampleClassName, mapperFieldName); - generateRecoverByIdMethod(implClass, modelClassName, mapperFieldName); - generateRecoverAllMethod(implClass, modelClassName, exampleClassName, mapperFieldName); - generateFindValidOneMethod(implClass, modelClassName, exampleClassName); - generateFindTrashOneMethod(implClass, modelClassName, exampleClassName); - generateGetValidListMethod(implClass, modelClassName, exampleClassName, mapperFieldName, hasBLOBColumns); - generateGetTrashListMethod(implClass, modelClassName, exampleClassName, mapperFieldName, hasBLOBColumns); - generateCountByValidMethod(implClass, modelClassName, exampleClassName, mapperFieldName); - generateCountByValidWithPageMethod(implClass, modelClassName, exampleClassName, mapperFieldName); - generateCountByTrashMethod(implClass, modelClassName, exampleClassName, mapperFieldName); - generateCountByTrashWithPageMethod(implClass, modelClassName, exampleClassName, mapperFieldName); + generateListMethod(implClass, modelClassName, exampleClassName, mapperFieldName, hasBLOBColumns); + generateListWithRowBoundsMethod(implClass, modelClassName, exampleClassName, mapperFieldName, hasBLOBColumns); + generateCountMethod(implClass, modelClassName, exampleClassName, mapperFieldName); return implClass; } @@ -467,6 +372,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { implClass.addImportedType(new FullyQualifiedJavaType(modelPackage + "." + modelClassName)); implClass.addImportedType(new FullyQualifiedJavaType(modelPackage + "." + exampleClassName)); implClass.addImportedType(new FullyQualifiedJavaType(facadeRepositoryPackage + "." + interfaceName)); + implClass.addImportedType(new FullyQualifiedJavaType("org.apache.ibatis.session.RowBounds")); implClass.addImportedType(new FullyQualifiedJavaType("org.springframework.stereotype.Repository")); implClass.addImportedType(new FullyQualifiedJavaType("javax.annotation.Resource")); implClass.addImportedType(new FullyQualifiedJavaType("org.slf4j.Logger")); @@ -474,8 +380,8 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { implClass.addImportedType(new FullyQualifiedJavaType("java.util.*")); } - private void generateFindAnyByIdMethod(TopLevelClass implClass, String modelClassName, String mapperFieldName, String exampleClassName, boolean hasBLOBColumns) { - Method method = new Method("findAnyById"); + private void generateFindByIdMethod(TopLevelClass implClass, String modelClassName, String mapperFieldName, String exampleClassName, boolean hasBLOBColumns) { + Method method = new Method("findById"); method.addAnnotation("@Override"); method.setVisibility(JavaVisibility.PUBLIC); method.setReturnType(new FullyQualifiedJavaType(modelClassName)); @@ -499,54 +405,20 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { implClass.addMethod(method); } - private void generateFindValidByIdMethod(TopLevelClass implClass, String modelClassName, String mapperFieldName, String exampleClassName, boolean hasBLOBColumns) { - Method method = new Method("findValidById"); + private void generateFindOneMethod(TopLevelClass implClass, String modelClassName, String exampleClassName) { + Method method = new Method("findOne"); method.addAnnotation("@Override"); method.setVisibility(JavaVisibility.PUBLIC); method.setReturnType(new FullyQualifiedJavaType(modelClassName)); - method.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "guid")); + method.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); method.addException(new FullyQualifiedJavaType("Throwable")); - method.addBodyLine(modelClassName + " aDo = null;"); - method.addBodyLine(exampleClassName + " example"); - method.addBodyLine(" = new " + exampleClassName + "();"); - method.addBodyLine("example.createCriteria()"); - method.addBodyLine(" .andIsHiddenEqualTo(0)"); - method.addBodyLine(" .andIsDeleteEqualTo(0)"); - method.addBodyLine(" .andGuidEqualTo(guid);"); - String selectByExampleMethod = hasBLOBColumns ? "selectByExampleWithBLOBs" : "selectByExample"; - method.addBodyLine("List<" + modelClassName + "> recordList"); - method.addBodyLine(" = " + mapperFieldName + "." + selectByExampleMethod + "(example);"); - method.addBodyLine("if (recordList != null && !recordList.isEmpty()) {"); - method.addBodyLine("aDo = recordList.get(0);"); + method.addBodyLine("example.usePage(1, 1);"); + method.addBodyLine("List<" + modelClassName + "> dataList = list(example);"); + method.addBodyLine("if (dataList != null && !dataList.isEmpty()) {"); + method.addBodyLine("return dataList.get(0);"); method.addBodyLine("}"); - method.addBodyLine("return aDo;"); - - implClass.addMethod(method); - } - - private void generateFindTrashByIdMethod(TopLevelClass implClass, String modelClassName, String mapperFieldName, String exampleClassName, boolean hasBLOBColumns) { - Method method = new Method("findTrashById"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType(modelClassName)); - method.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "guid")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - method.addBodyLine(modelClassName + " aDo = null;"); - method.addBodyLine(exampleClassName + " example"); - method.addBodyLine(" = new " + exampleClassName + "();"); - method.addBodyLine("example.createCriteria()"); - method.addBodyLine(" .andIsHiddenEqualTo(1)"); - method.addBodyLine(" .andIsDeleteEqualTo(0)"); - method.addBodyLine(" .andGuidEqualTo(guid);"); - String selectByExampleMethod = hasBLOBColumns ? "selectByExampleWithBLOBs" : "selectByExample"; - method.addBodyLine("List<" + modelClassName + "> recordList"); - method.addBodyLine(" = " + mapperFieldName + "." + selectByExampleMethod + "(example);"); - method.addBodyLine("if (recordList != null && !recordList.isEmpty()) {"); - method.addBodyLine("aDo = recordList.get(0);"); - method.addBodyLine("}"); - method.addBodyLine("return aDo;"); + method.addBodyLine("return null;"); implClass.addMethod(method); } @@ -581,7 +453,6 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { } method.addBodyLine("aDo.setIsDelete(0);"); - method.addBodyLine("aDo.setIsHidden(0);"); method.addBodyLine("aDo.setDeleteToken(\"VALID\");"); method.addBodyLine("aDo.setDataVersion(1);"); method.addBodyLine("aDo.setCreateTime(new Date());"); @@ -604,63 +475,6 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { implClass.addMethod(method); } - private void generateBatchInsertMethod(TopLevelClass implClass, String modelClassName, String mapperFieldName, IntrospectedTable introspectedTable) { - Method method = new Method("batchInsert"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType("List<" + modelClassName + ">")); - method.addParameter(new Parameter(new FullyQualifiedJavaType("List<" + modelClassName + ">"), "records")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - method.addBodyLine("if (records == null || records.isEmpty()) {"); - method.addBodyLine("return new ArrayList<>();"); - method.addBodyLine("}"); - method.addBodyLine("List<" + modelClassName + "> batch = new ArrayList<>();"); - method.addBodyLine("for (" + modelClassName + " record : records) {"); - method.addBodyLine(modelClassName + " aDo = new " + modelClassName + "();"); - method.addBodyLine("if (record.getGuid() != null) {"); - method.addBodyLine("aDo.setGuid(record.getGuid());"); - method.addBodyLine("} else {"); - method.addBodyLine("Long guid = " + guidGeneratorCode + ";"); - method.addBodyLine("aDo.setGuid(guid);"); - method.addBodyLine("}"); - - for (IntrospectedColumn column : introspectedTable.getAllColumns()) { - String fieldName = column.getJavaProperty(); - String setterMethod = "set" + upperFirst(fieldName); - String getterMethod = "get" + upperFirst(fieldName); - if ("guid".equals(fieldName) || "isDelete".equals(fieldName) || "isHidden".equals(fieldName) - || "deleteToken".equals(fieldName) || "dataVersion".equals(fieldName) - || "createTime".equals(fieldName) || "updateTime".equals(fieldName)) { - continue; - } - method.addBodyLine("aDo." + setterMethod + "(record." + getterMethod + "());"); - } - - method.addBodyLine("aDo.setIsDelete(0);"); - method.addBodyLine("aDo.setIsHidden(0);"); - method.addBodyLine("aDo.setDeleteToken(\"VALID\");"); - method.addBodyLine("aDo.setDataVersion(1);"); - method.addBodyLine("aDo.setCreateTime(new Date());"); - method.addBodyLine("aDo.setUpdateTime(new Date());"); - method.addBodyLine("batch.add(aDo);"); - method.addBodyLine("}"); - - method.addBodyLine("int count = " + mapperFieldName + ".batchInsert(batch);"); - method.addBodyLine("if (count == batch.size()) {"); - if (isChangeLogEnable()) { - method.addBodyLine("for (" + modelClassName + " aDo : batch) {"); - method.addBodyLine(changeLogContextClassName + ".addLog(\"" + modelClassName + "\","); - method.addBodyLine(" \"batchInsert\", aDo.getGuid(), new HashMap<>());"); - method.addBodyLine("}"); - } - method.addBodyLine("return batch;"); - method.addBodyLine("}"); - method.addBodyLine("throw new Throwable(\"Batch insert failed, " + modelClassName + " affected: \" + count + \", expected: \" + batch.size());"); - - implClass.addMethod(method); - } - private void generateUpdateMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, String mapperFieldName, IntrospectedTable introspectedTable, boolean hasBLOBColumns) { Method method = new Method("update"); @@ -697,13 +511,19 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { method.addBodyLine("}"); } method.addBodyLine(exampleClassName + " updateWhere = new " + exampleClassName + "();"); - method.addBodyLine("Integer lockDataVersion = record.getDataVersion();"); - method.addBodyLine("if (lockDataVersion == null) {"); - method.addBodyLine("lockDataVersion = aDo.getDataVersion();"); - method.addBodyLine("}"); - method.addBodyLine("updateWhere.createCriteria()"); - method.addBodyLine(" .andGuidEqualTo(aDo.getGuid())"); - method.addBodyLine(" .andDataVersionEqualTo(lockDataVersion);"); + if (isOptimisticLockEnable()) { + method.addBodyLine("Integer lockDataVersion = record.getDataVersion();"); + method.addBodyLine("if (lockDataVersion == null) {"); + method.addBodyLine("lockDataVersion = aDo.getDataVersion();"); + method.addBodyLine("}"); + method.addBodyLine("updateWhere.createCriteria()"); + method.addBodyLine(" .andGuidEqualTo(aDo.getGuid())"); + method.addBodyLine(" .andDataVersionEqualTo(lockDataVersion);"); + } else { + // 不使用乐观锁更新数据 + method.addBodyLine("updateWhere.createCriteria()"); + method.addBodyLine(" .andGuidEqualTo(aDo.getGuid());"); + } method.addBodyLine("aDo.setDataVersion(aDo.getDataVersion() + 1);"); method.addBodyLine("aDo.setUpdateTime(new Date());"); method.addBodyLine("// update data version"); @@ -735,7 +555,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { // 方法体 method.addBodyLine("for (" + exampleClassName + ".Criteria criteria : example.getOredCriteria()) {"); - method.addBodyLine("criteria.andIsDeleteEqualTo(0).andIsHiddenEqualTo(0);"); + method.addBodyLine("criteria.andIsDeleteEqualTo(0);"); method.addBodyLine("}"); method.addBodyLine("List guidList = " + mapperFieldName); @@ -746,7 +566,6 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { method.addBodyLine("example = new " + exampleClassName + "();"); method.addBodyLine("example.createCriteria()"); method.addBodyLine(" .andIsDeleteEqualTo(0)"); - method.addBodyLine(" .andIsHiddenEqualTo(0)"); method.addBodyLine(" .andGuidIn(guidList);"); if (isChangeLogEnable()) { String selectByExampleMethod = hasBLOBColumns ? "selectByExampleWithBLOBs" : "selectByExample"; @@ -775,7 +594,6 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { method.addBodyLine("record.setDataVersion(100);"); method.addBodyLine("// It is not supported to directly modify the following columns"); method.addBodyLine("record.setUpdateTime(new Date());"); - method.addBodyLine("record.setIsHidden(null);"); method.addBodyLine("record.setIsDelete(null);"); method.addBodyLine("record.setDeleteToken(null);"); method.addBodyLine("record.setCreateTime(null);"); @@ -804,7 +622,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { method.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "id")); method.addParameter(new Parameter(new FullyQualifiedJavaType("boolean"), "release")); method.addException(new FullyQualifiedJavaType("Throwable")); - method.addBodyLine(modelClassName + " aDo = findValidById(id);"); + method.addBodyLine(modelClassName + " aDo = findById(id);"); method.addBodyLine("if (aDo == null) {"); method.addBodyLine("return 0;"); method.addBodyLine("}"); @@ -824,65 +642,6 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { implClass.addMethod(method); } - private void generateTrashByIdMethod(TopLevelClass implClass, String modelClassName, String mapperFieldName) { - Method method = new Method("trashById"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType("int")); - method.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "id")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - method.addBodyLine(modelClassName + " aDo = findValidById(id);"); - method.addBodyLine("if (aDo == null) {"); - method.addBodyLine("return 0;"); - method.addBodyLine("}"); - method.addBodyLine("aDo.setIsHidden(1);"); - method.addBodyLine("aDo.setDeleteToken(aDo.getGuid() + \"\");"); - method.addBodyLine("aDo.setUpdateTime(new Date());"); - if (isChangeLogEnable()) { - method.addBodyLine("int update = " + mapperFieldName + ".updateByPrimaryKey(aDo);"); - method.addBodyLine("if (update > 0) {"); - method.addBodyLine(changeLogContextClassName + ".addLog(\"" + modelClassName + "\","); - method.addBodyLine(" \"trashById\", aDo.getGuid(), new HashMap<>());"); - method.addBodyLine("}"); - method.addBodyLine("return update;"); - } else { - method.addBodyLine("return " + mapperFieldName + ".updateByPrimaryKey(aDo);"); - } - implClass.addMethod(method); - } - - private void generateRecoverByIdMethod(TopLevelClass implClass, String modelClassName, String mapperFieldName) { - Method method = new Method("recoverById"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType("int")); - method.addParameter(new Parameter(new FullyQualifiedJavaType("long"), "id")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - method.addBodyLine(modelClassName + " aDo = findTrashById(id);"); - method.addBodyLine("if (aDo == null) {"); - method.addBodyLine("return 0;"); - method.addBodyLine("}"); - method.addBodyLine("if (aDo.getIsDelete() == 1) {"); - method.addBodyLine("return 0;"); - method.addBodyLine("}"); - method.addBodyLine("aDo.setIsHidden(0);"); - method.addBodyLine("aDo.setDeleteToken(\"VALID\");"); - method.addBodyLine("aDo.setUpdateTime(new Date());"); - if (isChangeLogEnable()) { - method.addBodyLine("int update = " + mapperFieldName + ".updateByPrimaryKey(aDo);"); - method.addBodyLine("if (update > 0) {"); - method.addBodyLine(changeLogContextClassName + ".addLog(\"" + modelClassName + "\","); - method.addBodyLine(" \"recoverById\", aDo.getGuid(), new HashMap<>());"); - method.addBodyLine("}"); - method.addBodyLine("return update;"); - } else { - method.addBodyLine("return " + mapperFieldName + ".updateByPrimaryKey(aDo);"); - } - implClass.addMethod(method); - } - private void generateDeleteAllMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, String mapperFieldName) { Method method = new Method("deleteAll"); method.addAnnotation("@Override"); @@ -897,7 +656,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { method.addBodyLine("return " + mapperFieldName + ".deleteByExample(example);"); method.addBodyLine("}"); method.addBodyLine("for (" + exampleClassName + ".Criteria criteria : example.getOredCriteria()) {"); - method.addBodyLine("criteria.andIsDeleteEqualTo(0).andIsHiddenEqualTo(1);"); + method.addBodyLine("criteria.andIsDeleteEqualTo(0);"); method.addBodyLine("}"); method.addBodyLine("List guidList = " + mapperFieldName + ".selectPrimaryKeyByExample(example);"); method.addBodyLine("if (guidList.isEmpty()) {"); @@ -921,116 +680,9 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { implClass.addMethod(method); } - private void generateTrashAllMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, String mapperFieldName) { - Method method = new Method("trashAll"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType("int")); - method.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - // 方法体 - method.addBodyLine("for (" + exampleClassName + ".Criteria criteria : example.getOredCriteria()) {"); - method.addBodyLine("criteria.andIsDeleteEqualTo(0).andIsHiddenEqualTo(0);"); - method.addBodyLine("}"); - method.addBodyLine("List guidList = " + mapperFieldName + ".selectPrimaryKeyByExample(example);"); - method.addBodyLine("if (guidList.isEmpty()) {"); - method.addBodyLine("return 0;"); - method.addBodyLine("}"); - method.addBodyLine(modelClassName + " " + lowerFirst(modelClassName) + " = new " + modelClassName + "();"); - method.addBodyLine(lowerFirst(modelClassName) + ".setIsHidden(1);"); - method.addBodyLine(lowerFirst(modelClassName) + ".setDeleteToken(" + guidGeneratorCode + " + \"\");"); - method.addBodyLine(lowerFirst(modelClassName) + ".setUpdateTime(new Date());"); - if (isChangeLogEnable()) { - method.addBodyLine("int update = " + mapperFieldName + ".updateByExampleSelective(" + lowerFirst(modelClassName) + ", example);"); - method.addBodyLine("if (update > 0) {"); - method.addBodyLine("for (Long guid : guidList) {"); - method.addBodyLine(changeLogContextClassName + ".addLog(\"" + modelClassName + "\","); - method.addBodyLine(" \"trashAll\", guid, new HashMap<>());"); - method.addBodyLine("}"); - method.addBodyLine("}"); - method.addBodyLine("return update;"); - } else { - method.addBodyLine("return " + mapperFieldName + ".updateByExampleSelective(" + lowerFirst(modelClassName) + ", example);"); - } - implClass.addMethod(method); - } - - private void generateRecoverAllMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, String mapperFieldName) { - Method method = new Method("recoverAll"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType("int")); - method.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - // 方法体 - method.addBodyLine("for (" + exampleClassName + ".Criteria criteria : example.getOredCriteria()) {"); - method.addBodyLine("criteria.andIsDeleteEqualTo(0).andIsHiddenEqualTo(1);"); - method.addBodyLine("}"); - method.addBodyLine("List guidList = " + mapperFieldName + ".selectPrimaryKeyByExample(example);"); - method.addBodyLine("if (guidList.isEmpty()) {"); - method.addBodyLine("return 0;"); - method.addBodyLine("}"); - method.addBodyLine(modelClassName + " " + lowerFirst(modelClassName) + " = new " + modelClassName + "();"); - method.addBodyLine(lowerFirst(modelClassName) + ".setIsHidden(0);"); - method.addBodyLine(lowerFirst(modelClassName) + ".setDeleteToken(\"VALID\");"); - method.addBodyLine(lowerFirst(modelClassName) + ".setUpdateTime(new Date());"); - if (isChangeLogEnable()) { - method.addBodyLine("int update = " + mapperFieldName + ".updateByExampleSelective(" + lowerFirst(modelClassName) + ", example);"); - method.addBodyLine("if (update > 0) {"); - method.addBodyLine("for (Long guid : guidList) {"); - method.addBodyLine(changeLogContextClassName + ".addLog(\"" + modelClassName + "\","); - method.addBodyLine(" \"recoverAll\", guid, new HashMap<>());"); - method.addBodyLine("}"); - method.addBodyLine("}"); - method.addBodyLine("return update;"); - } else { - method.addBodyLine("return " + mapperFieldName + ".updateByExampleSelective(" + lowerFirst(modelClassName) + ", example);"); - } - - implClass.addMethod(method); - } - - private void generateFindValidOneMethod(TopLevelClass implClass, String modelClassName, String exampleClassName) { - Method method = new Method("findValidOne"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType(modelClassName)); - method.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - method.addBodyLine("example.usePage(1, 1);"); - method.addBodyLine("List<" + modelClassName + "> dataList = getValidList(example);"); - method.addBodyLine("if (dataList != null && !dataList.isEmpty()) {"); - method.addBodyLine("return dataList.get(0);"); - method.addBodyLine("}"); - method.addBodyLine("return null;"); - - implClass.addMethod(method); - } - - private void generateFindTrashOneMethod(TopLevelClass implClass, String modelClassName, String exampleClassName) { - Method method = new Method("findTrashOne"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType(modelClassName)); - method.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - method.addBodyLine("example.usePage(1, 1);"); - method.addBodyLine("List<" + modelClassName + "> dataList = getTrashList(example);"); - method.addBodyLine("if (dataList != null && !dataList.isEmpty()) {"); - method.addBodyLine("return dataList.get(0);"); - method.addBodyLine("}"); - method.addBodyLine("return null;"); - - implClass.addMethod(method); - } - - private void generateGetValidListMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, - String mapperFieldName, boolean hasBLOBColumns) { - Method method = new Method("getValidList"); + private void generateListMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, + String mapperFieldName, boolean hasBLOBColumns) { + Method method = new Method("list"); method.addAnnotation("@Override"); method.setVisibility(JavaVisibility.PUBLIC); method.setReturnType(new FullyQualifiedJavaType("List<" + modelClassName + ">")); @@ -1038,7 +690,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { method.addException(new FullyQualifiedJavaType("Throwable")); method.addBodyLine("for (" + exampleClassName + ".Criteria criteria : example.getOredCriteria()) {"); - method.addBodyLine("criteria.andIsDeleteEqualTo(0).andIsHiddenEqualTo(0);"); + method.addBodyLine("criteria.andIsDeleteEqualTo(0);"); method.addBodyLine("}"); method.addBodyLine("List<" + modelClassName + "> result = null;"); method.addBodyLine("long startTime = new Date().getTime();"); @@ -1105,17 +757,23 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { implClass.addMethod(method); } - private void generateGetTrashListMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, - String mapperFieldName, boolean hasBLOBColumns) { - Method method = new Method("getTrashList"); + private void generateListWithRowBoundsMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, + String mapperFieldName, boolean hasBLOBColumns) { + Method method = new Method("list"); method.addAnnotation("@Override"); method.setVisibility(JavaVisibility.PUBLIC); method.setReturnType(new FullyQualifiedJavaType("List<" + modelClassName + ">")); method.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); + method.addParameter(new Parameter(new FullyQualifiedJavaType("org.apache.ibatis.session.RowBounds"), "rowBounds")); method.addException(new FullyQualifiedJavaType("Throwable")); + method.addBodyLine("// 兼容原来的写法rowBounds"); + method.addBodyLine("if (rowBounds != null) {"); + method.addBodyLine("example.limit(rowBounds.getOffset(), rowBounds.getLimit())"); + method.addBodyLine("}"); + method.addBodyLine("for (" + exampleClassName + ".Criteria criteria : example.getOredCriteria()) {"); - method.addBodyLine("criteria.andIsDeleteEqualTo(0).andIsHiddenEqualTo(1);"); + method.addBodyLine("criteria.andIsDeleteEqualTo(0);"); method.addBodyLine("}"); method.addBodyLine("List<" + modelClassName + "> result = null;"); method.addBodyLine("long startTime = new Date().getTime();"); @@ -1137,7 +795,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { method.addBodyLine("if (example.getLimitString() != null) {"); method.addBodyLine("exampleString += \"\\n\\t|-> limit: \" + example.getLimitString();"); method.addBodyLine("}"); - method.addBodyLine("LOGGER." + slowQueryLoggerLevel + "(\"[SQL] select " + modelClassName + " trash list primary key use long time\" +"); + method.addBodyLine("LOGGER." + slowQueryLoggerLevel + "(\"[SQL] select " + modelClassName + " valid list primary key use long time\" +"); method.addBodyLine(" \"\\n\\t|-> use time:\" + findPrimaryKeyTime + \"ms\" +"); method.addBodyLine(" exampleString +"); method.addBodyLine(" \"\\n\\t|-----------------------------------\""); @@ -1172,7 +830,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { method.addBodyLine("if (example.getLimitString() != null) {"); method.addBodyLine("exampleString += \"\\n\\t|-> limit: \" + example.getLimitString();"); method.addBodyLine("}"); - method.addBodyLine("LOGGER." + slowQueryLoggerLevel + "(\"[SQL] select " + modelClassName + " trash list use long time\" +"); + method.addBodyLine("LOGGER." + slowQueryLoggerLevel + "(\"[SQL] select " + modelClassName + " valid list use long time\" +"); method.addBodyLine(" \"\\n\\t|-> use time:\" + useTime + \"ms\" +"); method.addBodyLine(" exampleString +"); method.addBodyLine(" \"\\n\\t|-----------------------------------\""); @@ -1182,8 +840,8 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { implClass.addMethod(method); } - private void generateCountByValidMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, String mapperFieldName) { - Method method = new Method("countByValid"); + private void generateCountMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, String mapperFieldName) { + Method method = new Method("count"); method.addAnnotation("@Override"); method.setVisibility(JavaVisibility.PUBLIC); method.setReturnType(new FullyQualifiedJavaType("long")); @@ -1191,7 +849,7 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { method.addException(new FullyQualifiedJavaType("Throwable")); method.addBodyLine("for (" + exampleClassName + ".Criteria criteria : example.getOredCriteria()) {"); - method.addBodyLine("criteria.andIsDeleteEqualTo(0).andIsHiddenEqualTo(0);"); + method.addBodyLine("criteria.andIsDeleteEqualTo(0);"); method.addBodyLine("}"); method.addBodyLine("long startTime = new Date().getTime();"); method.addBodyLine("long count = " + mapperFieldName + ".countByExample(example);"); @@ -1215,73 +873,6 @@ public class TapeRepositoryGeneratorPlugin extends PluginAdapter { implClass.addMethod(method); } - private void generateCountByValidWithPageMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, String mapperFieldName) { - Method method = new Method("countByValidWithPage"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType("long")); - method.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - method.addBodyLine("// When not paginated, the count query returns 0 to avoid unnecessary queries"); - method.addBodyLine("if (example.getRows() != null && example.getOffset() != null) {"); - method.addBodyLine("return countByValid(example);"); - method.addBodyLine("}"); - method.addBodyLine("return 0L;"); - - implClass.addMethod(method); - } - - private void generateCountByTrashMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, String mapperFieldName) { - Method method = new Method("countByTrash"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType("long")); - method.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - method.addBodyLine("for (" + exampleClassName + ".Criteria criteria : example.getOredCriteria()) {"); - method.addBodyLine("criteria.andIsDeleteEqualTo(0).andIsHiddenEqualTo(1);"); - method.addBodyLine("}"); - method.addBodyLine("long startTime = new Date().getTime();"); - method.addBodyLine("long count = " + mapperFieldName + ".countByExample(example);"); - method.addBodyLine("long useTime = new Date().getTime() - startTime;"); - method.addBodyLine("if (useTime > " + slowQueryLoggerTime + ") {"); - method.addBodyLine("String exampleString = \"\";"); - method.addBodyLine("if (example.getWhereString() != null) {"); - method.addBodyLine("exampleString += \"\\n\\t|-> where: \" + example.getWhereString();"); - method.addBodyLine("}"); - method.addBodyLine("if (example.getOrderByClause() != null) {"); - method.addBodyLine("exampleString += \"\\n\\t|-> order by: \" + example.getOrderByClause();"); - method.addBodyLine("}"); - method.addBodyLine("LOGGER." + slowQueryLoggerLevel + "(\"[SQL] select " + modelClassName + " trash count use long time\" +"); - method.addBodyLine(" \"\\n\\t|-> use time:\" + useTime + \"ms\" +"); - method.addBodyLine(" exampleString +"); - method.addBodyLine(" \"\\n\\t|-----------------------------------\""); - method.addBodyLine(");"); - method.addBodyLine("}"); - method.addBodyLine("return count;"); - - implClass.addMethod(method); - } - - private void generateCountByTrashWithPageMethod(TopLevelClass implClass, String modelClassName, String exampleClassName, String mapperFieldName) { - Method method = new Method("countByTrashWithPage"); - method.addAnnotation("@Override"); - method.setVisibility(JavaVisibility.PUBLIC); - method.setReturnType(new FullyQualifiedJavaType("long")); - method.addParameter(new Parameter(new FullyQualifiedJavaType(exampleClassName), "example")); - method.addException(new FullyQualifiedJavaType("Throwable")); - - method.addBodyLine("// When not paginated, the count query returns 0 to avoid unnecessary queries"); - method.addBodyLine("if (example.getRows() != null && example.getOffset() != null) {"); - method.addBodyLine("return countByTrash(example);"); - method.addBodyLine("}"); - method.addBodyLine("return 0L;"); - - implClass.addMethod(method); - } - private String upperFirst(String str) { if (str == null || str.isEmpty()) { return str;