소스 검색

优化代码

java110 4 년 전
부모
커밋
3e349298e6
100개의 변경된 파일0개의 추가작업 그리고 29157개의 파일을 삭제
  1. BIN
      java110-generator/.DS_Store
  2. 0 188
      java110-generator/pom.xml
  3. 0 394
      java110-generator/src/main/java/com/java110/code/DealHtml.java
  4. 0 113
      java110-generator/src/main/java/com/java110/code/DealPrintVc18nNameHtml.java
  5. 0 97
      java110-generator/src/main/java/com/java110/code/DealSelectHtml.java
  6. 0 76
      java110-generator/src/main/java/com/java110/code/DealVc18nAddSpanHtml.java
  7. 0 85
      java110-generator/src/main/java/com/java110/code/GeneratorServiceApplicationStart.java
  8. 0 96
      java110-generator/src/main/java/com/java110/code/TableToJson.java
  9. 0 105
      java110-generator/src/main/java/com/java110/code/TableToJsonWeb.java
  10. 0 81
      java110-generator/src/main/java/com/java110/code/back/BackCoderGeneratorStart.java
  11. 0 117
      java110-generator/src/main/java/com/java110/code/back/BaseGenerator.java
  12. 0 190
      java110-generator/src/main/java/com/java110/code/back/Data.java
  13. 0 49
      java110-generator/src/main/java/com/java110/code/back/GeneratorAbstractBussiness.java
  14. 0 187
      java110-generator/src/main/java/com/java110/code/back/GeneratorApiListener.java
  15. 0 70
      java110-generator/src/main/java/com/java110/code/back/GeneratorDeleteInfoListener.java
  16. 0 77
      java110-generator/src/main/java/com/java110/code/back/GeneratorDtoBean.java
  17. 0 33
      java110-generator/src/main/java/com/java110/code/back/GeneratorIInnerServiceSMO.java
  18. 0 34
      java110-generator/src/main/java/com/java110/code/back/GeneratorIServiceDaoListener.java
  19. 0 34
      java110-generator/src/main/java/com/java110/code/back/GeneratorInnerServiceSMOImpl.java
  20. 0 81
      java110-generator/src/main/java/com/java110/code/back/GeneratorSaveInfoListener.java
  21. 0 31
      java110-generator/src/main/java/com/java110/code/back/GeneratorServiceDaoImplListener.java
  22. 0 236
      java110-generator/src/main/java/com/java110/code/back/GeneratorServiceDaoImplMapperListener.java
  23. 0 75
      java110-generator/src/main/java/com/java110/code/back/GeneratorUpdateInfoListener.java
  24. 0 9711
      java110-generator/src/main/java/com/java110/code/cnJson.json
  25. 0 9709
      java110-generator/src/main/java/com/java110/code/enJson.json
  26. 0 460
      java110-generator/src/main/java/com/java110/code/relationship/GeneratorBindingComponent.java
  27. 0 45
      java110-generator/src/main/java/com/java110/code/relationship/GeneratorFlow.java
  28. 0 29
      java110-generator/src/main/java/com/java110/code/relationship/GeneratorRelationShipStart.java
  29. 0 81
      java110-generator/src/main/java/com/java110/code/translate.java
  30. 0 456
      java110-generator/src/main/java/com/java110/code/util/FileUtilBase.java
  31. 0 134
      java110-generator/src/main/java/com/java110/code/util/UnicodeReader.java
  32. 0 286
      java110-generator/src/main/java/com/java110/code/web/GeneratorAddComponent.java
  33. 0 114
      java110-generator/src/main/java/com/java110/code/web/GeneratorChooseComponent.java
  34. 0 172
      java110-generator/src/main/java/com/java110/code/web/GeneratorDeleteComponent.java
  35. 0 276
      java110-generator/src/main/java/com/java110/code/web/GeneratorEditComponent.java
  36. 0 367
      java110-generator/src/main/java/com/java110/code/web/GeneratorManagerComponent.java
  37. 0 38
      java110-generator/src/main/java/com/java110/code/web/GeneratorStart.java
  38. 0 112
      java110-generator/src/main/java/com/java110/code/web/GeneratorViewComponent.java
  39. 0 77
      java110-generator/src/main/resources/AbstractBusinessServiceDataFlowListener.java
  40. 0 155
      java110-generator/src/main/resources/DeleteStoreInfoListener.java
  41. 0 141
      java110-generator/src/main/resources/SaveInfoListener.java
  42. 0 166
      java110-generator/src/main/resources/UpdateInfoListener.java
  43. 0 64
      java110-generator/src/main/resources/application-dev.yml
  44. 0 3
      java110-generator/src/main/resources/application.yml
  45. 0 31
      java110-generator/src/main/resources/back/template_1.json
  46. 0 42
      java110-generator/src/main/resources/back/template_activitiesType.json
  47. 0 79
      java110-generator/src/main/resources/dao/IServiceDao.java
  48. 0 143
      java110-generator/src/main/resources/dao/ServiceDaoImpl.java
  49. 0 90
      java110-generator/src/main/resources/dao/ServiceDaoImplMapper.xml
  50. 0 125
      java110-generator/src/main/resources/dataSource.yml
  51. 0 3
      java110-generator/src/main/resources/java110.properties
  52. 0 0
      java110-generator/src/main/resources/listener/hello.java
  53. 0 69
      java110-generator/src/main/resources/newTemplate/DeleteCmd.txt
  54. 0 68
      java110-generator/src/main/resources/newTemplate/IInnerServiceSMO.txt
  55. 0 77
      java110-generator/src/main/resources/newTemplate/IServiceDao.txt
  56. 0 89
      java110-generator/src/main/resources/newTemplate/InnerServiceSMOImpl.txt
  57. 0 84
      java110-generator/src/main/resources/newTemplate/ListCmd.txt
  58. 0 33
      java110-generator/src/main/resources/newTemplate/Po.txt
  59. 0 74
      java110-generator/src/main/resources/newTemplate/SaveCmd.txt
  60. 0 46
      java110-generator/src/main/resources/newTemplate/ServiceCodeConstant.txt
  61. 0 112
      java110-generator/src/main/resources/newTemplate/ServiceDaoImpl.txt
  62. 0 37
      java110-generator/src/main/resources/newTemplate/ServiceDaoImplMapper.txt
  63. 0 73
      java110-generator/src/main/resources/newTemplate/UpdateCmd.txt
  64. 0 56
      java110-generator/src/main/resources/newTemplate/dto.txt
  65. 0 16
      java110-generator/src/main/resources/relationship/add/add.html
  66. 0 49
      java110-generator/src/main/resources/relationship/add/add.js
  67. 0 34
      java110-generator/src/main/resources/relationship/binding/BindingComponent.java
  68. 0 110
      java110-generator/src/main/resources/relationship/binding/BindingListener.java
  69. 0 60
      java110-generator/src/main/resources/relationship/binding/BindingSMOImpl.java
  70. 0 18
      java110-generator/src/main/resources/relationship/binding/IBindingSMO.java
  71. 0 20
      java110-generator/src/main/resources/relationship/binding/binding.html
  72. 0 83
      java110-generator/src/main/resources/relationship/binding/binding.js
  73. 0 16
      java110-generator/src/main/resources/relationship/constant/ServiceCodeConstant.java
  74. 0 38
      java110-generator/src/main/resources/relationship/flow.html
  75. 0 100
      java110-generator/src/main/resources/relationship/template_1.json
  76. 0 110
      java110-generator/src/main/resources/relationship/template_addAuditUserStep.json
  77. 0 101
      java110-generator/src/main/resources/relationship/template_complaint.json
  78. 0 159
      java110-generator/src/main/resources/relationship/template_configMenu.json
  79. 0 148
      java110-generator/src/main/resources/relationship/template_devService.json
  80. 0 92
      java110-generator/src/main/resources/relationship/template_menu.json
  81. 0 115
      java110-generator/src/main/resources/relationship/template_owner.json
  82. 0 41
      java110-generator/src/main/resources/relationship/template_repairDispatchStep.json
  83. 0 142
      java110-generator/src/main/resources/relationship/template_room.json
  84. 0 92
      java110-generator/src/main/resources/relationship/template_service_binding.json
  85. 0 115
      java110-generator/src/main/resources/relationship/template_staff_step.json
  86. 0 77
      java110-generator/src/main/resources/template/AbstractBusinessServiceDataFlowListener.txt
  87. 0 66
      java110-generator/src/main/resources/template/BMOImpl.java
  88. 0 175
      java110-generator/src/main/resources/template/DeleteInfoListener.txt
  89. 0 53
      java110-generator/src/main/resources/template/DeleteListener.java
  90. 0 38
      java110-generator/src/main/resources/template/IBMO.java
  91. 0 42
      java110-generator/src/main/resources/template/IInnerServiceSMO.txt
  92. 0 81
      java110-generator/src/main/resources/template/IServiceDao.txt
  93. 0 111
      java110-generator/src/main/resources/template/InnerServiceSMOImpl.txt
  94. 0 82
      java110-generator/src/main/resources/template/ListListener.java
  95. 0 11
      java110-generator/src/main/resources/template/Po.java
  96. 0 50
      java110-generator/src/main/resources/template/SaveListener.java
  97. 0 175
      java110-generator/src/main/resources/template/SaveListener.txt
  98. 0 31
      java110-generator/src/main/resources/template/ServiceCodeConstant.java
  99. 0 130
      java110-generator/src/main/resources/template/ServiceDaoImpl.txt
  100. 0 0
      java110-generator/src/main/resources/template/ServiceDaoImplMapper.txt

BIN
java110-generator/.DS_Store


+ 0 - 188
java110-generator/pom.xml

@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>MicroCommunity</artifactId>
-        <groupId>com.java110</groupId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>java110-generator</artifactId>
-
-    <name>java110-generator</name>
-    <!-- FIXME change it to the project's website -->
-    <url>http://www.example.com</url>
-
-    <packaging>jar</packaging>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.7</maven.compiler.source>
-        <maven.compiler.target>1.7</maven.compiler.target>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.11</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>fastjson</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>java110-interface</artifactId>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>com.java110</groupId>
-            <artifactId>java110-service</artifactId>
-
-        </dependency>
-        <!--  WICKET DEPENDENCIES -->
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-thymeleaf</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.thymeleaf</groupId>
-            <artifactId>thymeleaf</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.jsoup</groupId>
-            <artifactId>jsoup</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-websocket</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.activiti</groupId>
-            <artifactId>activiti-spring</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.quartz-scheduler</groupId>
-            <artifactId>quartz</artifactId>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <finalName>service-simple</finalName>
-        <!--<plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.10</version>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>generate-resources</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>java110-config</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>service-front</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>service-job</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>service-order</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>service-store</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>service-user</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>service-common</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>service-community</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>service-api</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>com.java110</groupId>
-                                    <artifactId>service-fee</artifactId>
-                                    <version>${microcommunity.version}</version>
-                                    <type>jar</type>
-                                    <overWrite>true</overWrite>
-                                    <outputDirectory>${project.build.directory}/classes</outputDirectory>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>com.java110.code.GeneratorServiceApplicationStart</mainClass>
-                </configuration>
-            </plugin>
-        </plugins>-->
-    </build>
-</project>

+ 0 - 394
java110-generator/src/main/java/com/java110/code/DealHtml.java

@@ -1,394 +0,0 @@
-package com.java110.code;
-
-import com.alibaba.fastjson.JSONObject;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.FilterWriter;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * @ClassName DealHtml
- * @Description TODO
- * @Author wuxw
- * @Date 2022/4/20 22:18
- * @Version 1.0
- * add by wuxw 2022/4/20
- **/
-public class DealHtml {
-
-    public static void main(String[] args) throws Exception {
-        File file = new File("C:\\Users\\Administrator\\Documents\\project\\hc\\MicroCommunityWeb\\public\\components");
-        JSONObject js = new JSONObject();
-        listFiles(file, js);
-        System.out.println("js = " + js.toJSONString());
-    }
-
-//    public static void main(String[] args) throws Exception {
-//       String js = "<div id=\"addContractModel\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"exampleModalLabel\"\n" +
-//               "  aria-hidden=\"true\">\n" +
-//               "  <div class=\"modal-dialog modal-lg\">\n" +
-//               "    <div class=\"modal-content\">\n" +
-//               "      <div class=\"modal-body\">\n" +
-//               "        <h3 class=\"m-t-none m-b \">添加合同</h3>\n" +
-//               "        <div class=\"ibox-content\">\n" +
-//               "          <div>\n" +addPrivilege
-//               "            <div>\n" +
-//               "              <div class=\"row\">\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">合同名称</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.contractName\" type=\"text\" placeholder=\"必填,请填写合同名称\"\n" +
-//               "                        class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">合同编号</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.contractCode\" type=\"text\" placeholder=\"必填,请填写合同编号\"\n" +
-//               "                        class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">合同类型</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <select class=\"custom-select\" v-model=\"addContractInfo.contractType\"\n" +
-//               "                        @change=\"_changeContractType()\">\n" +
-//               "                        <option selected disabled value=\"\">必填,请选择合同类型</option>\n" +
-//               "                        <option v-for=\"(item,index) in addContractInfo.contractTypes\" :key=\"index\"\n" +
-//               "                          :value=\"item.contractTypeId\">{{item.typeName}}</option>\n" +
-//               "                      </select>\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "              </div>\n" +
-//               "              <div class=\"row\">\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">甲方</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.partyA\" type=\"text\" placeholder=\"必填,请填写甲方\" class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">甲方联系人</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.aContacts\" type=\"text\" placeholder=\"必填,请填写甲方联系人\"\n" +
-//               "                        class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">甲方联系电话</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.aLink\" type=\"text\" placeholder=\"必填,请填写甲方联系电话\"\n" +
-//               "                        class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "              </div>\n" +
-//               "              <div class=\"row\">\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">乙方</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.partyB\" type=\"text\" placeholder=\"必填,请填写乙方\" class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">乙方联系人</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.bContacts\" type=\"text\" placeholder=\"必填,请填写乙方联系人\"\n" +
-//               "                        class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">乙方联系电话</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.bLink\" type=\"text\" placeholder=\"必填,请填写乙方联系电话\"\n" +
-//               "                        class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "              </div>\n" +
-//               "              <div class=\"row\">\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">经办人</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.operator\" type=\"text\" placeholder=\"必填,请填写经办人\"\n" +
-//               "                        class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">联系电话</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.operatorLink\" type=\"text\" placeholder=\"必填,请填写联系电话\"\n" +
-//               "                        class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">合同金额</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.amount\" type=\"text\" placeholder=\"选填,请填写合同金额\" class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "              </div>\n" +
-//               "              <div class=\"row\">\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">开始时间</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.startTime\" type=\"text\" placeholder=\"必填,请填写开始时间\"\n" +
-//               "                        class=\"form-control addStartTime\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">结束时间</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.endTime\" type=\"text\" placeholder=\"必填,请填写结束时间\"\n" +
-//               "                        class=\"form-control addEndTime\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">签订时间</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.signingTime\" type=\"text\" placeholder=\"必填,请填写签订时间\"\n" +
-//               "                        class=\"form-control addSigningTime\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "              </div>\n" +
-//               "              <div class=\"row\">\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">楼栋</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.allNum\" type=\"text\" placeholder=\"选填,请填写 楼栋编码\" class=\"form-control\" @blur=\"_queryRoom\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">业主</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.ownerName\" disabled=\"disabled\" type=\"text\" placeholder=\"必填,请填写业主\"\n" +
-//               "                        class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "                <div class=\"col-sm-4\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">业主电话</label>\n" +
-//               "                    <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                      <input v-model=\"addContractInfo.link\" disabled=\"disabled\" type=\"text\" placeholder=\"必填,请填写业主电话\"\n" +
-//               "                        class=\"form-control\">\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "              </div>\n" +
-//               "              <div v-for=\"(item,index) in addContractInfo.contractTypeSpecs\">\n" +
-//               "                <div class=\"row\" v-if=\"index % 3 == 0\">\n" +
-//               "                  <div class=\"col-sm-4\">\n" +
-//               "                    <div class=\"form-group row\">\n" +
-//               "                      <label class=\"col-sm-3 col-form-label padding-lr-sm text-right\">{{item.specName}}</label>\n" +
-//               "                      <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                        <input v-model=\"item.value\" type=\"text\" :placeholder=\"item.specHoldplace\" class=\"form-control\">\n" +
-//               "                      </div>\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                  <div class=\"col-sm-4\" v-if=\"index < addContractInfo.contractTypeSpecs.length-1\">\n" +
-//               "                    <div class=\"form-group row\">\n" +
-//               "                      <label\n" +
-//               "                        class=\"col-sm-3 col-form-label padding-lr-sm text-right\">{{addContractInfo.contractTypeSpecs[index+1].specName}}</label>\n" +
-//               "                      <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                        <input v-model=\"addContractInfo.contractTypeSpecs[index+1].value\" type=\"text\"\n" +
-//               "                          :placeholder=\"addContractInfo.contractTypeSpecs[index+1].specHoldplace\" class=\"form-control\">\n" +
-//               "                      </div>\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                  <div class=\"col-sm-4\" v-if=\"index < addContractInfo.contractTypeSpecs.length-2\">\n" +
-//               "                    <div class=\"form-group row\">\n" +
-//               "                      <label\n" +
-//               "                        class=\"col-sm-3 col-form-label padding-lr-sm text-right\">{{addContractInfo.contractTypeSpecs[index+2].specName}}</label>\n" +
-//               "                      <div class=\"col-sm-9 padding-lr-xs\">\n" +
-//               "                        <input v-model=\"addContractInfo.contractTypeSpecs[index+2].value\" type=\"text\"\n" +
-//               "                          :placeholder=\"addContractInfo.contractTypeSpecs[index+2].specHoldplace\" class=\"form-control\">\n" +
-//               "                      </div>\n" +
-//               "                    </div>\n" +
-//               "                  </div>\n" +
-//               "                </div>\n" +
-//               "              </div>\n" +
-//               "  \n" +
-//               "              <div class=\"row\">\n" +
-//               "                <div class=\"col-sm-10\">\n" +
-//               "                  <div class=\"form-group row\">\n" +
-//               "                    <label class=\"col-sm-2 col-form-label\">合同附件</label>\n" +
-//               "                    <div class=\"col-sm-10\">\n" +
-//               "                        <div class=\"row \" style=\"margin-left: 0px;\">\n" +
-//               "                            <button type=\"button\" class=\"btn btn-primary\" @click=\"addFileStep()\">添加附件</button>\n" +
-//               "                        </div>\n" +
-//               "                        <div v-for=\"(item,index) in addContractInfo.contractFilePo\">\n" +
-//               "                            <div class=\"row margin-0 margin-top\">\n" +
-//               "                                <div  class=\"col-sm-1 text-center\">\n" +
-//               "                                    <label class=\"col-form-label\">第{{index+1}}个</label>\n" +
-//               "                                </div>\n" +
-//               "                                <input type=\"file\"\n" +
-//               "                                class=\"custom-file-input form-control\" name=\"excelTemplate\" style=\"width: 11%;opacity: 1;\"\n" +
-//               "                                v-on:change=\"getFile($event,index)\" accept=\".png,.pdf,.jpg\">\n" +
-//               "                                <label  class=\"col-sm-5 col-form-label padding-lr-sm text-right\">{{item.fileRealName}}</label>\n" +
-//               "                                <div>\n" +
-//               "                                    <button type=\"button\" class=\"btn btn-link\" @click=\"deleteStep(item)\">删除附件</button>\n" +
-//               "                                </div>\n" +
-//               "                              \n" +
-//               "                            </div>\n" +
-//               "                           \n" +
-//               "                        </div>\n" +
-//               "                    </div>\n" +
-//               "                </div>\n" +
-//               "                </div>\n" +
-//               "              </div>\n" +
-//               "\n" +
-//               "              <div class=\"ibox-content\">\n" +
-//               "                <button class=\"btn btn-primary float-right\" type=\"button\" v-on:click=\"saveContractInfo()\"><i\n" +
-//               "                    class=\"fa fa-check\"></i>&nbsp;保存</button>\n" +
-//               "                <button type=\"button\" class=\"btn btn-warning float-right\" style=\"margin-right:20px;\"\n" +
-//               "                  data-dismiss=\"modal\">取消</button>\n" +
-//               "              </div>\n" +
-//               "            </div>\n" +
-//               "          </div>\n" +
-//               "        </div>\n" +
-//               "      </div>\n" +
-//               "    </div>\n" +
-//               "  </div>\n" +
-//               "</div>";
-//        Pattern p = Pattern.compile("=\"([\u4e00-\u9fa5]|,|,| )+");
-//
-//        Matcher m = p.matcher(js);
-//
-//        while (m.find()) {
-//            String chinese = m.group();//匹配出的中文
-//            chinese = chinese.replace("=\"", "");
-//            System.out.println(chinese);
-//        }
-//    }
-
-    public static void listFiles(File file, JSONObject js) throws Exception {
-        if (file.isFile()) {
-            if (file.getName().endsWith(".html")) {
-                doDealHtml(file, js);
-
-            }
-            return;
-        }
-
-        File[] files = file.listFiles();
-
-        for (File tmpFile : files) {
-            listFiles(tmpFile, js);
-        }
-    }
-
-    private static void doDealHtml(File tmpFile, JSONObject js) throws Exception {
-
-        String fileName = tmpFile.getName().replace(".html", "");
-        System.out.println("fileName=" + fileName + ",dir=" + tmpFile.getPath());
-        BufferedReader in = new BufferedReader(new FileReader(tmpFile));
-        String str;
-        String context = "";
-        JSONObject fileNameObj = new JSONObject();
-        while ((str = in.readLine()) != null) {
-            context += (doDealHtmlNode(str, fileName, fileNameObj) + "\n");
-            //doDealHtmlNode(str,fileName);
-        }
-        js.put(fileName, fileNameObj);
-        System.out.println(context);
-        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tmpFile));
-        bufferedWriter.write(context);
-        bufferedWriter.close();
-
-
-    }
-
-    private static String doDealHtmlNode(String str, String fileName, JSONObject fileNameObj) {
-//        Pattern p = Pattern.compile("=\"([\u4e00-\u9fa5]|,)+");
-//
-//        Matcher m = p.matcher(str);
-        Pattern p = Pattern.compile("=\"([\u4e00-\u9fa5]|,|,| )+");
-
-        Matcher m = p.matcher(str);
-
-        while (m.find()) {
-            String chinese = m.group();//匹配出的中文
-            chinese = chinese.replace("=\"", "");
-            fileNameObj.put(chinese, chinese);
-            //m.appendReplacement(buf, "><vc:i18n name=\"" + chinese + "\" namespace=\"" + fileName + "\"></vc:i18n>");
-            str = str.replace(chinese, "vc.i18n('" + chinese + "','" + fileName + "')");
-            str = str.replace("placeholder", ":placeholder");
-        }
-
-        p = Pattern.compile(">[\u4e00-\u9fa5]+");
-
-        m = p.matcher(str);
-
-        while (m.find()) {
-            String chinese = m.group();//匹配出的中文
-            chinese = chinese.replace(">", "");
-            fileNameObj.put(chinese, chinese);
-            //m.appendReplacement(buf, "><vc:i18n name=\"" + chinese + "\" namespace=\"" + fileName + "\"></vc:i18n>");
-            str = str.replace(chinese, "<vc:i18n name=\"" + chinese + "\" namespace=\"" + fileName + "\"></vc:i18n>");
-        }
-
-        p = Pattern.compile("}}[\u4e00-\u9fa5]+");
-
-        m = p.matcher(str);
-
-        while (m.find()) {
-            String chinese = m.group();//匹配出的中文
-            chinese = chinese.replace("}}", "");
-            fileNameObj.put(chinese, chinese);
-            //m.appendReplacement(buf, "><vc:i18n name=\"" + chinese + "\" namespace=\"" + fileName + "\"></vc:i18n>");
-            str = str.replace(chinese, "<vc:i18n name=\"" + chinese + "\" namespace=\"" + fileName + "\"></vc:i18n>");
-        }
-
-        p = Pattern.compile("> [\u4e00-\u9fa5]+");
-
-        m = p.matcher(str);
-
-        while (m.find()) {
-            String chinese = m.group();//匹配出的中文
-            chinese = chinese.replace("> ", "");
-            fileNameObj.put(chinese, chinese);
-            //m.appendReplacement(buf, "><vc:i18n name=\"" + chinese + "\" namespace=\"" + fileName + "\"></vc:i18n>");
-            str = str.replace(chinese, "<vc:i18n name=\"" + chinese + "\" namespace=\"" + fileName + "\"></vc:i18n>");
-        }
-
-
-        return str;
-    }
-}

+ 0 - 113
java110-generator/src/main/java/com/java110/code/DealPrintVc18nNameHtml.java

@@ -1,113 +0,0 @@
-package com.java110.code;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.util.StringUtil;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-
-/**
- * @ClassName DealHtml
- * @Description TODO
- * @Author wuxw
- * @Date 2022/4/20 22:18
- * @Version 1.0
- * add by wuxw 2022/4/20
- **/
-public class DealPrintVc18nNameHtml {
-
-    public static void main(String[] args) throws Exception {
-        File file = new File("C:\\project\\vip\\MicroCommunityWeb\\public\\components");
-        JSONObject js = new JSONObject();
-        listFiles(file, js);
-        System.out.println("js = " + js.toJSONString());
-    }
-
-    public static void listFiles(File file, JSONObject js) throws Exception {
-        if (file.isFile()) {
-            if (file.getName().endsWith(".html")) {
-                doDealHtml(file, js);
-
-            }
-            return;
-        }
-
-        File[] files = file.listFiles();
-
-        for (File tmpFile : files) {
-            listFiles(tmpFile, js);
-        }
-    }
-
-    private static void doDealHtml(File tmpFile, JSONObject js) throws Exception {
-
-        String fileName = tmpFile.getName().replace(".html", "");
-        System.out.println("fileName=" + fileName + ",dir=" + tmpFile.getPath());
-        BufferedReader in = new BufferedReader(new FileReader(tmpFile));
-        String str;
-        String context = "";
-        JSONObject fileNameObj = new JSONObject();
-        while ((str = in.readLine()) != null) {
-            context += (str + "\n");
-            //doDealHtmlNode(str,fileName);
-            context = doDealHtmlNode(str, fileName, fileNameObj);
-
-        }
-        js.put(fileName, fileNameObj);
-        System.out.println(context);
-//        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tmpFile));
-//        bufferedWriter.write(context);
-//        bufferedWriter.close();
-
-
-    }
-
-    private static String doDealHtmlNode(String str, String fileName, JSONObject fileNameObj) {
-        String vcStr = "<vc:i18n name=\"";
-        String vcStrFunc = "vc.i18n";
-        if (!str.contains(vcStr) && !str.contains(vcStrFunc)) {
-            return str;
-        }
-        String[] options ;
-        if(str.contains(vcStr)) {
-           options = str.split(vcStr);
-
-            String endStr = "</vc:i18n>";
-            String name = "";
-            for (String optionStr : options) {
-                if (!optionStr.contains(endStr)) {
-                    continue;
-                }
-                optionStr = optionStr.substring(0, optionStr.indexOf("\""));
-
-                fileNameObj.put(optionStr, optionStr);
-                //str = str.replace(optionStr,"{{vc.i18n('"+name+"','"+fileName+"')}}");
-            }
-        }else {
-
-            options = str.split(vcStrFunc);
-            String optionStr = "";
-            for (int optionIndex = 0; optionIndex < options.length; optionIndex++) {
-                if (optionIndex % 2 == 0) {
-                    continue;
-                }
-                optionStr = options[optionIndex];
-                if (!optionStr.contains("'")) {
-                    continue;
-                }
-                optionStr = optionStr.substring(2);
-                optionStr = optionStr.substring(0, optionStr.indexOf("'"));
-
-                if(StringUtil.isEmpty(optionStr)){
-                    continue;
-                }
-
-                fileNameObj.put(optionStr, optionStr);
-                //str = str.replace(optionStr,"{{vc.i18n('"+name+"','"+fileName+"')}}");
-            }
-
-        }
-        return str;
-    }
-}

+ 0 - 97
java110-generator/src/main/java/com/java110/code/DealSelectHtml.java

@@ -1,97 +0,0 @@
-package com.java110.code;
-
-import com.alibaba.fastjson.JSONObject;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * @ClassName DealHtml
- * @Description TODO
- * @Author wuxw
- * @Date 2022/4/20 22:18
- * @Version 1.0
- * add by wuxw 2022/4/20
- **/
-public class DealSelectHtml {
-
-    public static void main(String[] args) throws Exception {
-        File file = new File("C:\\Users\\Administrator\\Documents\\project\\hc\\MicroCommunityWeb\\public\\components");
-        JSONObject js = new JSONObject();
-        listFiles(file, js);
-        System.out.println("js = " + js.toJSONString());
-    }
-
-    public static void listFiles(File file, JSONObject js) throws Exception {
-        if (file.isFile()) {
-            if (file.getName().endsWith(".html")) {
-                doDealHtml(file, js);
-
-            }
-            return;
-        }
-
-        File[] files = file.listFiles();
-
-        for (File tmpFile : files) {
-            listFiles(tmpFile, js);
-        }
-    }
-
-    private static void doDealHtml(File tmpFile, JSONObject js) throws Exception {
-
-        String fileName = tmpFile.getName().replace(".html", "");
-        System.out.println("fileName=" + fileName + ",dir=" + tmpFile.getPath());
-        BufferedReader in = new BufferedReader(new FileReader(tmpFile));
-        String str;
-        String context = "";
-        JSONObject fileNameObj = new JSONObject();
-        while ((str = in.readLine()) != null) {
-            context += (str + "\n");
-            //doDealHtmlNode(str,fileName);
-        }
-        context = doDealHtmlNode(context, fileName, fileNameObj);
-
-        js.put(fileName, fileNameObj);
-        System.out.println(context);
-//        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tmpFile));
-//        bufferedWriter.write(context);
-//        bufferedWriter.close();
-
-
-    }
-
-    private static String doDealHtmlNode(String str, String fileName, JSONObject fileNameObj) {
-        if(!str.contains("<option")){
-            return str;
-        }
-
-        String[] options =  str.split("<option");
-        String vcStr = "<vc:i18n name=\"";
-        String endStr = "</vc:i18n>";
-        String name = "";
-        for(String optionStr: options){
-            if(!optionStr.contains("</option>")){
-                continue;
-            }
-            optionStr = optionStr.substring(0,optionStr.indexOf("</option>"));
-            int vcPos = optionStr.indexOf(vcStr);
-            if(vcPos < 0){
-                continue;
-            }
-
-            optionStr = optionStr.substring(vcPos,optionStr.indexOf(endStr)+10);
-
-            name = optionStr.substring(optionStr.indexOf("\"")+1);
-            name = name.substring(0,name.indexOf("\""));
-            str = str.replace(optionStr,"{{vc.i18n('"+name+"','"+fileName+"')}}");
-        }
-
-        return str;
-    }
-}

+ 0 - 76
java110-generator/src/main/java/com/java110/code/DealVc18nAddSpanHtml.java

@@ -1,76 +0,0 @@
-package com.java110.code;
-
-import com.alibaba.fastjson.JSONObject;
-
-import java.io.*;
-
-/**
- * @ClassName DealHtml
- * @Description TODO
- * @Author wuxw
- * @Date 2022/4/20 22:18
- * @Version 1.0
- * add by wuxw 2022/4/20
- **/
-public class DealVc18nAddSpanHtml {
-
-    public static void main(String[] args) throws Exception {
-        File file = new File("C:\\project\\vip\\MicroCommunityWeb\\public\\pages");
-        JSONObject js = new JSONObject();
-        listFiles(file, js);
-        System.out.println("js = " + js.toJSONString());
-    }
-
-    public static void listFiles(File file, JSONObject js) throws Exception {
-        if (file.isFile()) {
-            if (file.getName().endsWith(".html")) {
-                doDealHtml(file, js);
-            }
-            return;
-        }
-
-        File[] files = file.listFiles();
-
-        for (File tmpFile : files) {
-            listFiles(tmpFile, js);
-        }
-    }
-
-    private static void doDealHtml(File tmpFile, JSONObject js) throws Exception {
-
-        String fileName = tmpFile.getName().replace(".html", "");
-        System.out.println("fileName=" + fileName + ",dir=" + tmpFile.getPath());
-        BufferedReader in = new BufferedReader(new FileReader(tmpFile));
-        String str;
-        String context = "";
-        JSONObject fileNameObj = new JSONObject();
-        while ((str = in.readLine()) != null) {
-            //doDealHtmlNode(str,fileName);
-            context += doDealHtmlNode(str+"\n", fileName, fileNameObj);
-
-        }
-        System.out.println(context);
-        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tmpFile));
-        bufferedWriter.write(context);
-        bufferedWriter.close();
-
-
-    }
-
-    private static String doDealHtmlNode(String str, String fileName, JSONObject fileNameObj) {
-        String vcStr = "<vc:i18n";
-        if (!str.contains(vcStr)) {
-            return str;
-        }
-
-
-        String endStr = "</vc:i18n>";
-        String name = "";
-
-        str = str.replaceAll(vcStr,"<span>"+vcStr);
-        str = str.replaceAll(endStr,endStr+"</span>");
-
-
-        return str;
-    }
-}

+ 0 - 85
java110-generator/src/main/java/com/java110/code/GeneratorServiceApplicationStart.java

@@ -1,85 +0,0 @@
-package com.java110.code;
-
-import com.java110.core.annotation.Java110ListenerDiscovery;
-import com.java110.core.event.service.BusinessServiceDataFlowEventPublishing;
-import com.java110.service.init.ServiceStartInit;
-import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.boot.web.client.RestTemplateBuilder;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.http.converter.StringHttpMessageConverter;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.web.client.RestTemplate;
-
-import java.nio.charset.Charset;
-
-
-/**
- * spring boot 初始化启动类
- *
- * @version v0.1
- * @auther com.java110.wuxw
- * @mail 928255095@qq.com
- * @date 2016年8月6日
- * @tag
- */
-@SpringBootApplication(scanBasePackages = {"com.java110.core.annotation",
-        "com.java110.core.aop","com.java110.core.base","com.java110.core.cache",
-        "com.java110.core.client","com.java110.core.component","com.java110.core.context",
-        "com.java110.core.event","com.java110.core.factory",
-        "com.java110.core.kafka","com.java110.core.log","com.java110.core.proxy",
-        "com.java110.service", "com.java110.user",
-        "com.java110.job","com.java110.store","com.java110.fee","com.java110.community",
-        "com.java110.common","com.java110.order","com.java110.api",
-         "com.java110.config.properties.code", "com.java110.db"})
-@Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class,
-        basePackages = {"com.java110.user.listener","com.java110.job.listener",
-                "com.java110.store.listener","com.java110.fee.listener",
-                "com.java110.community.listener","com.java110.common.listener",
-                "com.java110.order.listener","com.java110.api.listener",
-        })
-@EnableScheduling
-@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
-public class GeneratorServiceApplicationStart {
-
-    private static Logger logger = LoggerFactory.getLogger(GeneratorServiceApplicationStart.class);
-
-
-    /**
-     * 实例化RestTemplate,通过@LoadBalanced注解开启均衡负载能力.
-     *
-     * @return restTemplate
-     */
-    @Bean
-    public RestTemplate restTemplate() {
-        StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
-        RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build();
-        return restTemplate;
-    }
-
-    /**
-     * 实例化RestTemplate
-     *
-     * @return restTemplate
-     */
-    @Bean
-    public com.java110.core.client.RestTemplate outRestTemplate() {
-        StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
-        com.java110.core.client.RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build(com.java110.core.client.RestTemplate.class);
-        return restTemplate;
-    }
-
-    public static void main(String[] args) throws Exception {
-        try {
-            ApplicationContext context = SpringApplication.run(GeneratorServiceApplicationStart.class, args);
-            ServiceStartInit.initSystemConfig(context);
-        } catch (Throwable e) {
-            logger.error("系统启动失败", e);
-        }
-    }
-}

+ 0 - 96
java110-generator/src/main/java/com/java110/code/TableToJson.java

@@ -1,96 +0,0 @@
-package com.java110.code;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.client.RestTemplate;
-import com.java110.db.dao.IQueryServiceDAO;
-import com.java110.utils.factory.ApplicationContextFactory;
-import com.java110.utils.util.StringUtil;
-import org.springframework.beans.BeansException;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.web.client.RestTemplateBuilder;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.http.converter.StringHttpMessageConverter;
-
-import java.nio.charset.Charset;
-
-public class TableToJson {
-
-    //show create table c_orders  用这个语句获取
-    public static final String createTableSql = "CREATE TABLE `fee_combo_member` (\n" +
-            "  `member_id` varchar(30) NOT NULL COMMENT '成员ID',\n" +
-            "  `combo_id` varchar(30) NOT NULL COMMENT '套餐ID',\n" +
-            "  `config_id` varchar(30) NOT NULL COMMENT '费用项ID',\n" +
-            "  `community_id` varchar(30) NOT NULL COMMENT '小区ID',\n" +
-            "  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',\n" +
-            "  `status_cd` varchar(2) NOT NULL DEFAULT '0' COMMENT '数据状态,详细参考c_status表,S 保存,0, 在用 1失效'\n" +
-            ")";
-
-    public static void main(String[] args) {
-        String desc = "套餐成员";
-        String id = "comboId";
-        String name = "feeComboMember";
-        String shareName = "fee"; //生成到那个服务下
-        String shareColumn = "community_id";
-        String shareParam = "communityId";
-        //业务名称 desc 业务编码名称生成后类名 name 主键 id  需要放到那个服务 shareName
-        String newSql = createTableSql.substring(createTableSql.indexOf("(") + 1, createTableSql.lastIndexOf(")"));
-        String tableName = createTableSql.substring(createTableSql.indexOf("TABLE") + 5, createTableSql.indexOf("("));
-        tableName = tableName.replaceAll("`", "").trim();
-        newSql = newSql.replaceAll("\n", "");
-        String[] rowSqls = newSql.split("',");
-        JSONObject param = new JSONObject();
-        param.put("autoMove", true);
-        param.put("desc", desc);
-        param.put("id", id);
-        param.put("name", name);
-        param.put("shareColumn", shareColumn);
-        param.put("shareName", shareName);
-        param.put("shareParam", shareParam);
-        param.put("tableName", tableName);
-        JSONObject paramColumn = new JSONObject();
-        JSONArray requireds = new JSONArray();
-        JSONObject required = null;
-        String key = "";
-        for (String rowSql : rowSqls) {
-            required = new JSONObject();
-            key = rowSql.trim();
-            key = key.substring(0, key.indexOf(" "));
-            key = key.replaceAll("`", "");
-            if ("UNIQUE".equals(key)) {
-                continue;
-            }
-            if ("KEY".equals(key)) {
-                continue;
-            }
-            if ("PRIMARY".equals(key)) {
-                continue;
-            }
-            if ("b_id".equals(key)) {
-                continue;
-            }
-            if ("create_time".equals(key)) {
-                continue;
-            }
-            if (rowSql.toLowerCase().contains("not null")) {
-                required.put("code", StringUtil.lineToHump(key));
-                String comment = rowSql.contains("COMMENT") ? rowSql.substring(rowSql.indexOf("COMMENT '") + 9) : StringUtil.lineToHump(key);
-                comment = comment.trim();
-                if (comment.contains(",")) {
-                    comment = comment.split(",")[0];
-                }
-                if (comment.contains(" ")) {
-                    comment = comment.split(" ")[0];
-                }
-
-                required.put("msg", comment + "不能为空");
-                requireds.add(required);
-            }
-            paramColumn.put(StringUtil.lineToHump(key), key);
-        }
-        param.put("param", paramColumn);
-        param.put("required", requireds);
-        System.out.println(param.toJSONString());
-    }
-}

+ 0 - 105
java110-generator/src/main/java/com/java110/code/TableToJsonWeb.java

@@ -1,105 +0,0 @@
-package com.java110.code;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.util.StringUtil;
-
-public class TableToJsonWeb {
-
-    //show create table c_orders  用这个语句获取
-    public static final String createTableSql = "CREATE TABLE `fee_combo` (\n" +
-            "  `combo_id` varchar(30) NOT NULL COMMENT '套餐ID',\n" +
-            "  `combo_name` varchar(30) NOT NULL COMMENT '套餐名称',\n" +
-            "  `community_id` varchar(30) NOT NULL COMMENT '小区ID'\n" +
-            ") ENGINE=InnoDB DEFAULT CHARSET=utf8;";
-    public static void main(String[] args) {
-        String templateName = "费用套餐"; //业务名称
-        String templateCode = "feeCombo"; //表名大写
-        String templateKey = "comboId"; //表主键
-        String templateKeyName = "编号";//主键说明
-        String searchCode = "comboId"; //分片字段
-        String searchName = "编号"; //分片字段说明
-        String directories = "property"; //前端生成到那个目录下
-        // templateName 业务名称 业务编码名称生成后文件名 templateCode 主键 templateKey
-        // 业务主键名称 templateKeyName=templateName+ID 主机驼峰 searchCode 主键名称 searchName
-        // directories 放在前端那个目录下
-        String newSql = createTableSql.substring(createTableSql.indexOf("(") + 1, createTableSql.lastIndexOf(")"));
-        String tableName = createTableSql.substring(createTableSql.indexOf("TABLE") + 5, createTableSql.indexOf("("));
-        tableName = tableName.replaceAll("`", "").trim();
-        newSql = newSql.replaceAll("\n", "");
-        String[] rowSqls = newSql.split("',");
-        JSONObject param = new JSONObject();
-        param.put("templateName", templateName);
-        param.put("templateCode", templateCode);
-        param.put("templateKey", templateKey);
-        param.put("templateKeyName", templateKeyName);
-        param.put("searchCode", searchCode);
-        param.put("searchName", searchName);
-        param.put("directories", directories);
-        JSONObject paramColumn = null;
-        JSONArray conditions = new JSONArray();
-        JSONArray paramColumns = new JSONArray();
-        JSONObject condition = null;
-        String key = "";
-        for (String rowSql : rowSqls) {
-            condition = new JSONObject();
-            paramColumn = new JSONObject();
-            key = rowSql.trim();
-            key = key.substring(0, key.indexOf(" "));
-            key = key.replaceAll("`", "");
-            if ("UNIQUE".equals(key)) {
-                continue;
-            }
-            if ("KEY".equals(key)) {
-                continue;
-            }
-            if ("b_id".equals(key)) {
-                continue;
-            }
-            if ("create_time".equals(key)) {
-                continue;
-            }
-            if ("status_cd".equals(key)) {
-                continue;
-            }
-            String comment = rowSql.contains("COMMENT") ? rowSql.substring(rowSql.indexOf("COMMENT '") + 9) : StringUtil.lineToHump(key);
-            comment = comment.trim();
-            if (comment.contains(",")) {
-                comment = comment.split(",")[0];
-            }
-            if (comment.contains(" ")) {
-                comment = comment.split(" ")[0];
-            }
-            paramColumn.put("desc", comment);
-            if (rowSql.toLowerCase().contains("not null")) {
-
-                condition.put("name", comment);
-                condition.put("inputType", "input");
-                condition.put("code", StringUtil.lineToHump(key));
-                condition.put("whereCondition", "equal");
-                conditions.add(condition);
-                paramColumn.put("desc", "必填," + comment);
-            }
-            String limit = rowSql.substring(rowSql.indexOf("(") + 1, rowSql.indexOf(")"));
-            if (limit.contains(",")) {
-                limit = limit.split(",")[0];
-            }
-
-            paramColumn.put("code", StringUtil.lineToHump(key));
-            paramColumn.put("cnCode", comment);
-            paramColumn.put("required", true);
-            paramColumn.put("hasDefaultValue", false);
-            paramColumn.put("inputType", "input");
-            paramColumn.put("limit", "maxLength");
-            paramColumn.put("limitParam", limit);
-            paramColumn.put("limitErrInfo", comment + "不能超过" + limit);
-            paramColumn.put("show", true);
-            paramColumns.add(paramColumn);
-        }
-        param.put("columns", paramColumns);
-        param.put("conditions", conditions);
-        System.out.println(param.toJSONString());
-
-    }
-
-}

+ 0 - 81
java110-generator/src/main/java/com/java110/code/back/BackCoderGeneratorStart.java

@@ -1,81 +0,0 @@
-package com.java110.code.back;
-
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.web.GeneratorStart;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Hello world!
- */
-public class BackCoderGeneratorStart extends BaseGenerator {
-
-
-    protected BackCoderGeneratorStart() {
-        // prevents calls from subclass
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * 代码生成器 入口方法
-     * 此处生成的mapper文件包含过程表和实例表的sql,所以要求两张表的特殊字段也要写上
-     * BusinessTypeCd
-     *
-     * @param args 参数
-     */
-    public static void main(String[] args) throws Exception {
-
-        //加载配置
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/back/template_1.json").getFile());
-
-        JSONObject dataJson = JSONObject.parseObject(sb.toString());
-
-        Data data = new Data();
-        if(dataJson.containsKey("autoMove")){
-            data.setAutoMove(dataJson.getBoolean("autoMove"));
-        }
-        data.setId(dataJson.getString("id"));
-        data.setName(dataJson.getString("name"));
-        data.setDesc(dataJson.getString("desc"));
-        data.setShareParam(dataJson.getString("shareParam"));
-        data.setShareColumn(dataJson.getString("shareColumn"));
-        data.setShareName(dataJson.getString("shareName"));
-        data.setTableName(dataJson.getString("tableName"));
-        data.setParams(dataJson.getJSONObject("param"));
-
-        JSONArray required = dataJson.getJSONArray("required");
-
-        List<String> paramList = new ArrayList<String>();
-        for (int reqIndex = 0; reqIndex < required.size(); reqIndex++) {
-            JSONObject require = required.getJSONObject(reqIndex);
-            paramList.add(require.getString("code"));
-        }
-        data.setRequiredParam(paramList.toArray(new String[required.size()]));
-
-        GeneratorIServiceDaoListener generatorIServiceDaoListener = new GeneratorIServiceDaoListener();
-        generatorIServiceDaoListener.generator(data);
-
-        GeneratorServiceDaoImplListener generatorServiceDaoImplListener = new GeneratorServiceDaoImplListener();
-        generatorServiceDaoImplListener.generator(data);
-
-        GeneratorServiceDaoImplMapperListener generatorServiceDaoImplMapperListener = null;
-        generatorServiceDaoImplMapperListener = new GeneratorServiceDaoImplMapperListener();
-        generatorServiceDaoImplMapperListener.generator(data);
-
-
-        GeneratorInnerServiceSMOImpl generatorInnerServiceSMOImpl = new GeneratorInnerServiceSMOImpl();
-        generatorInnerServiceSMOImpl.generator(data);
-
-        GeneratorDtoBean generatorDtoBean = new GeneratorDtoBean();
-        generatorDtoBean.generator(data);
-
-        GeneratorIInnerServiceSMO generatorIInnerServiceSMO = new GeneratorIInnerServiceSMO();
-        generatorIInnerServiceSMO.generator(data);
-
-        GeneratorApiListener generatorApiListener = new GeneratorApiListener();
-        generatorApiListener.generator(data);
-    }
-}

+ 0 - 117
java110-generator/src/main/java/com/java110/code/back/BaseGenerator.java

@@ -1,117 +0,0 @@
-package com.java110.code.back;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.util.DateUtil;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-
-public class BaseGenerator {
-
-//    protected FileUtilBase fileUtilBase(){
-//        return new FileUtilBase();
-//    }
-    //首字母转小写
-    public static String toLowerCaseFirstOne(String s){
-        if(Character.isLowerCase(s.charAt(0)))
-            return s;
-        else
-            return (new StringBuilder()).append(Character.toLowerCase(s.charAt(0))).append(s.substring(1)).toString();
-    }
-
-
-    //首字母转大写
-    public static String toUpperCaseFirstOne(String s){
-        if(Character.isUpperCase(s.charAt(0)))
-            return s;
-        else
-            return (new StringBuilder()).append(Character.toUpperCase(s.charAt(0))).append(s.substring(1)).toString();
-    }
-
-
-    /**
-     * 读入TXT文件
-     */
-    public static StringBuffer readFile(String pathname) {
-        StringBuffer sb = new StringBuffer();
-        try (FileReader reader = new FileReader(pathname);
-             BufferedReader br = new BufferedReader(reader) // 建立一个对象,它把文件内容转成计算机能读懂的语言
-        ) {
-            String line ="";
-            //网友推荐更加简洁的写法
-            while ((line = br.readLine()) != null) {
-                // 一次读入一行数据
-                sb.append(line+"\n");
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-
-        return sb;
-    }
-
-    /**
-     * 写入TXT文件
-     */
-    public static void writeFile(String filePath,String fileName) {
-        try {
-            File writeName = new File(filePath); // 相对路径,如果没有则要建立一个新的output.txt文件
-            File fileParent = writeName.getParentFile();
-            if(!fileParent.exists()){
-                fileParent.mkdirs();
-            }
-            writeName.createNewFile(); // 创建新文件,有同名的文件的话直接覆盖
-            try (FileWriter writer = new FileWriter(writeName);
-                 BufferedWriter out = new BufferedWriter(writer)
-            ) {
-                out.write(fileName);
-                out.flush(); // 把缓存区内容压入文件
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    protected String replaceBindingTemplateContext(String srcStr, JSONObject data){
-        return srcStr.replace("TableCode@@",toUpperCaseFirstOne(data.getString("tableName")))
-                .replace("@@tableCode@@",data.getString("tableName"))
-                .replace("@@templateName@@", data.getString("templateName"))
-                .replace("@@templateCode@@", data.getString("templateCode"))
-                .replace("@@TemplateCode@@", toUpperCaseFirstOne(data.getString("templateCode")))
-                .replace("@@templateKey@@", data.getString("templateKey"))
-                .replace("@@TemplateKey@@", toUpperCaseFirstOne(data.getString("templateKey")))
-                .replace("@@templateKeyName@@", data.getString("templateKeyName"))
-                .replace("@@TEMPLATECODE@@", data.getString("templateCode").toUpperCase());
-    }
-
-    protected String replaceTemplateContext(String srcStr, JSONObject data){
-        return srcStr.replace("@@templateName@@", data.getString("templateName"))
-                .replace("@@templateCode@@", data.getString("templateCode"))
-                .replace("@@TemplateCode@@", toUpperCaseFirstOne(data.getString("templateCode")))
-                .replace("@@templateKey@@", data.getString("templateKey"))
-                .replace("@@TemplateKey@@", toUpperCaseFirstOne(data.getString("templateKey")))
-                .replace("@@templateKeyName@@", data.getString("templateKeyName"))
-                .replace("@@TEMPLATECODE@@", data.getString("templateCode").toUpperCase())
-                .replace("@@searchCode@@", data.getString("searchCode"))
-                .replace("@@directories@@", data.getString("directories"))
-                .replace("@@searchName@@", data.getString("searchName"));
-    }
-
-    protected String replaceTemplateContext(String srcStr, Data data){
-        return srcStr.replace("@@templateName@@", data.getDesc())
-                .replace("@@templateCode@@", data.getName())
-                .replace("@@TemplateCode@@", toUpperCaseFirstOne(data.getName()))
-                .replace("@@templateKey@@", data.getId())
-                .replace("@@TemplateKey@@", toUpperCaseFirstOne(data.getId()))
-                .replace("@@templateKeyName@@", data.getId())
-                .replace("@@TEMPLATECODE@@", data.getName().toUpperCase())
-                .replace("@@searchCode@@", data.getId())
-                .replace("@@shareName@@", data.getShareName())
-                .replace("@@searchName@@", data.getId())
-                .replace("@@date@@", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
-    }
-}

+ 0 - 190
java110-generator/src/main/java/com/java110/code/back/Data.java

@@ -1,190 +0,0 @@
-package com.java110.code.back;
-
-import java.util.Map;
-
-/**
- * @ClassName Data
- * @Description TODO
- * @Author wuxw
- * @Date 2020/3/22 17:00
- * @Version 1.0
- * add by wuxw 2020/3/22
- **/
-public class Data {
-
-    private boolean autoMove;
-    private String packagePath;
-
-    private String id;
-
-    private String name;
-
-    private String desc;
-
-    private String newBusinessTypeCd;
-
-    private String updateBusinessTypeCd;
-
-    private String deleteBusinessTypeCd;
-
-    private String newBusinessTypeCdValue;
-
-    private String updateBusinessTypeCdValue;
-
-    private String deleteBusinessTypeCdValue;
-
-    private String businessTableName;
-
-    private String tableName;
-    //分片数据库字段 如community_id
-    private String shareColumn;
-    //分片传入参数 如communityId
-    private String shareParam;
-    //分片传入参数 如community
-    private String shareName;
-
-    public String getShareName() { return shareName; }
-
-    public void setShareName(String shareName) { this.shareName = shareName; }
-
-    private Map params;
-
-    private String[] requiredParam;
-
-    public String getPackagePath() {
-        return packagePath;
-    }
-
-    public void setPackagePath(String packagePath) {
-        this.packagePath = packagePath;
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public Map getParams() {
-        return params;
-    }
-
-    public void setParams(Map params) {
-        this.params = params;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-
-
-    public String getBusinessTableName() {
-        return businessTableName;
-    }
-
-    public void setBusinessTableName(String businessTableName) {
-        this.businessTableName = businessTableName;
-    }
-
-    public String getTableName() {
-        return tableName;
-    }
-
-    public void setTableName(String tableName) {
-        this.tableName = tableName;
-    }
-
-    public String getNewBusinessTypeCd() {
-        return newBusinessTypeCd;
-    }
-
-    public void setNewBusinessTypeCd(String newBusinessTypeCd) {
-        this.newBusinessTypeCd = newBusinessTypeCd;
-    }
-
-    public String getUpdateBusinessTypeCd() {
-        return updateBusinessTypeCd;
-    }
-
-    public void setUpdateBusinessTypeCd(String updateBusinessTypeCd) {
-        this.updateBusinessTypeCd = updateBusinessTypeCd;
-    }
-
-    public String getDeleteBusinessTypeCd() {
-        return deleteBusinessTypeCd;
-    }
-
-    public void setDeleteBusinessTypeCd(String deleteBusinessTypeCd) {
-        this.deleteBusinessTypeCd = deleteBusinessTypeCd;
-    }
-
-    public String getNewBusinessTypeCdValue() {
-        return newBusinessTypeCdValue;
-    }
-
-    public void setNewBusinessTypeCdValue(String newBusinessTypeCdValue) {
-        this.newBusinessTypeCdValue = newBusinessTypeCdValue;
-    }
-
-    public String getUpdateBusinessTypeCdValue() {
-        return updateBusinessTypeCdValue;
-    }
-
-    public void setUpdateBusinessTypeCdValue(String updateBusinessTypeCdValue) {
-        this.updateBusinessTypeCdValue = updateBusinessTypeCdValue;
-    }
-
-    public String getDeleteBusinessTypeCdValue() {
-        return deleteBusinessTypeCdValue;
-    }
-
-    public void setDeleteBusinessTypeCdValue(String deleteBusinessTypeCdValue) {
-        this.deleteBusinessTypeCdValue = deleteBusinessTypeCdValue;
-    }
-
-    public String getShareColumn() {
-        return shareColumn;
-    }
-
-    public void setShareColumn(String shareColumn) {
-        this.shareColumn = shareColumn;
-    }
-
-    public String getShareParam() {
-        return shareParam;
-    }
-
-    public void setShareParam(String shareParam) {
-        this.shareParam = shareParam;
-    }
-
-    public String[] getRequiredParam() {
-        return requiredParam;
-    }
-
-    public void setRequiredParam(String[] requiredParam) {
-        this.requiredParam = requiredParam;
-    }
-
-    public boolean isAutoMove() {
-        return autoMove;
-    }
-
-    public void setAutoMove(boolean autoMove) {
-        this.autoMove = autoMove;
-    }
-}

+ 0 - 49
java110-generator/src/main/java/com/java110/code/back/GeneratorAbstractBussiness.java

@@ -1,49 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-
-import java.util.Map;
-
-public class GeneratorAbstractBussiness extends BaseGenerator {
-
-    /**
-     * 生成代码
-     *
-     * @param data
-     */
-    public void generator(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/template/AbstractBusinessServiceDataFlowListener.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("store", toLowerCaseFirstOne(data.getName()))
-                .replace("@@shareName@@", data.getShareName())
-                .replace("@@templateCode@@", data.getName())
-                .replace("Store", toUpperCaseFirstOne(data.getName()))
-                .replace("商户", data.getDesc())
-                .replace(data.getName() + "Id", data.getId())
-                .replace(data.getName() + "_id", data.getParams().get(data.getId()).toString());
-        Map<String, String> param = data.getParams();
-        String mappingContext = "";
-        String autoMappingContext = "";
-        for (String key : param.keySet()) {
-            if ("statusCd".equals(key) || "bId".equals(key)) {
-                continue;
-            }
-            mappingContext += "business" + toUpperCaseFirstOne(data.getName()) + "Info.put(\"" + key + "\",business" + toUpperCaseFirstOne(data.getName()) + "Info.get(\"" + param.get(key) + "\"));\n";
-            autoMappingContext += "current" + toUpperCaseFirstOne(data.getName()) + "Info.put(\"" + key + "\",current" + toUpperCaseFirstOne(data.getName()) + "Info.get(\"" + param.get(key) + "\"));\n";
-
-        }
-
-        mappingContext += "business" + toUpperCaseFirstOne(data.getName()) + "Info.remove(\"bId\");";
-
-        fileContext = fileContext.replace("$flushBusinessInfo$", mappingContext);
-        fileContext = fileContext.replace("$autoSaveDelBusiness$", autoMappingContext);
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/listener/" + data.getName() + "/Abstract" + toUpperCaseFirstOne(data.getName()) + "BusinessServiceDataFlowListener.java";
-        writeFile(writePath,
-                fileContext);
-//        System.out.println("看这里"+toUpperCaseFirstOne(data.getShareName()).toString());
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "service-" + data.getShareName() + "\\src\\main\\java\\com\\java110\\"+data.getShareName()+"\\listener\\" + data.getName() + "/Abstract" + toUpperCaseFirstOne(data.getName()) + "BusinessServiceDataFlowListener.java");
-        }
-    }
-}

+ 0 - 187
java110-generator/src/main/java/com/java110/code/back/GeneratorApiListener.java

@@ -1,187 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-import com.java110.code.web.GeneratorStart;
-
-import java.util.Map;
-
-public class GeneratorApiListener extends BaseGenerator {
-
-
-    /**
-     * 生成代码
-     *
-     * @param data
-     */
-    public void generator(Data data) throws Exception {
-        genneratorPo(data);             //API DataVo对象
-        genneratorSaveCmd(data);            //Api BmoImpl
-        genneratorUpdateBmoImpl(data);            //Api BmoImpl
-        genneratorDeleteBmoImpl(data);            //Api BmoImpl
-        genneratorGetBmoImpl(data);            //Api BmoImpl
-
-    }
-
-
-    private void genneratorPo(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/newTemplate/Po.txt").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-        Map columns = data.getParams();
-        String variable = "";
-        String variableGetSet = "";
-
-        for (Object key : columns.keySet()) {
-            //JSONObject column = columns.get(columnIndex);
-            //String key = column.getString("code");
-            if ("operate".equals(key) || "bId".equals(key) || "createTime".equals(key)) {
-                continue;
-            }
-
-            if ("statusCd".equals(key)) {
-                variable += "private String " + key.toString() + " = \"0\";\n";
-            } else {
-                variable += "private String " + key.toString() + ";\n";
-            }
-
-            variableGetSet += "public String get" + toUpperCaseFirstOne(key.toString()) + "() {\n"
-                    + "        return " + key + ";\n"
-                    + "    }\n";
-            variableGetSet += "public void set" + toUpperCaseFirstOne(key.toString()) + "(String " + key + ") {\n"
-                    + "        this." + key + " = " + key + ";\n"
-                    + "    }\n";
-        }
-
-        fileContext = fileContext.replace("@@templateColumns@@", variable + variableGetSet);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/po/" + data.getName() + "/" + toUpperCaseFirstOne(data.getName()) + "Po.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "java110-bean\\src\\main\\java\\com\\java110\\po\\" + data.getName() + "/" + toUpperCaseFirstOne(data.getName()) + "Po.java");
-        }
-    }
-
-
-    /**
-     * 生成API 侦听处理类
-     *
-     * @param data
-     */
-    private void genneratorSaveCmd(Data data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/newTemplate/SaveCmd.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("@@shareName@@", data.getShareName())
-                .replace("@@ShareName@@", toUpperCaseFirstOne(data.getShareName()));
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        StringBuffer validateStr = new StringBuffer();
-        for (String key : data.getRequiredParam()) {
-            //JSONObject column = columns.getJSONObject(columnIndex);
-            validateStr.append("Assert.hasKeyAndValue(reqJson, \"" + key + "\", \"请求报文中未包含" + key + "\");\n");
-
-        }
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/cmd/" + data.getName() + "/Save" + toUpperCaseFirstOne(data.getName()) + "Cmd.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "service-"+data.getShareName()+"\\src\\main\\java\\com\\java110\\"+data.getShareName()+"\\cmd\\" + data.getName() + "/Save" + toUpperCaseFirstOne(data.getName()) + "Cmd.java");
-        }
-    }
-
-    /**
-     * 生成API 侦听处理类
-     *
-     * @param data
-     */
-    private void genneratorUpdateBmoImpl(Data data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/newTemplate/UpdateCmd.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("@@shareName@@", data.getShareName())
-                .replace("@@ShareName@@", toUpperCaseFirstOne(data.getShareName()));
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        StringBuffer validateStr = new StringBuffer();
-        validateStr.append("Assert.hasKeyAndValue(reqJson, \"" + data.getId() + "\", \"" + data.getId() + "不能为空\");\n");
-        validateStr.append("Assert.hasKeyAndValue(reqJson, \"" + data.getShareParam() + "\", \"" + data.getShareParam() + "不能为空\");\n");
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/cmd/" + data.getName() + "/Update" + toUpperCaseFirstOne(data.getName()) + "Cmd.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "service-"+data.getShareName()+"\\src\\main\\java\\com\\java110\\"+data.getShareName()+"\\cmd\\" + data.getName() + "/Update" + toUpperCaseFirstOne(data.getName()) + "Cmd.java");
-        }
-    }
-
-    /**
-     * 生成API 侦听处理类
-     *
-     * @param data
-     */
-    private void genneratorDeleteBmoImpl(Data data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/newTemplate/DeleteCmd.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("@@shareName@@", data.getShareName())
-                .replace("@@ShareName@@", toUpperCaseFirstOne(data.getShareName()));
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-        StringBuffer validateStr = new StringBuffer();
-        validateStr.append("Assert.hasKeyAndValue(reqJson, \"" + data.getId() + "\", \"" + data.getId() + "不能为空\");\n");
-        validateStr.append("Assert.hasKeyAndValue(reqJson, \"" + data.getShareParam() + "\", \"" + data.getShareParam() + "不能为空\");\n");
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/cmd/" + data.getName() + "/Delete" + toUpperCaseFirstOne(data.getName()) + "Cmd.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "service-"+data.getShareName()+"\\src\\main\\java\\com\\java110\\"+data.getShareName()+"\\cmd\\" + data.getName() + "/Delete" + toUpperCaseFirstOne(data.getName()) + "Cmd.java");
-        }
-    }
-
-    /**
-     * 生成API 侦听处理类
-     *
-     * @param data
-     */
-    private void genneratorGetBmoImpl(Data data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/newTemplate/ListCmd.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("@@shareName@@", data.getShareName())
-                .replace("@@ShareName@@", toUpperCaseFirstOne(data.getShareName()));
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/cmd/" + data.getName() + "/List" + toUpperCaseFirstOne(data.getName()) + "Cmd.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "service-"+data.getShareName()+"\\src\\main\\java\\com\\java110\\"+data.getShareName()+"\\cmd\\" + data.getName() + "/List" + toUpperCaseFirstOne(data.getName()) + "Cmd.java");
-        }
-    }
-
-
-}

+ 0 - 70
java110-generator/src/main/java/com/java110/code/back/GeneratorDeleteInfoListener.java

@@ -1,70 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-
-import java.util.Map;
-
-public class GeneratorDeleteInfoListener extends BaseGenerator {
-
-
-
-
-
-    /**
-     * 生成代码
-     * @param data
-     */
-    public void generator(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/template/DeleteInfoListener.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("store",toLowerCaseFirstOne(data.getName()))
-                .replace("@@templateCode@@",data.getName())
-                .replace("@@shareName@@",data.getShareName())
-                .replace("Store",toUpperCaseFirstOne(data.getName()))
-                .replace("商户",data.getDesc())
-                .replace("BUSINESS_TYPE_DELETE_STORE_INFO",data.getDeleteBusinessTypeCd())
-                .replace(data.getName()+"Id", data.getId())
-                .replace(data.getName()+"_id", data.getParams().get(data.getId()).toString());
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/listener/" + data.getName() +"/Delete"+toUpperCaseFirstOne(data.getName())+"InfoListener.java";
-
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "service-" + data.getShareName()+ "\\src\\main\\java\\com\\java110\\"+data.getShareName()+"\\listener\\" + data.getName() + "/Delete" + toUpperCaseFirstOne(data.getName()) + "InfoListener.java");
-
-        }//生成协议
-
-        /**
-         * |businessstoreMember|memberTypeCd|1|String|30|成员类型|成员类型|
-         */
-        StringBuffer sbDoc = readFile(this.getClass().getResource("/template/serviceDoc.txt").getFile());
-        String fileContextDoc = sbDoc.toString();
-        fileContextDoc = fileContextDoc.replace("store",toLowerCaseFirstOne(data.getName()))
-                .replace("Store",toUpperCaseFirstOne(data.getName()))
-                .replace("商户",data.getDesc())
-                .replace("保存","删除")
-                .replace("$businessTypeCd$",data.getDeleteBusinessTypeCdValue());
-
-        Map<String,String> tmpParams = data.getParams();
-        String tmpLine = "";
-        String _tmpLine ="";
-            tmpLine += "|business"+toUpperCaseFirstOne(data.getName())+"Info|"+data.getId()+"|1|String|30|-|-|\n";
-            _tmpLine += "        \""+data.getId()+"\":\"填写存在的值\",\n";
-        _tmpLine = _tmpLine.substring(0,_tmpLine.lastIndexOf(","));
-        fileContextDoc = fileContextDoc.replace("$busienssInfo$",tmpLine);
-        fileContextDoc = fileContextDoc.replace("$businessInfoJson$",_tmpLine);
-        System.out.println(this.getClass().getResource("/listener").getPath());
-        String writePathDoc = this.getClass().getResource("/").getPath()
-                + "out/back/docs/" + data.getName() + "/Delete" + toUpperCaseFirstOne(data.getName()) + "Info.md";
-        writeFile(writePathDoc,
-                fileContextDoc);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "docs\\document\\services\\" + data.getName() + "/Delete" + toUpperCaseFirstOne(data.getName()) + "Info.md");
-            //生成协议
-        }
-
-    }
-}

+ 0 - 77
java110-generator/src/main/java/com/java110/code/back/GeneratorDtoBean.java

@@ -1,77 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-import com.java110.utils.util.DateUtil;
-
-import java.util.Map;
-
-/**
- *
- */
-public class GeneratorDtoBean extends BaseGenerator {
-
-
-    /**
-     * 拼装 查询数量
-     *
-     * @param data        数据
-     * @param fileContext 文件内容
-     * @return filContext 数据
-     */
-    private String dealVariableAndGetSet(Data data, String fileContext) {
-
-        Map<String, String> params = data.getParams();
-
-        String variable = "";
-        String variableGetSet = "";
-
-        for (String key : params.keySet()) {
-            if ("operate".equals(key) || "bId".equals(key) || "statusCd".equals(key)|| "createTime".equals(key)) {
-                continue;
-            }
-            variable += "private String " + key + ";\n";
-
-            variableGetSet += "public String get" + toUpperCaseFirstOne(key) + "() {\n"
-                    + "        return " + key + ";\n"
-                    + "    }\n";
-            variableGetSet += "public void set" + toUpperCaseFirstOne(key) + "(String " + key + ") {\n"
-                    + "        this." + key + " = " + key + ";\n"
-                    + "    }\n";
-
-
-        }
-
-
-        fileContext = fileContext.replace("$beanVariable$", variable);
-        fileContext = fileContext.replace("$beanVariableGetSet$", variableGetSet);
-
-        return fileContext;
-    }
-
-
-    /**
-     * 生成代码
-     *
-     * @param data 数据
-     */
-    public void generator(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/template/dto.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("store", toLowerCaseFirstOne(data.getName()))
-                .replace("@@templateCode@@",data.getName())
-                .replace("Store", toUpperCaseFirstOne(data.getName()))
-                .replace("商户", data.getDesc())
-                .replace("@@date@@", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
-
-        fileContext = dealVariableAndGetSet(data, fileContext);
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/dto/" + data.getName() + "/" + toUpperCaseFirstOne(data.getName()) + "Dto.java";
-
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "java110-bean\\src\\main\\java\\com\\java110\\dto\\" + data.getName() + "/" + toUpperCaseFirstOne(data.getName()) + "Dto.java");
-        }
-    }
-}

+ 0 - 33
java110-generator/src/main/java/com/java110/code/back/GeneratorIInnerServiceSMO.java

@@ -1,33 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-import com.java110.utils.util.DateUtil;
-
-/**
- * 内部服务类实现类
- */
-public class GeneratorIInnerServiceSMO extends BaseGenerator {
-
-    /**
-     * 生成代码
-     *
-     * @param data 数据
-     */
-    public void generator(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/newTemplate/IInnerServiceSMO.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("store", toLowerCaseFirstOne(data.getName()))
-                .replace("Store", toUpperCaseFirstOne(data.getName()))
-                .replace("@@shareName@@",data.getShareName())
-                .replace("商户", data.getDesc())
-                .replace("@@date@@", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/intf/" + data.getShareName() + "/I" + toUpperCaseFirstOne(data.getName()) + "V1InnerServiceSMO.java";
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "java110-interface\\src\\main\\java\\com\\java110\\intf\\" + data.getShareName() + "/I" + toUpperCaseFirstOne(data.getName()) + "V1InnerServiceSMO.java");
-        }
-    }
-}

+ 0 - 34
java110-generator/src/main/java/com/java110/code/back/GeneratorIServiceDaoListener.java

@@ -1,34 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-import com.java110.utils.util.DateUtil;
-
-public class GeneratorIServiceDaoListener extends BaseGenerator {
-
-
-
-
-
-    /**
-     * 生成代码
-     * @param data
-     */
-    public void generator(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/newTemplate/IServiceDao.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("store",toLowerCaseFirstOne(data.getName()))
-                .replace("@@shareName@@",data.getShareName())
-                .replace("Store",toUpperCaseFirstOne(data.getName()))
-                .replace("商户",data.getDesc())
-                .replace("@@date@@", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/dao/I"+toUpperCaseFirstOne(data.getName())+"V1ServiceDao.java";
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "service-" + data.getShareName()  + "\\src\\main\\java\\com\\java110\\"+data.getShareName()+"\\dao\\" + "I" + toUpperCaseFirstOne(data.getName()) + "V1ServiceDao.java");
-        }
-    }
-}

+ 0 - 34
java110-generator/src/main/java/com/java110/code/back/GeneratorInnerServiceSMOImpl.java

@@ -1,34 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-import com.java110.utils.util.DateUtil;
-
-/**
- * 内部服务类实现类
- */
-public class GeneratorInnerServiceSMOImpl extends BaseGenerator {
-
-    /**
-     * 生成代码
-     *
-     * @param data 数据
-     */
-    public void generator(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/newTemplate/InnerServiceSMOImpl.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("store", toLowerCaseFirstOne(data.getName()))
-                .replace("@@Id@@",toUpperCaseFirstOne(data.getId()))
-                .replace("@@shareName@@",data.getShareName())
-                .replace("Store", toUpperCaseFirstOne(data.getName()))
-                .replace("商户", data.getDesc())
-                .replace("@@date@@", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/smo/impl/" + toUpperCaseFirstOne(data.getName()) + "V1InnerServiceSMOImpl.java";
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath,"service-" + data.getShareName() + "\\src\\main\\java\\com\\java110\\"+data.getShareName()+"\\smo\\impl\\" + toUpperCaseFirstOne(data.getName()) + "V1InnerServiceSMOImpl.java");
-        }
-    }
-}

+ 0 - 81
java110-generator/src/main/java/com/java110/code/back/GeneratorSaveInfoListener.java

@@ -1,81 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-import org.springframework.util.StringUtils;
-
-import java.util.Map;
-
-public class GeneratorSaveInfoListener extends BaseGenerator {
-
-
-    /**
-     * 生成代码
-     *
-     * @param data
-     */
-    public void generator(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/template/SaveListener.txt").getFile());
-        String fileContext = sb.toString();
-        if (StringUtils.isEmpty(data.getShareParam())) {
-            data.setShareParam(data.getId());
-        }
-
-        if (StringUtils.isEmpty(data.getShareColumn())) {
-            data.setShareColumn(data.getParams().get(data.getShareColumn()).toString());
-        }
-        fileContext = fileContext.replace("store", toLowerCaseFirstOne(data.getName()))
-                .replace("@@templateCode@@", data.getName())
-                .replace("@@shareName@@", data.getShareName())
-                .replace("Store", toUpperCaseFirstOne(data.getName()))
-                .replace("商户", data.getDesc())
-                .replace("BUSINESS_TYPE_SAVE_STORE_INFO", data.getNewBusinessTypeCd())
-                .replace("stare_id", data.getShareColumn())
-                .replace("shareId", data.getShareParam())
-                .replace(data.getName() + "Id", data.getId())
-                .replace(data.getName() + "_id", data.getParams().get(data.getId()).toString());
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/listener/" + data.getName() + "/Save" + toUpperCaseFirstOne(data.getName()) + "InfoListener.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "service-" + data.getShareName() + "\\src\\main\\java\\com\\java110\\" + data.getShareName() + "\\listener\\" + data.getName() + "/Save" + toUpperCaseFirstOne(data.getName()) + "InfoListener.java");
-        }
-        //生成协议
-
-        /**
-         * |businessstoreMember|memberTypeCd|1|String|30|成员类型|成员类型|
-         */
-        StringBuffer sbDoc = readFile(this.getClass().getResource("/template/serviceDoc.txt").getFile());
-        String fileContextDoc = sbDoc.toString();
-        fileContextDoc = fileContextDoc.replace("store", toLowerCaseFirstOne(data.getName()))
-                .replace("Store", toUpperCaseFirstOne(data.getName()))
-                .replace("商户", data.getDesc())
-                .replace("$businessTypeCd$", data.getNewBusinessTypeCdValue());
-
-        Map<String, String> tmpParams = data.getParams();
-        String tmpLine = "";
-        String _tmpLine = "";
-        for (String key : tmpParams.keySet()) {
-            if ("operate".equals(key) || "statusCd".equals(key) || "bId".equals(key)) {
-                continue;
-            }
-            tmpLine += "|business" + toUpperCaseFirstOne(data.getName()) + "Info|" + key + "|1|String|30|-|-|\n";
-            _tmpLine += "        \"" + key + "\":\"填写具体值\",\n";
-        }
-        _tmpLine = _tmpLine.substring(0, _tmpLine.lastIndexOf(","));
-        fileContextDoc = fileContextDoc.replace("$busienssInfo$", tmpLine);
-        fileContextDoc = fileContextDoc.replace("$businessInfoJson$", _tmpLine);
-        System.out.println(this.getClass().getResource("/listener").getPath());
-        String writePathDoc = this.getClass().getResource("/").getPath()
-                + "out/back/docs/" + data.getName() + "/Save" + toUpperCaseFirstOne(data.getName()) + "Info.md";
-        writeFile(writePathDoc,
-                fileContextDoc);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "docs\\document\\services\\" + data.getName() + "/Save" + toUpperCaseFirstOne(data.getName()) + "Info.md");
-
-        }//生成协议
-    }
-}

+ 0 - 31
java110-generator/src/main/java/com/java110/code/back/GeneratorServiceDaoImplListener.java

@@ -1,31 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-import com.java110.utils.util.DateUtil;
-
-public class GeneratorServiceDaoImplListener extends BaseGenerator {
-
-
-    /**
-     * 生成代码
-     *
-     * @param data
-     */
-    public void generator(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/newTemplate/ServiceDaoImpl.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("store", toLowerCaseFirstOne(data.getName()))
-                .replace("@@shareName@@",data.getShareName())
-                .replace("Store", toUpperCaseFirstOne(data.getName()))
-                .replace("商户", data.getDesc())
-                .replace("@@date@@", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/dao/impl/" + toUpperCaseFirstOne(data.getName()) + "V1ServiceDaoImpl.java";
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "service-" + data.getShareName() + "\\src\\main\\java\\com\\java110\\"+data.getShareName()+"\\dao\\impl\\" + toUpperCaseFirstOne(data.getName()) + "V1ServiceDaoImpl.java");
-        }
-    }
-}

+ 0 - 236
java110-generator/src/main/java/com/java110/code/back/GeneratorServiceDaoImplMapperListener.java

@@ -1,236 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-
-import java.util.Map;
-
-public class GeneratorServiceDaoImplMapperListener extends BaseGenerator {
-
-
-    /**
-     * @param data
-     * @param fileContext
-     * @return
-     */
-    //insert into business_store(store_id,b_id,user_id,name,address,tel,store_type_cd,nearby_landmarks,map_x,map_y,month,operate)
-    //        values(#{storeId},#{bId},#{userId},#{name},#{address},#{tel},#{storeTypeCd},#{nearbyLandmarks},#{mapX},#{mapY},#{month},#{operate})
-    private String dealSaveBusinessInfo(Data data, String fileContext) {
-        String sql = "insert into " + data.getTableName() + "(\n";
-        String sqlValue = "\n) values (\n";
-
-        Map<String, String> params = data.getParams();
-
-        for (String key : params.keySet()) {
-            if ("statusCd".equals(key) ||"createTime".equals(key)) {
-                continue;
-            }
-            sql += params.get(key) + ",";
-            sqlValue += "#{" + key + "},";
-        }
-
-        sql = sql.endsWith(",") ? sql.substring(0, sql.length() - 1) : sql;
-        sqlValue = sqlValue.endsWith(",") ? sqlValue.substring(0, sqlValue.length() - 1) : sqlValue;
-
-        sql += (sqlValue + "\n)");
-
-        fileContext = fileContext.replace("$saveInfo$", sql);
-
-        return fileContext;
-
-    }
-
-
-    /**
-     * select s.store_id,s.b_id,s.user_id,s.name,s.address,s.tel,s.store_type_cd,s.nearby_landmarks,s.map_x,s.map_y,s.status_cd
-     * from s_store s
-     * where 1=1
-     * <if test="statusCd != null and statusCd != ''">
-     * and s.status_cd = #{statusCd}
-     * </if>
-     *
-     * <if test="bId != null and bId !=''">
-     * and s.b_id = #{bId}
-     * </if>
-     * <if test="storeId != null and storeId !=''">
-     * and s.store_id = #{storeId}
-     * </if>
-     *
-     * @param data
-     * @param fileContext
-     * @return
-     */
-    private String dealGetInfo(Data data, String fileContext) {
-        String sql = "select  ";
-        String sqlValue = " \nfrom " + data.getTableName() + " t \nwhere 1 =1 \n";
-
-        Map<String, String> params = data.getParams();
-
-        for (String key : params.keySet()) {
-            if ("operate".equals(key)) {
-                continue;
-            }
-            sql += ("t." + params.get(key) + ",");
-            if (!key.equals(params.get(key))) {
-                sql += ("t." + params.get(key) + " " + key + ",");
-            }
-            sqlValue += "<if test=\"" + key + " !=null and " + key + " != ''\">\n";
-            sqlValue += "   and t." + params.get(key) + "= #{" + key + "}\n";
-            sqlValue += "</if> \n";
-
-
-        }
-
-        //加入分页功能<if test="page != -1">
-        //            limit page,row
-        //        </if>
-        sqlValue += "order by t.create_time desc\n";
-        sqlValue += "<if test=\"page != -1 and page != null \">\n";
-        sqlValue += "   limit #{page}, #{row}\n";
-        sqlValue += "</if> \n";
-
-        sql = sql.endsWith(",") ? sql.substring(0, sql.length() - 1) : sql;
-
-        sql += sqlValue;
-
-        fileContext = fileContext.replace("$getInfo$", sql);
-
-        return fileContext;
-    }
-
-    /**
-     * update s_store s set s.status_cd = #{statusCd}
-     * <if test="newBId != null and newBId != ''">
-     * ,s.b_id = #{newBId}
-     * </if>
-     * <if test="userId != null and userId != ''">
-     * ,s.user_id = #{userId}
-     * </if>
-     * <if test="name != null and name != ''">
-     * ,s.name = #{name}
-     * </if>
-     * <if test="address != null and address != ''">
-     * ,s.address = #{address}
-     * </if>
-     * <if test="tel != null and tel != ''">
-     * ,s.tel = #{tel}
-     * </if>
-     * <if test="storeTypeCd != null and storeTypeCd != ''">
-     * ,s.store_type_cd = #{storeTypeCd}
-     * </if>
-     * <if test="nearbyLandmarks != null and nearbyLandmarks != ''">
-     * ,s.nearby_landmarks = #{nearbyLandmarks}
-     * </if>
-     * <if test="mapX != null and mapX != ''">
-     * ,s.map_x = #{mapX}
-     * </if>
-     * <if test="mapY != null and mapY != ''">
-     * ,s.map_y = #{mapY}
-     * </if>
-     * where 1=1
-     * <if test="bId != null and bId !=''">
-     * and s.b_id = #{bId}
-     * </if>
-     * <if test="storeId != null and storeId !=''">
-     * and s.store_id = #{storeId}
-     * </if>
-     */
-    private String dealUpdateInfoInstance(Data data, String fileContext) {
-        String sql = "update  " + data.getTableName() + " t set t.status_cd = #{statusCd}\n";
-        String sqlWhere = " where 1=1 ";
-
-        Map<String, String> params = data.getParams();
-
-        sql += "<if test=\"newBId != null and newBId != ''\">\n";
-        sql += ",t.b_id = #{newBId}\n";
-        sql += "</if> \n";
-
-        for (String key : params.keySet()) {
-            if ("operate".equals(key)) {
-                continue;
-            }
-
-            if ("statusCd".equals(key)) {
-                continue;
-            }
-            if (!"bId".equals(key) && !data.getId().equals(key)) {
-                sql += "<if test=\"" + key + " !=null and " + key + " != ''\">\n";
-                sql += ", t." + params.get(key) + "= #{" + key + "}\n";
-                sql += "</if> \n";
-            }
-
-            if ("bId".equals(key) || data.getId().equals(key)) {
-                sqlWhere += "<if test=\"" + key + " !=null and " + key + " != ''\">\n";
-                sqlWhere += "and t." + params.get(key) + "= #{" + key + "}\n";
-                sqlWhere += "</if> \n";
-            }
-        }
-
-        sql += sqlWhere;
-
-        fileContext = fileContext.replace("$updateInfoInstance$", sql);
-
-        return fileContext;
-
-
-    }
-
-    /**
-     * 拼装 查询数量
-     *
-     * @param data        数据
-     * @param fileContext 文件内容
-     * @return
-     */
-    private String dealGetCount(Data data, String fileContext) {
-        String sql = "select  count(1) count";
-        String sqlValue = " \nfrom " + data.getTableName() + " t \nwhere 1 =1 \n";
-
-        Map<String, String> params = data.getParams();
-
-        for (String key : params.keySet()) {
-            if ("operate".equals(key)) {
-                continue;
-            }
-            sqlValue += "<if test=\"" + key + " !=null and " + key + " != ''\">\n";
-            sqlValue += "   and t." + params.get(key) + "= #{" + key + "}\n";
-            sqlValue += "</if> \n";
-
-
-        }
-
-        sql = sql.endsWith(",") ? sql.substring(0, sql.length() - 1) : sql;
-
-        sql += sqlValue;
-
-        fileContext = fileContext.replace("$queryCount$", sql);
-
-        return fileContext;
-    }
-
-
-    /**
-     * 生成代码
-     *
-     * @param data
-     */
-    public void generator(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/newTemplate/ServiceDaoImplMapper.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("store", toLowerCaseFirstOne(data.getName()))
-                .replace("Store", toUpperCaseFirstOne(data.getName()))
-                .replace("商户", data.getDesc());
-        fileContext = dealSaveBusinessInfo(data, fileContext);
-        fileContext = dealGetInfo(data, fileContext);
-        fileContext = dealUpdateInfoInstance(data, fileContext);
-        fileContext = dealGetCount(data, fileContext);
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/mapper/" + data.getName() + "/" + toUpperCaseFirstOne(data.getName()) + "V1ServiceDaoImplMapper.xml";
-
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "java110-db\\src\\main\\resources\\mapper\\" + data.getShareName().toString() + "\\" + "/" + toUpperCaseFirstOne(data.getName()) + "V1ServiceDaoImplMapper.xml");
-        }
-    }
-}

+ 0 - 75
java110-generator/src/main/java/com/java110/code/back/GeneratorUpdateInfoListener.java

@@ -1,75 +0,0 @@
-package com.java110.code.back;
-
-import com.java110.code.util.FileUtilBase;
-
-import java.util.Map;
-
-/**
- * 更新类 代码生成器
- */
-public class GeneratorUpdateInfoListener extends BaseGenerator {
-
-
-    /**
-     * 生成代码
-     *
-     * @param data 数据分装对象@Data
-     */
-    public void generator(Data data) throws Exception {
-        StringBuffer sb = readFile(this.getClass().getResource("/template/UpdateInfoListener.txt").getFile());
-        String fileContext = sb.toString();
-        fileContext = fileContext.replace("store", toLowerCaseFirstOne(data.getName()))
-                .replace("@@templateCode@@", data.getName())
-                .replace("@@shareName@@", data.getShareName())
-                .replace("Store", toUpperCaseFirstOne(data.getName()))
-                .replace("商户", data.getDesc())
-                .replace("BUSINESS_TYPE_UPDATE_STORE_INFO", data.getUpdateBusinessTypeCd())
-                .replace(data.getName() + "Id", data.getId())
-                .replace(data.getName() + "_id", data.getParams().get(data.getId()).toString());
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/back/listener/" + data.getName() + "/Update" + toUpperCaseFirstOne(data.getName()) + "InfoListener.java";
-        writeFile(writePath,
-                fileContext);
-
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath,"service-" + data.getShareName() + "\\src\\main\\java\\com\\java110\\"+data.getShareName()+"\\listener\\" + data.getName() + "/Update" + toUpperCaseFirstOne(data.getName()) + "InfoListener.java");
-            //生成协议
-        }
-        /**
-         * |businessstoreMember|memberTypeCd|1|String|30|成员类型|成员类型|
-         */
-        StringBuffer sbDoc = readFile(this.getClass().getResource("/template/serviceDoc.txt").getFile());
-        String fileContextDoc = sbDoc.toString();
-        fileContextDoc = fileContextDoc.replace("store", toLowerCaseFirstOne(data.getName()))
-                .replace("Store", toUpperCaseFirstOne(data.getName()))
-                .replace("商户", data.getDesc())
-                .replace("保存", "修改")
-                .replace("$businessTypeCd$", data.getUpdateBusinessTypeCdValue());
-
-        Map<String, String> tmpParams = data.getParams();
-        String tmpLine = "";
-        String _tmpLine = "";
-        for (String key : tmpParams.keySet()) {
-            if ("operate".equals(key) || "statusCd".equals(key) || "bId".equals(key)) {
-                continue;
-            }
-            tmpLine += "|business" + toUpperCaseFirstOne(data.getName()) + "Info|" + key + "|1|String|30|-|-|\n";
-            _tmpLine += "        \"" + key + "\":\"填写具体值\",\n";
-        }
-        _tmpLine = _tmpLine.substring(0, _tmpLine.lastIndexOf(","));
-        fileContextDoc = fileContextDoc.replace("$busienssInfo$", tmpLine);
-        fileContextDoc = fileContextDoc.replace("$businessInfoJson$", _tmpLine);
-        System.out.println(this.getClass().getResource("/listener").getPath());
-        String writePathDoc = this.getClass().getResource("/").getPath()
-                + "out/back/docs/" + data.getName() + "/Update" + toUpperCaseFirstOne(data.getName()) + "Info.md";
-        writeFile(writePathDoc,
-                fileContextDoc);
-        //复制生成的文件到对应分区目录下
-        if (data.isAutoMove()) {
-            FileUtilBase.copyfile(writePath, "docs\\document\\services\\" + data.getName() + "/Update" + toUpperCaseFirstOne(data.getName()) + "Info.md");
-            //生成协议
-        }
-    }
-}

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 9711
java110-generator/src/main/java/com/java110/code/cnJson.json


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 9709
java110-generator/src/main/java/com/java110/code/enJson.json


+ 0 - 460
java110-generator/src/main/java/com/java110/code/relationship/GeneratorBindingComponent.java

@@ -1,460 +0,0 @@
-package com.java110.code.relationship;
-
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.back.BaseGenerator;
-import com.java110.code.web.GeneratorStart;
-import org.springframework.util.StringUtils;
-
-public class GeneratorBindingComponent extends BaseGenerator {
-
-    public void generator(JSONObject data) {
-
-        //处理组件
-        generatorComponentHtml(data);
-        generatorComponentJs(data);
-        generatorComponentJava(data);
-//        genneratorIListSmo(data);
-//        genneratorListSmoImpl(data);
-
-
-//        genneratorListListener(data);
-
-//        genneratorServiceCodeConstant(data);
-
-
-    }
-
-    private void genneratorAddHtml(JSONObject data, String componentName) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/add/add.html").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceBindingTemplateContext(fileContext, data);
-
-        // 处理 th 信息
-
-        StringBuffer thSb = new StringBuffer();
-
-        JSONObject _currentObj = data.getJSONObject("components").getJSONObject(componentName);
-
-        JSONArray columns = _currentObj.getJSONArray("columns");
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            if ("none".equals(column.getString("inputType"))) {
-                continue;
-            }
-            String required = column.getBoolean("required") ? "必填" : "选填";
-            String inputStr = "";
-            if ("select".equals(column.getString("inputType"))) {
-
-                String[] selectValues = column.getString("selectValue").split(",");
-                String[] selectValueNames = column.getString("selectValueName").split(",");
-
-
-                String option = "";
-                for (int valueIndex = 0; valueIndex < selectValues.length; valueIndex++) {
-
-                    String value = selectValues[valueIndex];
-
-                    option += "<option  value=\"" + value + "\">" + selectValueNames[valueIndex] + "</option>\n";
-
-                }
-
-                inputStr = "<select class=\"custom-select\" v-model=\"" + _currentObj.getString("templateCode") + "ViewInfo." + column.getString("code") + "\">\n" +
-                        "         <option selected  disabled value=\"\">" + required + ",请选择" + column.getString("cnCode") + "</option>\n" +
-                        "         " + option +
-                        "  </select>";
-            } else if ("textarea".equals(column.getString("inputType"))) {
-                inputStr = "<textarea  placeholder=\"" + required + ",请填写" + column.getString("cnCode") + "\" class=\"form-control\"" +
-                        " v-model=\"" + _currentObj.getString("templateCode") + "ViewInfo." + column.getString("code") + "\">" +
-                        "</textarea>";
-            } else {
-                inputStr = "           <input v-model=\"" + _currentObj.getString("templateCode") + "ViewInfo." + column.getString("code") + "\" " +
-                        "                  type=\"text\" placeholder=\"" + required + ",请填写" + column.getString("cnCode") + "\" class=\"form-control\">\n";
-            }
-            thSb.append("<div class=\"form-group row\">\n" +
-                    "         <label class=\"col-sm-2 col-form-label\">" + column.getString("cnCode") + "</label>\n" +
-                    "         <div class=\"col-sm-10\">\n" +
-                    inputStr +
-                    "         </div>\n" +
-                    "</div>\n");
-
-        }
-
-        fileContext = fileContext.replace("@@addTemplateColumns@@", thSb.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/relationship/component/" + _currentObj.getString("package") + "/" + _currentObj.getString("templateCode") + "View/" + _currentObj.getString("templateCode") + "View.html";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorAddJs(JSONObject data, String componentName) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/add/add.js").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceBindingTemplateContext(fileContext, data);
-
-
-        JSONObject _currentObj = data.getJSONObject("components").getJSONObject(componentName);
-        fileContext = fileContext.replace("@@columnTemplateCode@@", _currentObj.getString("templateCode"));
-        fileContext = fileContext.replace("@@ColumnTemplateCode@@", toUpperCaseFirstOne(_currentObj.getString("templateCode")));
-
-        //替换 变量@@templateCodeColumns@@
-        JSONArray columns = _currentObj.getJSONArray("columns");
-
-        StringBuffer variable = new StringBuffer();
-        String defaultValue = "";
-
-        String validateInfo = "";
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            defaultValue = column.getBoolean("hasDefaultValue") ? column.getString("defaultValue") : "";
-            defaultValue = "'" + defaultValue + "'";
-            variable.append(column.getString("code") + ":" + defaultValue + ",\n");
-
-            validateInfo += "'" + _currentObj.getString("templateCode") + "ViewInfo." + column.getString("code") + "':[\n";
-            if (column.getBoolean("required")) {
-                validateInfo += "{\n" +
-                        "                            limit:\"required\",\n" +
-                        "                            param:\"\",\n" +
-                        "                            errInfo:\"" + column.getString("cnCode") + "不能为空\"\n" +
-                        "                        },\n";
-            }
-
-            if (column.containsKey("limit") && !StringUtils.isEmpty(column.getString("limit"))) {
-                validateInfo += " {\n" +
-                        "                            limit:\"" + column.getString("limit") + "\",\n" +
-                        "                            param:\"" + column.getString("limitParam") + "\",\n" +
-                        "                            errInfo:\"" + column.getString("limitErrInfo") + "\"\n" +
-                        "                        },\n" +
-                        "                    ],\n";
-            }
-
-        }
-        fileContext = fileContext.replace("@@templateCodeColumns@@", variable.toString());
-        fileContext = fileContext.replace("@@addTemplateCodeValidate@@", validateInfo);
-
-        // 替换 数据校验部分代码
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/relationship/component/" + _currentObj.getString("package") + "/" + _currentObj.getString("templateCode") + "View/" + _currentObj.getString("templateCode") + "View.js";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成常量类
-     *
-     * @param data
-     */
-    private void genneratorServiceCodeConstant(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/constant/ServiceCodeConstant.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceBindingTemplateContext(fileContext, data);
-
-        String variable = data.getString("package").indexOf("Package") >0 ?
-                    data.getString("package").replace("Package","") :
-                    data.getString("package");
-        variable += ("." + data.getString("templateCode"));
-        fileContext = fileContext.replace("@@constantVariable@@", variable);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/relationship/constant/" + data.getString("templateCode") + "/ServiceCode" + toUpperCaseFirstOne(data.getString("templateCode")) + "Constant.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentHtml(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/binding/binding.html").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceBindingTemplateContext(fileContext, data);
-
-        //  @@allStep@@
-
-        StringBuffer allStep = new StringBuffer();
-
-        JSONArray flows = data.getJSONArray("flows");
-        for (int flowIndex = 0; flowIndex < flows.size(); flowIndex++) {
-            JSONObject flow = flows.getJSONObject(flowIndex);
-            String showAffirmPage = data.getBoolean("needAffirm") ? " || " + data.getString("templateCode") + "Info.index == " + flows.size() : "";
-            allStep.append("<div v-if=\"" + data.getString("templateCode") + "Info.index == " + flowIndex + showAffirmPage + "\">\n" +
-                    "        <vc:create path=\"" + flow.getString("vcName") + "\"\n" +
-                    "                   callBackListener=\"" + data.getString("templateCode") + "\"\n" +
-                    "                   callBackFunction=\"notify\"\n" +
-                    "        ></vc:create>\n" +
-                    "    </div>\n");
-            //如果相应组件不存在,则根据组件配置自动生成
-            if (!flow.getBoolean("existsComponent")) {
-                genneratorAddHtml(data, flow.getString("vcName"));
-            }
-        }
-
-        int stepLastIndex = data.getBoolean("needAffirm") ? flows.size() : flows.size() - 1;
-        fileContext = fileContext.replace(" @@allStep@@", allStep.toString())
-                .replace("@@stepLastIndex@@", stepLastIndex + "");
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/relationship/component/" + data.getString("package") + "/" + data.getString("templateCode") + "/" + data.getString("templateCode") + ".html";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJs(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/binding/binding.js").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceBindingTemplateContext(fileContext, data);
-
-        //替换 变量@@templateCodeColumns@@
-        JSONArray columns = data.getJSONArray("columns");
-
-        StringBuffer variable = new StringBuffer();
-        String defaultValue = "";
-
-        StringBuffer validateInfo = new StringBuffer();
-        StringBuffer allStep = new StringBuffer("[");
-        JSONArray flows = data.getJSONArray("flows");
-        for (int flowIndex = 0; flowIndex < flows.size(); flowIndex++) {
-            JSONObject flow = flows.getJSONObject(flowIndex);
-            allStep.append("\"" + flow.getString("cnCode") + "\"");
-            if (flowIndex < flows.size() - 1) {
-                allStep.append(",");
-            }
-
-
-            validateInfo.append("vc.emit('" + flow.getString("vcName") + "', 'onIndex', vc.component."+data.getString("templateCode")+"Info.index);\n");
-
-            //如果相应组件不存在,则根据组件配置自动生成
-            if (!flow.getBoolean("existsComponent")) {
-                generatorAddJs(data, flow.getString("vcName"));
-            }
-
-        }
-        String showAffirmPage = data.getBoolean("needAffirm") ? "确认信息" : "";
-        allStep.append(showAffirmPage);
-        allStep.append("]");
-        fileContext = fileContext.replace("@@stepTitle@@", allStep.toString());
-        fileContext = fileContext.replace("@@notifyOnIndex@@", validateInfo.toString());
-        fileContext = fileContext.replace("@@jumpUrl@@", data.getString("successUrl"));
-
-        // 替换 数据校验部分代码
-
-        String needCheckCurrentData = "var _currentData = vc.component."+data.getString("templateCode")+"Info.infos[vc.component."+data.getString("templateCode")+"Info.index];\n" +
-                "                if( _currentData == null || _currentData == undefined){\n" +
-                "                    vc.message(\"请选择或填写必选信息\");\n" +
-                "                    return ;\n" +
-                "                }";
-
-        if(data.getBoolean("needAffirm")){
-            fileContext = fileContext.replace("@@needCheckCurrentData@@", "");
-        }else{
-            fileContext = fileContext.replace("@@needCheckCurrentData@@", needCheckCurrentData);
-        }
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/relationship/component/" + data.getString("package") + "/" + data.getString("templateCode") + "/" + data.getString("templateCode") + ".js";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJava(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/binding/BindingComponent.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceBindingTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/relationship/component/java/" + data.getString("templateCode") + "/" + toUpperCaseFirstOne(data.getString("templateCode")) + "BindingComponent.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成接口类
-     *
-     * @param data
-     */
-    private void genneratorIListSmo(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/binding/IBindingSMO.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceBindingTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/relationship/smo/" + data.getString("templateCode") + "/I" + toUpperCaseFirstOne(data.getString("templateCode")) + "BindingSMO.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-    }
-
-    /**
-     * 生成接口类
-     *
-     * @param data
-     */
-    private void genneratorListSmoImpl(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/binding/BindingSMOImpl.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceBindingTemplateContext(fileContext, data);
-
-        //替换校验部分代码 @@validateTemplateColumns@@
-
-        JSONArray flows = data.getJSONArray("flows");
-        StringBuffer validateStr = new StringBuffer();
-        for (int flowIndex = 0; flowIndex < flows.size(); flowIndex++) {
-
-            JSONObject flowObj = flows.getJSONObject(flowIndex);
-
-            if (flowObj.containsKey("existsComponent") && flowObj.getBoolean("existsComponent")) {
-                continue;
-            }
-
-            String vcName = flowObj.getString("vcName");
-
-            JSONObject vcObject = data.getJSONObject("components").getJSONObject(vcName);
-
-            JSONArray columns = vcObject.getJSONArray("columns");
-
-            for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-                JSONObject column = columns.getJSONObject(columnIndex);
-                if (column.getBoolean("required")) {
-                    validateStr.append("Assert.hasKeyByFlowData(infos, \"" + flowObj.getString("vcName") + "\", \"" + column.getString("code") + "\", \"" + column.getString("desc") + "\");\n");
-                }
-            }
-        }
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/relationship/smo/" + data.getString("templateCode") + "/impl/" + toUpperCaseFirstOne(data.getString("templateCode")) + "BindingSMOImpl.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-    }
-
-    /**
-     * 生成API 侦听处理类
-     *
-     * @param data
-     */
-    private void genneratorListListener(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/binding/BindingListener.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceBindingTemplateContext(fileContext, data);
-
-        //替换校验部分代码 @@validateTemplateColumns@@
-        JSONArray flows = data.getJSONArray("flows");
-        StringBuffer validateStr = new StringBuffer();
-        StringBuffer variableStr = new StringBuffer();
-
-        StringBuffer ifCode = new StringBuffer();
-
-        StringBuffer methodCode = new StringBuffer();
-        for (int flowIndex = 0; flowIndex < flows.size(); flowIndex++) {
-
-            JSONObject flowObj = flows.getJSONObject(flowIndex);
-
-            String vcName = flowObj.getString("vcName");
-
-            variableStr.append("JSONObject " + vcName + " = getObj(infos, \"" + vcName + "\");\n");
-
-            ifCode.append("" +
-                    "        if(!hasKey("+vcName+", \"" + flowObj.getString("flowKey") + "\")){\n" +
-                    "             "+vcName+".put(\"" + flowObj.getString("flowKey") + "\", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_" + flowObj.getString("flowKey") + "));\n" +
-                    "             "+vcName+".put(\"userId\", context.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID));\n" +
-                    "             businesses.add(add" + toUpperCaseFirstOne(flowObj.getString("businessName")) + "("+vcName+", context));\n" +
-                    "        }\n");
-
-
-            methodCode.append("private JSONObject add"+toUpperCaseFirstOne(flowObj.getString("businessName"))+"(JSONObject paramInJson, DataFlowContext dataFlowContext) {\n" +
-                    "        JSONObject business = JSONObject.parseObject(\"{\\\"datas\\\":{}}\");\n" +
-                    "        business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant."+flowObj.getString("businessType")+");\n" +
-                    "        business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ);\n" +
-                    "        business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);\n" +
-                    "        JSONObject businessObj = new JSONObject();\n" +
-                    "        businessObj.putAll(paramInJson);\n" +
-                    "        //计算 应收金额\n" +
-                    "        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(\""+flowObj.getString("businessName")+"\", businessObj);\n" +
-                    "        return business;\n" +
-                    "    }\n");
-            if (flowObj.containsKey("existsComponent") && flowObj.getBoolean("existsComponent")) {
-                continue;
-            }
-
-
-            JSONObject vcObject = data.getJSONObject("components").getJSONObject(vcName);
-
-            JSONArray columns = vcObject.getJSONArray("columns");
-
-            for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-                JSONObject column = columns.getJSONObject(columnIndex);
-                if (column.getBoolean("required")) {
-                    validateStr.append("Assert.hasKeyByFlowData(infos, \"" + flowObj.getString("vcName") + "\", \"" + column.getString("code") + "\", \"" + column.getString("desc") + "\");\n");
-                }
-            }
-        }
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-        fileContext = fileContext.replace("@@doSoService@@", variableStr.toString() + ifCode.toString());
-        fileContext = fileContext.replace("@@bindingMethod@@", methodCode.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/api/listener/" + data.getString("templateCode") + "/" + toUpperCaseFirstOne(data.getString("templateCode")) + "Binding"+"Listener.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-    }
-
-
-}

+ 0 - 45
java110-generator/src/main/java/com/java110/code/relationship/GeneratorFlow.java

@@ -1,45 +0,0 @@
-package com.java110.code.relationship;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.back.BaseGenerator;
-import com.java110.code.web.GeneratorStart;
-
-public class GeneratorFlow extends BaseGenerator {
-
-    public void generator(JSONObject data) {
-
-        //处理组件
-//        generatorComponentHtml(data);
-
-
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentHtml(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/flow.html").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceBindingTemplateContext(fileContext, data);
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/relationship/" + data.getString("templateCode") + "/" + data.getString("templateCode") + "Flow.html";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-
-
-
-}

+ 0 - 29
java110-generator/src/main/java/com/java110/code/relationship/GeneratorRelationShipStart.java

@@ -1,29 +0,0 @@
-package com.java110.code.relationship;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.back.BaseGenerator;
-import com.java110.code.web.GeneratorStart;
-
-/**
- * @ClassName GeneratorRelationShipStart
- * @Description  生成关系流程页面 可以参考 登录dev/admin 打开服务绑定 https://demo.java110.com/flow/serviceBindingFlow
- * @Author wuxw
- * @Date 2019/7/27 11:48
- * @Version 1.0
- * add by wuxw 2019/7/27
- **/
-public class GeneratorRelationShipStart extends BaseGenerator {
-
-    public static void main(String[] args) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/relationship/template_complaint.json").getFile());
-
-        JSONObject data = JSONObject.parseObject(sb.toString());
-
-        GeneratorBindingComponent generatorBindingComponent = new GeneratorBindingComponent();
-        generatorBindingComponent.generator(data);
-
-        GeneratorFlow generatorFlow = new GeneratorFlow();
-        generatorFlow.generator(data);
-    }
-}

+ 0 - 81
java110-generator/src/main/java/com/java110/code/translate.java

@@ -1,81 +0,0 @@
-package com.java110.code;
-
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.parser.Feature;
-import com.java110.utils.util.StringUtil;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.util.Set;
-
-/**
- * @ClassName translate
- * @Description TODO
- * @Author wuxw
- * @Date 2022/4/21 10:37
- * @Version 1.0
- * add by wuxw 2022/4/21
- **/
-public class translate {
-
-    public static void main(String[] args) throws Exception {
-        String enJsonStr = getJsonStr("C:\\project\\vip\\0911\\MicroCommunity\\java110-generator\\src\\main\\java\\com\\java110\\code\\enJson.json");
-        String cnJsonStr = getJsonStr("C:\\project\\vip\\0911\\MicroCommunity\\java110-generator\\src\\main\\java\\com\\java110\\code\\cnJson.json");
-
-
-        JSONObject enJson = JSONObject.parseObject(enJsonStr, Feature.OrderedField);
-        JSONObject cnJson = JSONObject.parseObject(cnJsonStr, Feature.OrderedField);
-
-        for (String key : cnJson.keySet()) {
-            Object keyValue = cnJson.get(key);
-            if (keyValue instanceof JSONObject) {
-                JSONObject keyObj = cnJson.getJSONObject(key);
-                int keyIndex = 0;
-                for(String subKeyObj :keyObj.keySet()){
-                   String value = getObjValue(enJson,key,keyIndex);
-                   keyObj.put(subKeyObj,value);
-                    keyIndex++;
-                }
-            }
-        }
-
-        System.out.println(cnJson.toJSONString());
-    }
-
-    public static String getObjValue(JSONObject enJson, String objKey, int keyIndex) {
-        JSONObject jsonObject = null;
-        if(StringUtil.isEmpty(objKey)){
-            jsonObject = enJson;
-        }else{
-            jsonObject = enJson.getJSONObject(objKey);
-        }
-        if(jsonObject == null){
-            return "";
-        }
-        int index = 0;
-        for (String key : jsonObject.keySet()) {
-            if (index == keyIndex) {
-                return jsonObject.getString(key);
-            }
-            index++;
-        }
-
-        return "";
-
-    }
-
-    public static String getJsonStr(String jsonStr) throws Exception {
-        File file = new File(jsonStr);
-        BufferedReader in = new BufferedReader(new FileReader(file));
-        String str;
-        String context = "";
-        while ((str = in.readLine()) != null) {
-            context += (str + "\n");
-            //doDealHtmlNode(str,fileName);
-        }
-        return context;
-    }
-
-
-}

+ 0 - 456
java110-generator/src/main/java/com/java110/code/util/FileUtilBase.java

@@ -1,456 +0,0 @@
-package com.java110.code.util;
-
-
-import java.io.BufferedReader;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URL;
-import java.nio.ByteBuffer;
-import java.nio.channels.FileChannel;
-import java.util.Date;
-
-
-
-
-public class FileUtilBase {
-
-	 public static void save(byte[] body, File file) throws IOException {
-		 writeToFile(body, file);
-	 }
-
-	 public static void save(byte[] body, String fileName, String filePath)
-	 throws IOException{
-		 writeToFile(body, fileName, filePath);
-	 }
-
-
-
-	/***************************************************************************
-	 * 删除指定目录结构
-	 *
-	 * @param directoryName
-	 */
-	protected static void deleteFileDirectory(String filePath) {
-		/**
-		 * 指定删除目录路径构造一个文件对象
-		 *
-		 */
-		File file = new File(filePath);
-
-		File[] fileList = file.listFiles();
-		/**
-		 * 初始化子目录路径
-		 */
-		String dirPath = null;
-
-		if (fileList != null)
-			for (int i = 0; i < fileList.length; i++) {
-				/**
-				 * 如果是文件就将其删除
-				 */
-				if (fileList[i].isFile())
-					fileList[i].delete();
-				/**
-				 * 如果是目录,那么将些目录下所有文件删除后再将其目录删除,
-				 */
-				if (fileList[i].isDirectory()) {
-
-					dirPath = fileList[i].getPath();
-					// 递归删除指定目录下所有文件
-					deleteFileDirectory(dirPath);
-				}
-			}
-		/**
-		 * 删除给定根目录
-		 */
-		file.delete();
-	}
-
-	/**
-	 * 把文件读取到byte[]中
-	 *
-	 * @param fileName
-	 * @return
-	 * @throws FileNotFoundException
-	 */
-	protected static byte[] getFileByte(String fileName, boolean isDelete)
-			throws FileNotFoundException {
-		FileInputStream fileInputStream = new FileInputStream(fileName);
-		byte[] buffer = getFileByte(fileInputStream);
-		if (isDelete) {
-			new File(fileName).delete();
-		}
-		return buffer;
-	}
-
-	/**
-	 * 将byte[]写入文件
-	 *
-	 * @param buffer
-	 * @param file
-	 * @throws IOException
-	 */
-	protected static File writeToFile(byte[] buffer, String fileName,
-			String filePath) throws IOException {
-		File dir = new File(filePath);
-
-		if (!dir.exists()) {
-			dir.mkdirs();
-		}
-		String abPath = filePath.concat(fileName);
-		File file = new File(abPath);
-		if (!file.exists()) {
-			file.createNewFile();
-		}
-		FileOutputStream out = new FileOutputStream(file);
-		out.write(buffer);
-		out.close();
-		return file;
-	}
-
-	/**
-	 * 将byte[]写入文件
-	 *
-	 * @param buffer
-	 * @param file
-	 * @throws IOException
-	 */
-	protected static File writeToFile(byte[] buffer, File file) throws IOException {
-
-		FileOutputStream out = new FileOutputStream(file);
-		out.write(buffer);
-		out.close();
-		return file;
-	}
-
-	/**
-	 * 把URL中的数据读取到byte[]中
-	 *
-	 * @param url
-	 * @return
-	 * @throws IOException
-	 */
-	protected static byte[] getFileByte(URL url) throws IOException {
-		if (url != null) {
-			return getFileByte(url.openStream());
-		} else {
-			return null;
-		}
-	}
-
-	/**
-	 * 从IS中获取byte[]
-	 *
-	 * @param in
-	 * @return
-	 */
-	protected static byte[] getFileByte(InputStream in) {
-		ByteArrayOutputStream out = new ByteArrayOutputStream(4096);
-		try {
-			copy(in, out);
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
-		return out.toByteArray();
-	}
-
-	protected static void copy(InputStream in, OutputStream out)
-			throws IOException {
-		try {
-			byte[] buffer = new byte[4096];
-			int nrOfBytes = -1;
-			while ((nrOfBytes = in.read(buffer)) != -1) {
-				out.write(buffer, 0, nrOfBytes);
-			}
-			out.flush();
-		} catch (IOException e) {
-		} finally {
-			try {
-				if (in != null) {
-					in.close();
-				}
-			} catch (IOException ex) {
-			}
-			try {
-				if (out != null) {
-					out.close();
-				}
-			} catch (IOException ex) {
-			}
-		}
-	}
-	/**
-	 * 截取路径文件名,包括扩展名
-	 * @param fileName
-	 * @return
-	 */
-	public static String getFileNameSuff(String fileName) {
-		return fileName.substring(fileName.lastIndexOf("/")+1);
-	}
-	/**
-	 * 以路径最后斜杠位置加1开始取,取到扩展名。不包括扩展名
-	 * @param fileName
-	 * @return
-	 */
-	public static String getFileName(String fileName) {
-		int pos = fileName.lastIndexOf(".");
-		if(pos==-1){
-			return fileName;
-		}
-		return fileName.substring(fileName.lastIndexOf("/")+1,pos);
-
-	}
-	/**
-	 * 复制文件
-	 *
-	 * @param f1
-	 *            当前文件流
-	 * @param f2
-	 *            目标文件流
-	 * @return
-	 * @throws Exception
-	 */
-	public static long copyfile(File f1, File f2) throws Exception {
-		mkdirs(f2.getParent());
-		if (f2.exists() && f2.isFile()) {
-			f2.delete();
-		}
-		System.out.println("添加:"+f2.getAbsolutePath());
-		long time = new Date().getTime();
-		int length = 2097152;
-		FileInputStream in = new FileInputStream(f1);
-		FileOutputStream out = new FileOutputStream(f2);
-		FileChannel inC = in.getChannel();
-		FileChannel outC = out.getChannel();
-		ByteBuffer b = null;
-		while (true) {
-			if (inC.position() == inC.size()) {
-				inC.close();
-				outC.close();
-				return new Date().getTime() - time;
-			}
-			if ((inC.size() - inC.position()) < length) {
-				length = (int) (inC.size() - inC.position());
-			} else
-				length = 2097152;
-			b = ByteBuffer.allocateDirect(length);
-			inC.read(b);
-			b.flip();
-			outC.write(b);
-			outC.force(false);
-		}
-
-	}
-	public static long copyfile(String filePath1, String filePath2) throws Exception {
-		File f1=new File(filePath1);
-		File f2=new File(filePath2);
-		return copyfile(f1,f2);
-
-	}
-
-
-	/**
-	 *  创建文件夹及父节点
-	 * @param file
-	 */
-	public static void mkdirs(File file){
-		if(file.isFile()){
-			file=new File(file.getParent());
-		}
-		if(!file.exists()){
-			file.mkdirs();
-        }
-	}
-	/**
-	 *  创建文件夹及父节点
-	 * @param file
-	 */
-	public static void mkdirs(String filePath){
-		File file = new File(filePath);
-		mkdirs(file);
-	}
-	/**
-	 *  先创建父节点,再创建文件
-	 * @param file
-	 * @throws IOException
-	 */
-	public static void createrFile(File file) throws IOException{
-		mkdirs(file.getParent()); // 判断父节点是否存在
-		if(!file.exists()){
-			file.createNewFile();
-		}
-	}
-
-	/**
-	 * 把字节写入文件中
-	 * @param buffer
-	 * @param file
-	 * @return
-	 * @throws IOException
-	 */
-	public static File writeNewFile(byte[] buffer, File file) throws IOException{
-		return writeToFile(buffer, file);
-	}
-
-	/**
-	 * 删除文件
-	 * @param file File 对象
-	 */
-	public static void deleteFile(File file) {
-		System.out.println("删除文件:"+file.getAbsolutePath());
-		file.delete();
-	}
-	/**
-	 * 删除文件
-	 * @param filePath
-	 */
-	public static void deleteFile(String filePath) {
-		deleteFile(new File(filePath));
-	}
-	/**
-	 *  创建父节点目录,
-	 *  判断删除文件2并复制文件1到文件2
-	 * @param f1 当前文件流
-	 * @param f2 目标文件流
-	 * @return
-	 * @throws Exception
-	 */
-	public static void deleteAndCopyFile(File file1, File file2) throws Exception {
-		mkdirs(file2.getParent());
-		if (file2.exists() && file2.isFile()) {
-			file2.delete();
-		}
-		if(file1.exists() && file1.isFile()){
-			copyfile(file1, file2);
-			file1.delete();
-		}
-	}
-
-	/**
-	 *  创建父节点目录,
-	 *  判断删除文件2并复制文件1到文件2
-	 *
-	 * @param f1
-	 *            当前文件流
-	 * @param f2
-	 *            目标文件流
-	 * @return
-	 * @throws Exception
-	 */
-	public static void deleteAndCopyFile(String file1Path, String file2Path) throws Exception {
-		File file1 = new File(file1Path);
-		File file2 = new File(file2Path);
-		deleteAndCopyFile(file1, file2);
-	}
-	/**
-	 * 获得文件的扩展名 含 标点符号
-	 * @param fileName
-	 * @return
-	 */
-	public static String getExtention(String fileName) {
-		int pos = fileName.lastIndexOf(".");
-		if(pos+1<fileName.length()){
-			return fileName.substring(pos);
-		}
-		return "";
-	}
-	/**
-	 * 获得文件的扩展名  不含标点符号
-	 * @param fileName
-	 * @return
-	 */
-	public static String getFileType(String fileName) {
-		int pos = fileName.lastIndexOf(".");
-		if(pos+1<fileName.length()){
-			return fileName.substring(pos+1);
-		}
-		return "";
-	}
-	/**
-	 * 根据路径获得文件内容
-	 * @param fileName
-	 * @return
-	 */
-	public static String getFileContent(String filePath) {
-		File file = new File(filePath);
-		return getFileContent(file);
-	}
-	/**
-	 * 根据File对象获得文件内容
-	 * @param fileName
-	 * @return
-	 */
-	public static String getFileContent(File file) {
-		String htmlCode = "";
-		try {
-			String encoding = "UTF-8";
-			if (file.isFile() && file.exists()) { // 判断文件是否存在
-
-				BufferedReader bufferedReader = new BufferedReader(new UnicodeReader(new FileInputStream(file), encoding));
-				String lineTxt = null;
-				while ((lineTxt = bufferedReader.readLine()) != null) {
-					htmlCode += lineTxt;
-				}
-				bufferedReader.close();
-			} else {
-				System.out.println("找不到指定的文件");
-			}
-		} catch (Exception e) {
-			System.out.println("读取文件内容出错");
-			e.printStackTrace();
-		}
-		return htmlCode;
-	}
-	public static void upload(String filePath, String saveAsFileName,File upload) throws Exception {
-		if (upload != null) {
-
-			if (!filePath.equals("")) {
-				File file = new File(filePath);
-				if (!file.exists()) {
-					file.mkdirs();
-				}
-			}
-			filePath =filePath.concat(saveAsFileName);
-			File imageFile = new File(filePath);
-			deleteAndCopyFile(upload, imageFile);
-		}
-	}
-
-
-
-
-	/**
-	 * 文件字节大小转换文字描述
-	 * @param fileName
-	 * @return
-	 */
-	public static String convertfilesize(long filesize)
-	{
-		String strunit="bytes";
-		String straftercomma="";
-		int intdivisor=1;
-		if(filesize>=1024*1024)
-		{
-			strunit = "mb";
-			intdivisor=1024*1024;
-		}
-		else if(filesize>=1024)
-		{
-			strunit = "kb";
-			intdivisor=1024;
-		}
-		if(intdivisor==1)
-			return filesize + " " + strunit;
-		straftercomma = "" + 100 * (filesize % intdivisor) / intdivisor ;
-		if(straftercomma=="")
-			straftercomma=".0";
-		return filesize / intdivisor + "." + straftercomma + " " + strunit;
-	}
-
-}

+ 0 - 134
java110-generator/src/main/java/com/java110/code/util/UnicodeReader.java

@@ -1,134 +0,0 @@
-package com.java110.code.util;
-
-/**
-version: 1.1 / 2007-01-25
-- changed BOM recognition ordering (longer boms first)
-
-
-Original pseudocode   : Thomas Weidenfeller
-Implementation tweaked: Aki Nieminen
-
-
-http://www.unicode.org/unicode/faq/utf_bom.html
-BOMs:
-  00 00 FE FF    = UTF-32, big-endian
-  FF FE 00 00    = UTF-32, little-endian
-  EF BB BF       = UTF-8,
-  FE FF          = UTF-16, big-endian
-  FF FE          = UTF-16, little-endian
-
-
-Win2k Notepad:
-  Unicode format = UTF-16LE
-***/
-
-
-import java.io.*;
-
-
-/**
-* Generic unicode textreader, which will use BOM mark
-* to identify the encoding to be used. If BOM is not found
-* then use a given default or system encoding.
-*/
-public class UnicodeReader extends Reader {
-  PushbackInputStream internalIn;
-  InputStreamReader   internalIn2 = null;
-  String              defaultEnc;
-
-
-  private static final int BOM_SIZE = 4;
-
-
-  /**
-   *
-   * @param in  inputstream to be read
-   * @param defaultEnc default encoding if stream does not have
-   *                   BOM marker. Give NULL to use system-level default.
-   */
-  public UnicodeReader(InputStream in, String defaultEnc) {
-     internalIn = new PushbackInputStream(in, BOM_SIZE);
-     this.defaultEnc = defaultEnc;
-  }
-
-
-  public String getDefaultEncoding() {
-     return defaultEnc;
-  }
-
-
-  /**
-   * Get stream encoding or NULL if stream is uninitialized.
-   * Call init() or read() method to initialize it.
-   */
-  public String getEncoding() {
-     if (internalIn2 == null) return null;
-     return internalIn2.getEncoding();
-  }
-
-
-  /**
-   * Read-ahead four bytes and check for BOM marks. Extra bytes are
-   * unread back to the stream, only BOM bytes are skipped.
-   */
-  protected void init() throws IOException {
-     if (internalIn2 != null) return;
-
-
-     String encoding;
-     byte bom[] = new byte[BOM_SIZE];
-     int n, unread;
-     n = internalIn.read(bom, 0, bom.length);
-
-
-     if ( (bom[0] == (byte)0x00) && (bom[1] == (byte)0x00) &&
-                 (bom[2] == (byte)0xFE) && (bom[3] == (byte)0xFF) ) {
-        encoding = "UTF-32BE";
-        unread = n - 4;
-     } else if ( (bom[0] == (byte)0xFF) && (bom[1] == (byte)0xFE) &&
-                 (bom[2] == (byte)0x00) && (bom[3] == (byte)0x00) ) {
-        encoding = "UTF-32LE";
-        unread = n - 4;
-     } else if (  (bom[0] == (byte)0xEF) && (bom[1] == (byte)0xBB) &&
-           (bom[2] == (byte)0xBF) ) {
-        encoding = "UTF-8";
-        unread = n - 3;
-     } else if ( (bom[0] == (byte)0xFE) && (bom[1] == (byte)0xFF) ) {
-        encoding = "UTF-16BE";
-        unread = n - 2;
-     } else if ( (bom[0] == (byte)0xFF) && (bom[1] == (byte)0xFE) ) {
-        encoding = "UTF-16LE";
-        unread = n - 2;
-     } else {
-        // Unicode BOM mark not found, unread all bytes
-        encoding = defaultEnc;
-        unread = n;
-     }
-     //System.out.println("read=" + n + ", unread=" + unread);
-
-
-     if (unread > 0) internalIn.unread(bom, (n - unread), unread);
-
-
-     // Use given encoding
-     if (encoding == null) {
-        internalIn2 = new InputStreamReader(internalIn);
-     } else {
-        internalIn2 = new InputStreamReader(internalIn, encoding);
-     }
-  }
-
-
-  public void close() throws IOException {
-     init();
-     internalIn2.close();
-  }
-
-
-  public int read(char[] cbuf, int off, int len) throws IOException {
-     init();
-     return internalIn2.read(cbuf, off, len);
-  }
-
-
-}

+ 0 - 286
java110-generator/src/main/java/com/java110/code/web/GeneratorAddComponent.java

@@ -1,286 +0,0 @@
-package com.java110.code.web;
-
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.back.BaseGenerator;
-import com.java110.code.util.FileUtilBase;
-import org.springframework.util.StringUtils;
-
-public class GeneratorAddComponent extends BaseGenerator {
-
-    public void generator(JSONObject data) throws Exception {
-
-        //处理组件
-        generatorComponentHtml(data);
-        generatorComponentJs(data);
-        //generatorComponentJava(data);
-        //genneratorIListSmo(data);
-        //genneratorListSmoImpl(data);
-//        genneratorListListener(data);
-
-//        genneratorServiceCodeConstant(data);
-
-
-    }
-
-    /**
-     * 生成常量类
-     *
-     * @param data
-     */
-    private void genneratorServiceCodeConstant(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/constant/ServiceCodeConstant.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/constant/" + data.getString("templateCode") + "/ServiceCode" + toUpperCaseFirstOne(data.getString("templateCode")) + "Constant.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentHtml(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/add/add.html").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        // 处理 th 信息
-
-        StringBuffer thSb = new StringBuffer();
-
-        JSONArray columns = data.getJSONArray("columns");
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            if ("none".equals(column.getString("inputType"))) {
-                continue;
-            }
-            String required = column.getBoolean("required") ? "必填" : "选填";
-            String inputStr = "";
-            if ("select".equals(column.getString("inputType"))) {
-
-                String[] selectValues = column.getString("selectValue").split(",");
-                String[] selectValueNames = column.getString("selectValueName").split(",");
-
-
-                String option = "";
-                for (int valueIndex = 0; valueIndex < selectValues.length; valueIndex++) {
-
-                    String value = selectValues[valueIndex];
-
-                    option += "<option  value=\"" + value + "\">{{vc.i18n('" + selectValueNames[valueIndex] + "','add"+toUpperCaseFirstOne(data.getString("templateCode"))+"')}}</option>\n";
-
-                }
-
-                inputStr = "<select class=\"custom-select\" v-model=\"add" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info." + column.getString("code") + "\">\n" +
-                        "         <option selected  disabled value=\"\">{{vc.i18n('" + required + ",请选择" + column.getString("cnCode") + "','add"+toUpperCaseFirstOne(data.getString("templateCode"))+"')}}</option>\n" +
-                        "         " + option +
-                        "  </select>";
-            } else if ("textarea".equals(column.getString("inputType"))) {
-                inputStr = "<textarea  :placeholder=\"vc.i18n('" + required + ",请填写" + column.getString("cnCode") + "','add"+toUpperCaseFirstOne(data.getString("templateCode"))+"')\" class=\"form-control\"" +
-                        " v-model=\"add" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info." + column.getString("code") + "\">" +
-                        "</textarea>";
-            } else {
-                inputStr = "           <input v-model=\"add" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info." + column.getString("code") + "\" " +
-                        "                  type=\"text\" :placeholder=\"vc.i18n('" + required + ",请填写" + column.getString("cnCode") + "','add"+toUpperCaseFirstOne(data.getString("templateCode"))+"')\" class=\"form-control\">\n";
-            }
-            thSb.append("<div class=\"form-group row\">\n" +
-                    "         <label class=\"col-sm-2 col-form-label\"><span><vc:i18n name='" + column.getString("cnCode") + "' namespace='add"+toUpperCaseFirstOne(data.getString("templateCode"))+"'></vc:i18n></span></label>\n" +
-                    "         <div class=\"col-sm-10\">\n" +
-                    inputStr +
-                    "         </div>\n" +
-                    "</div>\n");
-
-        }
-
-        fileContext = fileContext.replace("@@addTemplateColumns@@", thSb.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/components/" + data.getString("directories") + "/add" + toUpperCaseFirstOne(data.getString("templateCode")) + "/add" + toUpperCaseFirstOne(data.getString("templateCode")) + ".html";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJs(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/add/add.js").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //替换 变量@@templateCodeColumns@@
-        JSONArray columns = data.getJSONArray("columns");
-
-        StringBuffer variable = new StringBuffer();
-        String defaultValue = "";
-
-        String validateInfo = "";
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            defaultValue = column.getBoolean("hasDefaultValue") ? column.getString("defaultValue") : "";
-            defaultValue = "'" + defaultValue + "'";
-            variable.append(column.getString("code") + ":" + defaultValue + ",\n");
-
-            validateInfo += "'add" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info." + column.getString("code") + "':[\n";
-            if (column.getBoolean("required")) {
-                validateInfo += "{\n" +
-                        "                            limit:\"required\",\n" +
-                        "                            param:\"\",\n" +
-                        "                            errInfo:\"" + column.getString("cnCode") + "不能为空\"\n" +
-                        "                        },\n";
-            }
-
-            if (column.containsKey("limit") && !StringUtils.isEmpty(column.getString("limit"))) {
-                validateInfo += " {\n" +
-                        "                            limit:\"" + column.getString("limit") + "\",\n" +
-                        "                            param:\"" + column.getString("limitParam") + "\",\n" +
-                        "                            errInfo:\"" + column.getString("limitErrInfo") + "\"\n" +
-                        "                        },\n" +
-                        "                    ],\n";
-            }
-
-        }
-        fileContext = fileContext.replace("@@templateCodeColumns@@", variable.toString());
-        fileContext = fileContext.replace("@@addTemplateCodeValidate@@", validateInfo);
-
-        // 替换 数据校验部分代码
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/components/" + data.getString("directories") + "/add" + toUpperCaseFirstOne(data.getString("templateCode")) + "/add" + toUpperCaseFirstOne(data.getString("templateCode")) + ".js";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJava(JSONObject data) throws Exception {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/add/AddComponent.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/component/java/" + data.getString("templateCode") + "/Add" + toUpperCaseFirstOne(data.getString("templateCode")) + "Component.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath,"FrontService\\src\\main\\java\\com\\java110\\front\\components\\" +data.getString("templateCode")+ "/Add" + toUpperCaseFirstOne(data.getString("templateCode")) + "Component.java");
-
-    }
-
-    /**
-     * 生成接口类
-     *
-     * @param data
-     */
-    private void genneratorIListSmo(JSONObject data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/add/IAddSMO.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/smo/" + data.getString("templateCode") + "/IAdd" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMO.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath,"FrontService\\src\\main\\java\\com\\java110\\front\\smo\\" +data.getString("templateCode") + "/IAdd" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMO.java");
-
-    }
-
-    /**
-     * 生成接口类
-     *
-     * @param data
-     */
-    private void genneratorListSmoImpl(JSONObject data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/add/AddSMOImpl.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //替换校验部分代码 @@validateTemplateColumns@@
-        JSONArray columns = data.getJSONArray("columns");
-        StringBuffer validateStr = new StringBuffer();
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            if (column.getBoolean("required")) {
-                validateStr.append("Assert.hasKeyAndValue(paramIn, \"" + column.getString("code") + "\", \"" + column.getString("desc") + "\");\n");
-            }
-        }
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/smo/" + data.getString("templateCode") + "/impl/Add" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMOImpl.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath,"FrontService\\src\\main\\java\\com\\java110\\front\\smo\\" +data.getString("templateCode") + "/impl/Add" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMOImpl.java");
-
-    }
-
-    /**
-     * 生成API 侦听处理类
-     *
-     * @param data
-     */
-    private void genneratorListListener(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/add/SaveListener.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //替换校验部分代码 @@validateTemplateColumns@@
-        JSONArray columns = data.getJSONArray("columns");
-        StringBuffer validateStr = new StringBuffer();
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            if (column.getBoolean("required")) {
-                validateStr.append("Assert.hasKeyAndValue(reqJson, \"" + column.getString("code") + "\", \"" + column.getString("desc") + "\");\n");
-            }
-        }
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/api/listener/" + data.getString("templateCode") + "/Save" + toUpperCaseFirstOne(data.getString("templateCode")) + "Listener.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-    }
-
-
-}

+ 0 - 114
java110-generator/src/main/java/com/java110/code/web/GeneratorChooseComponent.java

@@ -1,114 +0,0 @@
-package com.java110.code.web;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.back.BaseGenerator;
-import com.java110.code.util.FileUtilBase;
-
-/**
- * @ClassName GeneratorChooseComponent
- * @Description TODO
- * @Author wuxw
- * @Date 2019/7/27 10:26
- * @Version 1.0
- * add by wuxw 2019/7/27
- **/
-public class GeneratorChooseComponent extends BaseGenerator {
-    public void generator(JSONObject data) throws Exception {
-
-        //处理组件
-        generatorComponentHtml(data);
-        generatorComponentJs(data);
-        //generatorComponentJava(data);
-
-    }
-
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentHtml(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/choose/choose.html").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        // 处理 th 信息
-
-        StringBuffer thSb = new StringBuffer();
-        StringBuffer tdSb = new StringBuffer();
-        thSb.append("                            <th class=\"text-center\"><span><vc:i18n name='" + data.getString("templateKeyName") + "' namespace='choose"+data.getString("templateCode")+"'></vc:i18n></span></th>\n");
-
-        tdSb.append("                            <td class=\"text-center\">{{" + data.getString("templateCode") + "." + data.getString("templateKey") + "}}</td>\n");
-
-        JSONArray columns = data.getJSONArray("columns");
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            thSb.append("                            <th class=\"text-center\"><span><vc:i18n name='" + column.getString("cnCode") + "' namespace='choose"+data.getString("templateCode")+"'></vc:i18n></span> </th>\n");
-
-            tdSb.append("                            <td class=\"text-center\">{{" + data.getString("templateCode") + "." + column.getString("code") + "}}</td>\n");
-        }
-        thSb.append("                            <th class=\"text-center\"><span><vc:i18n name='操作'></vc:i18n></span></th>\n");
-
-        fileContext = fileContext.replace("@@columnsCnCode@@", thSb.toString())
-                .replace("@@columnsName@@", tdSb.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/components/" + data.getString("directories") + "/choose" + toUpperCaseFirstOne(data.getString("templateCode")) + "/choose" + toUpperCaseFirstOne(data.getString("templateCode")) + ".html";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJs(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/choose/choose.js").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/components/" + data.getString("directories") + "/choose" + toUpperCaseFirstOne(data.getString("templateCode")) + "/choose" + toUpperCaseFirstOne(data.getString("templateCode")) + ".js";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJava(JSONObject data) throws Exception {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/choose/ChooseComponent.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/component/java/" + data.getString("templateCode") + "/Choose" + toUpperCaseFirstOne(data.getString("templateCode")) + "Component.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath, "FrontService\\src\\main\\java\\com\\java110\\front\\components\\" + data.getString("templateCode") + "/Choose" + toUpperCaseFirstOne(data.getString("templateCode")) + "Component.java");
-
-
-    }
-
-
-}

+ 0 - 172
java110-generator/src/main/java/com/java110/code/web/GeneratorDeleteComponent.java

@@ -1,172 +0,0 @@
-package com.java110.code.web;
-
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.back.BaseGenerator;
-import com.java110.code.util.FileUtilBase;
-
-public class GeneratorDeleteComponent extends BaseGenerator {
-
-    public void generator(JSONObject data) throws Exception {
-
-        //处理组件
-        generatorComponentHtml(data);
-        generatorComponentJs(data);
-        // generatorComponentJava(data);
-        // genneratorIListSmo(data);
-        // genneratorListSmoImpl(data);
-//        genneratorListListener(data);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentHtml(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/delete/delete.html").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/components/" + data.getString("directories") + "/delete" + toUpperCaseFirstOne(data.getString("templateCode")) + "/delete" + toUpperCaseFirstOne(data.getString("templateCode")) + ".html";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJs(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/delete/delete.js").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-
-        // 替换 数据校验部分代码
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/components/" + data.getString("directories") + "/delete" + toUpperCaseFirstOne(data.getString("templateCode")) + "/delete" + toUpperCaseFirstOne(data.getString("templateCode")) + ".js";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJava(JSONObject data) throws Exception {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/delete/DeleteComponent.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/component/java/" + data.getString("templateCode") + "/Delete" + toUpperCaseFirstOne(data.getString("templateCode")) + "Component.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath, "FrontService\\src\\main\\java\\com\\java110\\front\\components\\" + data.getString("templateCode") + "/Delete" + toUpperCaseFirstOne(data.getString("templateCode")) + "Component.java");
-
-
-    }
-
-    /**
-     * 生成接口类
-     *
-     * @param data
-     */
-    private void genneratorIListSmo(JSONObject data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/delete/IDeleteSMO.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/smo/" + data.getString("templateCode") + "/IDelete" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMO.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath, "FrontService\\src\\main\\java\\com\\java110\\front\\smo\\" + data.getString("templateCode") + "/IDelete" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMO.java");
-
-    }
-
-    /**
-     * 生成接口类
-     *
-     * @param data
-     */
-    private void genneratorListSmoImpl(JSONObject data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/delete/DeleteSMOImpl.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //替换校验部分代码 @@validateTemplateColumns@@
-        JSONArray columns = data.getJSONArray("columns");
-        StringBuffer validateStr = new StringBuffer();
-        validateStr.append("Assert.hasKeyAndValue(paramIn, \"" + data.getString("templateKey") + "\", \"" + data.getString("templateKeyName") + "不能为空\");\n");
-
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/smo/" + data.getString("templateCode") + "/impl/Delete" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMOImpl.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath, "FrontService\\src\\main\\java\\com\\java110\\front\\smo\\" + data.getString("templateCode") + "/impl/Delete" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMOImpl.java");
-
-    }
-
-    /**
-     * 生成API 侦听处理类
-     *
-     * @param data
-     */
-    private void genneratorListListener(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/delete/DeleteListener.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //替换校验部分代码 @@validateTemplateColumns@@
-        JSONArray columns = data.getJSONArray("columns");
-        StringBuffer validateStr = new StringBuffer();
-        validateStr.append("Assert.hasKeyAndValue(reqJson, \"" + data.getString("templateKey") + "\", \"" + data.getString("templateKeyName") + "不能为空\");\n");
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/api/listener/" + data.getString("templateCode") + "/Delete" + toUpperCaseFirstOne(data.getString("templateCode")) + "Listener.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-    }
-
-
-}

+ 0 - 276
java110-generator/src/main/java/com/java110/code/web/GeneratorEditComponent.java

@@ -1,276 +0,0 @@
-package com.java110.code.web;
-
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.back.BaseGenerator;
-import com.java110.code.util.FileUtilBase;
-import org.springframework.util.StringUtils;
-
-public class GeneratorEditComponent extends BaseGenerator {
-
-    public void generator(JSONObject data) throws Exception {
-
-        //处理组件
-        generatorComponentHtml(data);
-        generatorComponentJs(data);
-        // generatorComponentJava(data);
-        // genneratorIListSmo(data);
-        // genneratorListSmoImpl(data);
-//        genneratorListListener(data);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentHtml(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/edit/edit.html").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        // 处理 th 信息
-
-        StringBuffer thSb = new StringBuffer();
-
-        JSONArray columns = data.getJSONArray("columns");
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            if ("none".equals(column.getString("inputType"))) {
-                continue;
-            }
-            String required = column.getBoolean("required") ? "必填" : "选填";
-            String inputStr = "";
-            if ("select".equals(column.getString("inputType"))) {
-
-                String[] selectValues = column.getString("selectValue").split(",");
-                String[] selectValueNames = column.getString("selectValueName").split(",");
-
-
-                String option = "";
-                for (int valueIndex = 0; valueIndex < selectValues.length; valueIndex++) {
-
-                    String value = selectValues[valueIndex];
-
-                    option += "<option  value=\"" + value + "\">{{vc.i18n('" + selectValueNames[valueIndex] + "' ,'edit"+toUpperCaseFirstOne(data.getString("templateCode"))+"')}} </option>\n";
-
-                }
-
-                inputStr = "<select class=\"custom-select\" v-model=\"edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info." + column.getString("code") + "\">\n" +
-                        "         <option selected  disabled value=\"\">{{vc.i18n('" + required + ",请选择" + column.getString("cnCode") + "' ,'edit"+toUpperCaseFirstOne(data.getString("templateCode"))+"')}}</option>\n" +
-                        "         " + option +
-                        "  </select>";
-            } else if ("textarea".equals(column.getString("inputType"))) {
-                inputStr = "<textarea  :placeholder=\"vc.i18n('" + required + ",请填写" + column.getString("cnCode") + "','edit"+toUpperCaseFirstOne(data.getString("templateCode"))+"')\" class=\"form-control\"" +
-                        " v-model=\"edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info." + column.getString("code") + "\">" +
-                        "</textarea>";
-            } else {
-                inputStr = "           <input v-model=\"edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info." + column.getString("code") + "\" " +
-                        "                  type=\"text\" :placeholder=\"vc.i18n('" + required + ",请填写" + column.getString("cnCode") + "','edit"+toUpperCaseFirstOne(data.getString("templateCode"))+"')\" class=\"form-control\">\n";
-            }
-            thSb.append("<div class=\"form-group row\">\n<span><vc:i18n name='" + column.getString("cnCode") + "' namespace='edit"+toUpperCaseFirstOne(data.getString("templateCode"))+"'></vc:i18n></span> </label>\n" +
-                    "         <div class=\"col-sm-10\">\n" +
-                    inputStr +
-                    "         </div>\n" +
-                    "</div>\n");
-
-        }
-
-        fileContext = fileContext.replace("@@editTemplateColumns@@", thSb.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/components/" + data.getString("directories") + "/edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "/edit" + toUpperCaseFirstOne(data.getString("templateCode")) + ".html";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJs(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/edit/edit.js").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //替换 变量@@templateCodeColumns@@
-        JSONArray columns = data.getJSONArray("columns");
-
-        StringBuffer variable = new StringBuffer();
-        variable.append(data.getString("templateKey") + ":'',\n");
-        String defaultValue = "";
-
-
-        String validateInfo = "";
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            defaultValue = column.getBoolean("hasDefaultValue") ? column.getString("defaultValue") : "";
-            defaultValue = "'" + defaultValue + "'";
-            variable.append(column.getString("code") + ":" + defaultValue + ",\n");
-
-            validateInfo += "'edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info." + column.getString("code") + "':[\n";
-            if (column.getBoolean("required")) {
-                validateInfo += "{\n" +
-                        "                            limit:\"required\",\n" +
-                        "                            param:\"\",\n" +
-                        "                            errInfo:\"" + column.getString("cnCode") + "不能为空\"\n" +
-                        "                        },\n";
-            }
-
-            if (column.containsKey("limit") && !StringUtils.isEmpty(column.getString("limit"))) {
-                validateInfo += " {\n" +
-                        "                            limit:\"" + column.getString("limit") + "\",\n" +
-                        "                            param:\"" + column.getString("limitParam") + "\",\n" +
-                        "                            errInfo:\"" + column.getString("limitErrInfo") + "\"\n" +
-                        "                        },\n" +
-                        "                    ],\n";
-            }
-
-        }
-        validateInfo += "'edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info." + data.getString("templateKey") + "':[\n";
-        validateInfo += "{\n" +
-                "                            limit:\"required\",\n" +
-                "                            param:\"\",\n" +
-                "                            errInfo:\"" + data.getString("templateKeyName") + "不能为空\"\n" +
-                "                        }]\n";
-        fileContext = fileContext.replace("@@templateCodeColumns@@", variable.toString());
-        fileContext = fileContext.replace("@@editTemplateCodeValidate@@", validateInfo);
-
-        // 替换 数据校验部分代码
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/components/" + data.getString("directories") + "/edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "/edit" + toUpperCaseFirstOne(data.getString("templateCode")) + ".js";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJava(JSONObject data) throws Exception {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/edit/EditComponent.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/component/java/" + data.getString("templateCode") + "/Edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "Component.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath, "FrontService\\src\\main\\java\\com\\java110\\front\\components\\" + data.getString("templateCode") + "/Edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "Component.java");
-
-
-    }
-
-    /**
-     * 生成接口类
-     *
-     * @param data
-     */
-    private void genneratorIListSmo(JSONObject data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/edit/IEditSMO.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/smo/" + data.getString("templateCode") + "/IEdit" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMO.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath, "FrontService\\src\\main\\java\\com\\java110\\front\\smo\\" + data.getString("templateCode") + "/IEdit" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMO.java");
-
-    }
-
-    /**
-     * 生成接口类
-     *
-     * @param data
-     */
-    private void genneratorListSmoImpl(JSONObject data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/edit/EditSMOImpl.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //替换校验部分代码 @@validateTemplateColumns@@
-        JSONArray columns = data.getJSONArray("columns");
-        StringBuffer validateStr = new StringBuffer();
-
-        validateStr.append("Assert.hasKeyAndValue(paramIn, \"" + data.getString("templateKey") + "\", \"" + data.getString("templateKeyName") + "不能为空\");\n");
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            if (column.getBoolean("required")) {
-                validateStr.append("Assert.hasKeyAndValue(paramIn, \"" + column.getString("code") + "\", \"" + column.getString("desc") + "\");\n");
-            }
-        }
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/smo/" + data.getString("templateCode") + "/impl/Edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMOImpl.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath, "FrontService\\src\\main\\java\\com\\java110\\front\\smo\\" + data.getString("templateCode") + "/impl/Edit" + toUpperCaseFirstOne(data.getString("templateCode")) + "SMOImpl.java");
-
-    }
-
-    /**
-     * 生成API 侦听处理类
-     *
-     * @param data
-     */
-    private void genneratorListListener(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/edit/UpdateListener.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //替换校验部分代码 @@validateTemplateColumns@@
-        JSONArray columns = data.getJSONArray("columns");
-        StringBuffer validateStr = new StringBuffer();
-        validateStr.append("Assert.hasKeyAndValue(reqJson, \"" + data.getString("templateKey") + "\", \"" + data.getString("templateKeyName") + "不能为空\");\n");
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            if (column.getBoolean("required")) {
-                validateStr.append("Assert.hasKeyAndValue(reqJson, \"" + column.getString("code") + "\", \"" + column.getString("desc") + "\");\n");
-            }
-        }
-
-        fileContext = fileContext.replace("@@validateTemplateColumns@@", validateStr.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/api/listener/" + data.getString("templateCode") + "/Update" + toUpperCaseFirstOne(data.getString("templateCode")) + "Listener.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-    }
-
-
-}

+ 0 - 367
java110-generator/src/main/java/com/java110/code/web/GeneratorManagerComponent.java

@@ -1,367 +0,0 @@
-package com.java110.code.web;
-
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.back.BaseGenerator;
-import com.java110.code.util.FileUtilBase;
-
-public class GeneratorManagerComponent extends BaseGenerator {
-
-    public void generator(JSONObject data) throws Exception {
-
-        //处理组件
-        generatorComponentHtml(data);
-        generatorComponentJs(data);
-      //  generatorComponentJava(data);
-      //  genneratorIListSmo(data);
-      //  genneratorListSmoImpl(data);
-//        genneratorVo(data);
-
-//        genneratorDataVo(data);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentHtml(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/manage/manage.html").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //处理查询条件
-        JSONArray tmpConditions = data.getJSONArray("conditions");
-
-        StringBuffer conditionInput = new StringBuffer();
-        StringBuffer vcCreate = new StringBuffer();
-
-        for (int condIndex = 0; condIndex < tmpConditions.size(); condIndex++) {
-
-            JSONObject tmpCond = tmpConditions.getJSONObject(condIndex);
-
-            if (condIndex % 3 == 0) {
-                conditionInput.append("<div class=\"row\">\n");
-            }
-
-            if (condIndex % 3 == 0 || condIndex % 3 == 1) {
-                conditionInput.append("<div class=\"col-sm-4\" ");
-            } else if (condIndex % 3 == 2) {
-                conditionInput.append("<div class=\"col-sm-3\" ");
-            }
-
-            if (condIndex > 2) {
-                conditionInput.append("v-if=\"" + data.getString("templateCode") + "ManageInfo.moreCondition == true\">\n");
-            } else {
-                conditionInput.append(">\n");
-            }
-
-            if ("choose".equals(tmpCond.getString("inputType"))) {
-                conditionInput.append("                            <div class=\"form-group input-group\">\n" +
-                        "                                <input type=\"text\" :placeholder=\"vc.i18n('请选择" + tmpCond.getString("name")+"','"+data.getString("templateCode")+"Manage')" +
-                        "\" v-model=\"" + data.getString("templateCode") + "ManageInfo.conditions." + tmpCond.getString("code") + "\" class=\" form-control\">\n" +
-                        "                                <div class=\"input-group-prepend\">\n" +
-                        "                                    <button type=\"button\" class=\"btn btn-primary btn-sm\" v-on:click=\"_open" + toUpperCaseFirstOne(tmpCond.getString("componentName")) + "Method()\"><i\n" +
-                        "                                            class=\"glyphicon glyphicon-search\"></i> <span><vc:i18n name=\"选择\"></vc:i18n></span>\n" +
-                        "                                    </button>\n" +
-                        "                                </div>\n" +
-                        "                            </div>\n");
-
-                if (tmpCond.containsKey("componentName")) {
-                    vcCreate.append("<vc:create path=\"" + tmpCond.getString("componentName") + "\"\n" +
-                            "               emit" + toUpperCaseFirstOne(tmpCond.getString("componentName")) + "=\"" + data.getString("templateCode") + "Manage\"\n" +
-                            "               emitLoadData=\"" + data.getString("templateCode") + "Manage\"\n" +
-                            "    ></vc:create>\n");
-
-                }
-
-            } else if ("input".equals(tmpCond.getString("inputType"))) {
-                conditionInput.append("<div class=\"form-group\">\n" +
-                        "                                <input type=\"text\" :placeholder=\"vc.i18n('请选择" + tmpCond.getString("name")+"','"+data.getString("templateCode")+"Manage')" + "\" v-model=\"" + data.getString("templateCode") + "ManageInfo.conditions." + tmpCond.getString("code") + "\" class=\" form-control\">\n" +
-                        "                            </div>");
-            } else if ("select".equals(tmpCond.getString("inputType"))){
-
-                String[] selectValues = tmpCond.getString("selectValue").split(",");
-                String[] selectValueNames = tmpCond.getString("selectValueName").split(",");
-
-
-                String option = "";
-                for (int valueIndex = 0; valueIndex < selectValues.length; valueIndex++) {
-
-                    String value = selectValues[valueIndex];
-                    option += "<option  value=\"" + value + "\"><span><vc:i18n name='" + selectValueNames[valueIndex] + "' namespace='"+data.getString("templateCode")+"Manage'></vc:i18n></span></option>\n";
-
-                }
-
-                conditionInput.append("<select class=\"custom-select\" v-model=\"" + data.getString("templateCode") + "ManageInfo.conditions." + tmpCond.getString("code") +"\">\n" +
-                        "         <option selected  value=\"\"><vc:i18n name='请选择" + tmpCond.getString("name")+"' namespace='"+data.getString("templateCode")+"Manage'></vc:i18n></span></option>\n" +
-                        "         " +option+
-                        "  </select>"
-                );
-
-            }
-
-            conditionInput.append("                        </div>");
-            if (condIndex == 2) {
-                conditionInput.append("<div class=\"col-sm-1\">\n" +
-                        "                            <button type=\"button\" class=\"btn btn-primary btn-sm\" v-on:click=\"_query" + toUpperCaseFirstOne(data.getString("templateCode")) + "Method()\">\n" +
-                        "                                    <i class=\"glyphicon glyphicon-search\"></i> <span><vc:i18n name=\"查询\"></vc:i18n></span>\n" +
-                        "                            </button>\n" +
-                        "                        </div>");
-            } else if (condIndex % 3 == 2) {
-                conditionInput.append("<div class=\"col-sm-1\">\n" +
-                        "                        </div>");
-
-            }
-
-
-            if (condIndex % 3 == 2 || condIndex == tmpConditions.size() - 1) {
-                conditionInput.append("</div>\n");
-            }
-        }
-
-        fileContext = fileContext.replace("@@conditionInput@@", conditionInput.toString());
-        fileContext = fileContext.replace("@@vcCreate@@", vcCreate.toString());
-
-        if (tmpConditions.size() > 3) {
-            fileContext = fileContext.replace("@@moreCondition@@", "<button type=\"button\"  class=\"btn btn-link btn-sm\" style=\"margin-right:10px;\"  v-on:click=\"_moreCondition()\">{{"+ data.getString("templateCode") +"ManageInfo.moreCondition == true?'隐藏':'更多'}}</button>");
-        } else {
-            fileContext = fileContext.replace("@@moreCondition@@", "");
-
-        }
-
-        // 处理 th 信息
-
-        StringBuffer thSb = new StringBuffer();
-        StringBuffer tdSb = new StringBuffer();
-        thSb.append("                            <th class=\"text-center\"><span><vc:i18n name='" + data.getString("templateKeyName") + "' namespace='"+data.getString("templateCode")+"Manage'></vc:i18n></span></th>\n");
-
-        tdSb.append("                            <td class=\"text-center\">{{" + data.getString("templateCode") + "." + data.getString("templateKey") + "}}</td>\n");
-
-        JSONArray columns = data.getJSONArray("columns");
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            if (column.getBoolean("show")) {
-                thSb.append("                            <th class=\"text-center\"><span><vc:i18n name='" + column.getString("cnCode") + "' namespace='"+data.getString("templateCode")+"Manage'></vc:i18n></span></th>\n");
-                tdSb.append("                            <td class=\"text-center\">{{" + data.getString("templateCode") + "." + column.getString("code") + "}}</td>\n");
-            }
-        }
-        thSb.append("                            <th class=\"text-center\"><span><vc:i18n name='操作'></vc:i18n></span></th>\n");
-        tdSb.append("                            <td class=\"text-center\"><div class=\"btn-group\">\n" +
-                "                                    <button class=\"btn-white btn btn-xs\" v-on:click=\"_openEdit" + toUpperCaseFirstOne(data.getString("templateCode")) + "Model(" + data.getString("templateCode") + ")\"><span><vc:i18n name='修改'></vc:i18n></span></button>\n" +
-                "                                </div>\n" +
-                "                                <div class=\"btn-group\">\n" +
-                "                                    <button class=\"btn-white btn btn-xs\" v-on:click=\"_openDelete" + toUpperCaseFirstOne(data.getString("templateCode")) + "Model(" + data.getString("templateCode") + ")\"><span><vc:i18n name='删除'></vc:i18n></span></button>\n" +
-                "                                </div></td>\n");
-
-        fileContext = fileContext.replace("@@columnsCnCode@@", thSb.toString())
-                .replace("@@columnsName@@", tdSb.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/pages/" + data.getString("directories") + "/" + data.getString("templateCode") + "Manage/" + data.getString("templateCode") + "Manage.html";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJs(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/manage/manage.js").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //处理查询条件
-        JSONArray tmpConditions = data.getJSONArray("conditions");
-
-        StringBuffer conditionInput = new StringBuffer();
-
-        StringBuffer conditionMethod = new StringBuffer();
-
-        StringBuffer conditionEvent = new StringBuffer();
-
-        for (int condIndex = 0; condIndex < tmpConditions.size(); condIndex++) {
-
-            JSONObject tmpCond = tmpConditions.getJSONObject(condIndex);
-            conditionInput.append(tmpCond.getString("code") + ":'',\n");
-            if(tmpCond.containsKey("key")){
-                conditionInput.append(tmpCond.getString("key") + ":'',\n");
-            }
-
-            if (tmpCond.containsKey("componentName")) {
-                conditionMethod.append(",\n _open" + toUpperCaseFirstOne(tmpCond.getString("componentName")) + "Method:function(){\n" +
-                        "                vc.emit('" + tmpCond.getString("componentName") + "','open" + toUpperCaseFirstOne(tmpCond.getString("componentName")) + "Model',{});\n" +
-                        "\n" +
-                        "            }"
-                );
-
-                conditionEvent.append("vc.on('" + data.getString("templateCode") + "Manage','" + tmpCond.getString("componentName") + "',function(_param){\n" +
-                        "              vc.copyObject(_param,vc.component." + data.getString("templateCode") + "ManageInfo.conditions);\n" +
-                        "            });\n");
-            }
-
-        }
-
-        fileContext = fileContext.replace("@@conditions@@", conditionInput.toString());
-        fileContext = fileContext.replace("@@extendMethods@@", conditionMethod.toString());
-        fileContext = fileContext.replace("@@extendEvent@@", conditionEvent.toString());
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/pages/" + data.getString("directories") + "/" + data.getString("templateCode") + "Manage/" + data.getString("templateCode") + "Manage.js";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJava(JSONObject data) throws Exception {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/manage/ManageComponent.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/component/java/" + data.getString("templateCode") + "/" + toUpperCaseFirstOne(data.getString("templateCode")) + "ManageComponent.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath,"FrontService\\src\\main\\java\\com\\java110\\front\\components\\" +data.getString("templateCode") + "/" + toUpperCaseFirstOne(data.getString("templateCode")) + "ManageComponent.java");
-
-
-    }
-
-    /**
-     * 生成接口类
-     *
-     * @param data
-     */
-    private void genneratorIListSmo(JSONObject data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/manage/IListSMO.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/smo/" + data.getString("templateCode") + "/IList" + toUpperCaseFirstOne(data.getString("templateCode")) + "sSMO.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath,"FrontService\\src\\main\\java\\com\\java110\\front\\smo\\" +data.getString("templateCode") + "/IList" + toUpperCaseFirstOne(data.getString("templateCode")) + "sSMO.java");
-
-    }
-
-    /**
-     * 生成接口类
-     *
-     * @param data
-     */
-    private void genneratorListSmoImpl(JSONObject data) throws Exception {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/manage/ListSMOImpl.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/smo/" + data.getString("templateCode") + "/impl/List" + toUpperCaseFirstOne(data.getString("templateCode")) + "sSMOImpl.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-        //复制生成的文件到对应分区目录下
-        FileUtilBase.copyfile(writePath,"FrontService\\src\\main\\java\\com\\java110\\front\\smo\\" +data.getString("templateCode") + "/impl/List" + toUpperCaseFirstOne(data.getString("templateCode")) + "sSMOImpl.java");
-
-    }
-
-    /**
-     * 生成API 侦听处理类
-     *
-     * @param data
-     */
-    private void genneratorListListener(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/manage/ListListener.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/api/listener/" + data.getString("templateCode") + "/List" + toUpperCaseFirstOne(data.getString("templateCode")) + "sListener.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-    }
-
-    private void genneratorVo(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/manage/ApiVo.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/api/vo/" + data.getString("templateCode") + "/Api" + toUpperCaseFirstOne(data.getString("templateCode")) + "Vo.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-    }
-
-    private void genneratorDataVo(JSONObject data) {
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/manage/ApiDataVo.java").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-        JSONArray columns = data.getJSONArray("columns");
-        String variable = "";
-        String variableGetSet = "";
-
-        variable += "private String " + data.getString("templateKey") + ";\n";
-
-        variableGetSet += "public String get" + toUpperCaseFirstOne(data.getString("templateKey")) + "() {\n"
-                + "        return " + data.getString("templateKey") + ";\n"
-                + "    }\n";
-        variableGetSet += "public void set" + toUpperCaseFirstOne(data.getString("templateKey")) + "(String " + data.getString("templateKey") + ") {\n"
-                + "        this." + data.getString("templateKey") + " = " + data.getString("templateKey") + ";\n"
-                + "    }\n";
-
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            String key = column.getString("code");
-            variable += "private String " + key + ";\n";
-
-            variableGetSet += "public String get" + toUpperCaseFirstOne(key) + "() {\n"
-                    + "        return " + key + ";\n"
-                    + "    }\n";
-            variableGetSet += "public void set" + toUpperCaseFirstOne(key) + "(String " + key + ") {\n"
-                    + "        this." + key + " = " + key + ";\n"
-                    + "    }\n";
-        }
-
-        fileContext = fileContext.replace("@@templateColumns@@", variable + variableGetSet);
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/api/vo/" + data.getString("templateCode") + "/Api" + toUpperCaseFirstOne(data.getString("templateCode")) + "DataVo.java";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-    }
-
-}

+ 0 - 38
java110-generator/src/main/java/com/java110/code/web/GeneratorStart.java

@@ -1,38 +0,0 @@
-package com.java110.code.web;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.back.BaseGenerator;
-
-public class GeneratorStart extends BaseGenerator {
-
-    public static void main(String[] args) throws Exception {
-        //加载配置
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/template_1.json").getFile());
-
-        JSONObject data = JSONObject.parseObject(sb.toString());
-
-
-        GeneratorManagerComponent managerComponent = new GeneratorManagerComponent();
-        managerComponent.generator(data);
-
-
-        //添加功能开发完成
-        GeneratorAddComponent addComponent = new GeneratorAddComponent();
-        addComponent.generator(data);
-
-        //编辑功能开发完成
-        GeneratorEditComponent editComponent = new GeneratorEditComponent();
-        editComponent.generator(data);
-
-        //删除功能开发完成
-        GeneratorDeleteComponent deleteComponent = new GeneratorDeleteComponent();
-        deleteComponent.generator(data);
-
-        //生成选择功能组件
-        GeneratorChooseComponent generatorChooseComponent = new GeneratorChooseComponent();
-        generatorChooseComponent.generator(data);
-
-        GeneratorViewComponent generatorViewComponent = new GeneratorViewComponent();
-        generatorViewComponent.generator(data);
-    }
-}

+ 0 - 112
java110-generator/src/main/java/com/java110/code/web/GeneratorViewComponent.java

@@ -1,112 +0,0 @@
-package com.java110.code.web;
-
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.back.BaseGenerator;
-
-public class GeneratorViewComponent extends BaseGenerator {
-
-    public void generator(JSONObject data) {
-
-        //处理组件
-        generatorComponentHtml(data);
-        generatorComponentJs(data);
-
-    }
-
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentHtml(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/view/viewInfo.html").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        // 处理 th 信息
-
-        StringBuffer thSb = new StringBuffer();
-
-        JSONArray columns = data.getJSONArray("columns");
-
-        JSONArray cols = new JSONArray();
-        JSONObject col = new JSONObject();
-        col.put("cnCode", data.getString("templateKeyName"));
-        col.put("code", data.getString("templateKey"));
-        cols.addAll(columns);
-        for (int columnIndex = 0; columnIndex < cols.size(); columnIndex++) {
-            JSONObject column = cols.getJSONObject(columnIndex);
-            if (columnIndex % 3 == 0) {
-                thSb.append("<div class=\"row\">\n");
-            }
-
-            thSb.append("<div class=\"col-sm-4\">\n" +
-                    "                        <div class=\"form-group\">\n" +
-                    "                            <label class=\"col-form-label\" > <span><vc:i18n name='" + column.getString("cnCode") + "' namespace='view"+data.getString("templateCode")+"Info'></vc:i18n></span>:</label>\n" +
-                    "                            <label class=\"\">{{view" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info." + column.getString("code") + "}}</label>\n" +
-                    "                        </div>\n" +
-                    "</div>\n");
-
-            if (columnIndex % 3 == 2 || columnIndex == columns.size() - 1) {
-                thSb.append("</div>\n");
-            }
-
-        }
-
-        fileContext = fileContext.replace("@@viewInfo@@", thSb.toString());
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/components/" + data.getString("directories") + "/view" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info/view" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info.html";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-    /**
-     * 生成 html js java 类
-     *
-     * @param data
-     */
-    private void generatorComponentJs(JSONObject data) {
-
-        StringBuffer sb = readFile(GeneratorStart.class.getResource("/web/view/viewInfo.js").getFile());
-        String fileContext = sb.toString();
-
-        fileContext = super.replaceTemplateContext(fileContext, data);
-
-        //替换 变量@@templateCodeColumns@@
-        JSONArray columns = data.getJSONArray("columns");
-
-        StringBuffer variable = new StringBuffer();
-        String defaultValue = "";
-
-        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
-            JSONObject column = columns.getJSONObject(columnIndex);
-            variable.append(column.getString("code") + ":'',\n");
-
-        }
-        fileContext = fileContext.replace("@@templateCodeColumns@@", variable.toString());
-
-        // 替换 数据校验部分代码
-
-
-        String writePath = this.getClass().getResource("/").getPath()
-                + "out/web/components/" + data.getString("directories") + "/view"
-                + toUpperCaseFirstOne(data.getString("templateCode")) + "Info/view" + toUpperCaseFirstOne(data.getString("templateCode")) + "Info.js";
-        System.out.printf("writePath: " + writePath);
-        writeFile(writePath,
-                fileContext);
-
-
-    }
-
-
-}

+ 0 - 77
java110-generator/src/main/resources/AbstractBusinessServiceDataFlowListener.java

@@ -1,77 +0,0 @@
-package com.java110.store.listener;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.constant.StatusConstant;
-import com.java110.utils.exception.ListenerExecuteException;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.entity.center.Business;
-import com.java110.core.event.service.AbstractBusinessServiceDataFlowListener;
-import com.java110.store.dao.IStoreServiceDao;
-import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- *
- * 商户 服务侦听 父类
- * Created by wuxw on 2018/7/4.
- */
-public abstract class AbstractStoreBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener{
-    private final static Logger logger = LoggerFactory.getLogger(AbstractStoreBusinessServiceDataFlowListener.class);
-
-
-    /**
-     * 获取 DAO工具类
-     * @return
-     */
-    public abstract IStoreServiceDao getStoreServiceDaoImpl();
-
-    /**
-     * 刷新 businessStoreInfo 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessStoreInfo
-     */
-    protected void flushBusinessStoreInfo(Map businessStoreInfo,String statusCd){
-        businessStoreInfo.put("newBId",businessStoreInfo.get("b_id"));
-        businessStoreInfo.put("storeId",businessStoreInfo.get("store_id"));
-        businessStoreInfo.put("userId",businessStoreInfo.get("user_id"));
-        businessStoreInfo.put("storeTypeCd",businessStoreInfo.get("store_type_cd"));
-        businessStoreInfo.put("nearbyLandmarks",businessStoreInfo.get("nearby_landmarks"));
-        businessStoreInfo.put("mapX",businessStoreInfo.get("map_x"));
-        businessStoreInfo.put("mapY",businessStoreInfo.get("map_y"));
-        businessStoreInfo.put("statusCd", statusCd);
-    }
-
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param businessStore 商户信息
-     */
-    protected void autoSaveDelBusinessStore(Business business, JSONObject businessStore){
-//自动插入DEL
-        Map info = new HashMap();
-        info.put("storeId",businessStore.getString("storeId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        Map currentStoreInfo = getStoreServiceDaoImpl().getStoreInfo(info);
-        if(currentStoreInfo == null || currentStoreInfo.isEmpty()){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-        currentStoreInfo.put("bId",business.getbId());
-        currentStoreInfo.put("storeId",currentStoreInfo.get("store_id"));
-        currentStoreInfo.put("userId",currentStoreInfo.get("user_id"));
-        currentStoreInfo.put("storeTypeCd",currentStoreInfo.get("store_type_cd"));
-        currentStoreInfo.put("nearbyLandmarks",currentStoreInfo.get("nearby_landmarks"));
-        currentStoreInfo.put("mapX",currentStoreInfo.get("map_x"));
-        currentStoreInfo.put("mapY",currentStoreInfo.get("map_y"));
-        currentStoreInfo.put("operate",StatusConstant.OPERATE_DEL);
-        getStoreServiceDaoImpl().saveBusinessStoreInfo(currentStoreInfo);
-    }
-
-
-
-
-
-}

+ 0 - 155
java110-generator/src/main/resources/DeleteStoreInfoListener.java

@@ -1,155 +0,0 @@
-package com.java110.store.listener;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.BusinessTypeConstant;
-import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.constant.StatusConstant;
-import com.java110.utils.exception.ListenerExecuteException;
-import com.java110.utils.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.store.dao.IStoreServiceDao;
-import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 删除商户信息 侦听
- *
- * 处理节点
- * 1、businessStore:{} 商户基本信息节点
- * 2、businessStoreAttr:[{}] 商户属性信息节点
- * 3、businessStorePhoto:[{}] 商户照片信息节点
- * 4、businessStoreCerdentials:[{}] 商户证件信息节点
- * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("deleteStoreInfoListener")
-@Transactional
-public class DeleteStoreInfoListener extends AbstractStoreBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeleteStoreInfoListener.class);
-    @Autowired
-    IStoreServiceDao storeServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_STORE_INFO;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessStore 节点 按理这里不应该处理,程序上支持,以防真有这种业务
-        if(data.containsKey("businessStore")){
-            JSONObject businessStore = data.getJSONObject("businessStore");
-            doBusinessStore(business,businessStore);
-            dataFlowContext.addParamOut("storeId",businessStore.getString("storeId"));
-        }
-
-
-    }
-
-    /**
-     * 删除 instance数据
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
-        String bId = business.getbId();
-        //Assert.hasLength(bId,"请求报文中没有包含 bId");
-
-        //商户信息
-        Map info = new HashMap();
-        info.put("bId",business.getbId());
-        info.put("operate",StatusConstant.OPERATE_DEL);
-
-        //商户信息
-        Map businessStoreInfo = storeServiceDaoImpl.getBusinessStoreInfo(info);
-        if( businessStoreInfo != null && !businessStoreInfo.isEmpty()) {
-            flushBusinessStoreInfo(businessStoreInfo,StatusConstant.STATUS_CD_INVALID);
-            storeServiceDaoImpl.updateStoreInfoInstance(businessStoreInfo);
-            dataFlowContext.addParamOut("storeId",businessStoreInfo.get("store_id"));
-        }
-
-    }
-
-    /**
-     * 撤单
-     * 从business表中查询到DEL的数据 将instance中的数据更新回来
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
-        String bId = business.getbId();
-        //Assert.hasLength(bId,"请求报文中没有包含 bId");
-        Map info = new HashMap();
-        info.put("bId",bId);
-        info.put("statusCd",StatusConstant.STATUS_CD_INVALID);
-
-        Map delInfo = new HashMap();
-        delInfo.put("bId",business.getbId());
-        delInfo.put("operate",StatusConstant.OPERATE_DEL);
-        //商户信息
-        Map storeInfo = storeServiceDaoImpl.getStoreInfo(info);
-        if(storeInfo != null && !storeInfo.isEmpty()){
-
-            //商户信息
-            Map businessStoreInfo = storeServiceDaoImpl.getBusinessStoreInfo(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessStoreInfo == null || businessStoreInfo.isEmpty()){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(store),程序内部异常,请检查! "+delInfo);
-            }
-
-            flushBusinessStoreInfo(businessStoreInfo,StatusConstant.STATUS_CD_VALID);
-            storeServiceDaoImpl.updateStoreInfoInstance(businessStoreInfo);
-            dataFlowContext.addParamOut("storeId",storeInfo.get("store_id"));
-        }
-    }
-
-
-
-    /**
-     * 处理 businessStore 节点
-     * @param business 总的数据节点
-     * @param businessStore 商户节点
-     */
-    private void doBusinessStore(Business business,JSONObject businessStore){
-
-        Assert.jsonObjectHaveKey(businessStore,"storeId","businessStore 节点下没有包含 storeId 节点");
-
-        if(businessStore.getString("storeId").startsWith("-")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"storeId 错误,不能自动生成(必须已经存在的storeId)"+businessStore);
-        }
-        //自动插入DEL
-        autoSaveDelBusinessStore(business,businessStore);
-    }
-
-    public IStoreServiceDao getStoreServiceDaoImpl() {
-        return storeServiceDaoImpl;
-    }
-
-    public void setStoreServiceDaoImpl(IStoreServiceDao storeServiceDaoImpl) {
-        this.storeServiceDaoImpl = storeServiceDaoImpl;
-    }
-}

+ 0 - 141
java110-generator/src/main/resources/SaveInfoListener.java

@@ -1,141 +0,0 @@
-package com.java110.store.listener;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.BusinessTypeConstant;
-import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.constant.ServiceCodeConstant;
-import com.java110.utils.constant.StatusConstant;
-import com.java110.utils.exception.ListenerExecuteException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.DateUtil;
-import com.java110.utils.util.StringUtil;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.entity.center.Business;
-import com.java110.store.dao.IStoreServiceDao;
-import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 保存 用户信息 侦听
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("saveStoreInfoListener")
-@Transactional
-public class SaveStoreInfoListener extends AbstractStoreBusinessServiceDataFlowListener{
-
-    private final static Logger logger = LoggerFactory.getLogger(SaveStoreInfoListener.class);
-
-    @Autowired
-    IStoreServiceDao storeServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_STORE_INFO;
-    }
-
-    /**
-     * 保存商户信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessStore 节点
-        if(data.containsKey("businessStore")){
-            JSONObject businessStore = data.getJSONObject("businessStore");
-            doBusinessStore(business,businessStore);
-            dataFlowContext.addParamOut("storeId",businessStore.getString("storeId"));
-        }
-    }
-
-    /**
-     * business 数据转移到 instance
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Map info = new HashMap();
-        info.put("bId",business.getbId());
-        info.put("operate",StatusConstant.OPERATE_ADD);
-
-        //商户信息
-        Map businessStoreInfo = storeServiceDaoImpl.getBusinessStoreInfo(info);
-        if( businessStoreInfo != null && !businessStoreInfo.isEmpty()) {
-            storeServiceDaoImpl.saveStoreInfoInstance(info);
-            dataFlowContext.addParamOut("storeId",businessStoreInfo.get("store_id"));
-        }
-    }
-
-    /**
-     * 撤单
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
-        String bId = business.getbId();
-        //Assert.hasLength(bId,"请求报文中没有包含 bId");
-        Map info = new HashMap();
-        info.put("bId",bId);
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        Map paramIn = new HashMap();
-        paramIn.put("bId",bId);
-        paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID);
-        //商户信息
-        Map storeInfo = storeServiceDaoImpl.getStoreInfo(info);
-        if(storeInfo != null && !storeInfo.isEmpty()){
-            paramIn.put("storeId",storeInfo.get("store_id").toString());
-            storeServiceDaoImpl.updateStoreInfoInstance(paramIn);
-            dataFlowContext.addParamOut("storeId",storeInfo.get("store_id"));
-        }
-    }
-
-
-
-    /**
-     * 处理 businessStore 节点
-     * @param business 总的数据节点
-     * @param businessStore 商户节点
-     */
-    private void doBusinessStore(Business business,JSONObject businessStore){
-
-        Assert.jsonObjectHaveKey(businessStore,"storeId","businessStore 节点下没有包含 storeId 节点");
-
-        if(businessStore.getString("storeId").startsWith("-")){
-            //刷新缓存
-            flushStoreId(business.getDatas());
-        }
-
-        businessStore.put("bId",business.getbId());
-        businessStore.put("operate", StatusConstant.OPERATE_ADD);
-        //保存商户信息
-        storeServiceDaoImpl.saveBusinessStoreInfo(businessStore);
-
-    }
-
-    public IStoreServiceDao getStoreServiceDaoImpl() {
-        return storeServiceDaoImpl;
-    }
-
-    public void setStoreServiceDaoImpl(IStoreServiceDao storeServiceDaoImpl) {
-        this.storeServiceDaoImpl = storeServiceDaoImpl;
-    }
-}

+ 0 - 166
java110-generator/src/main/resources/UpdateInfoListener.java

@@ -1,166 +0,0 @@
-package com.java110.store.listener;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.BusinessTypeConstant;
-import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.constant.StatusConstant;
-import com.java110.utils.exception.ListenerExecuteException;
-import com.java110.utils.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.store.dao.IStoreServiceDao;
-import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 修改商户信息 侦听
- *
- * 处理节点
- * 1、businessStore:{} 商户基本信息节点
- * 2、businessStoreAttr:[{}] 商户属性信息节点
- * 3、businessStorePhoto:[{}] 商户照片信息节点
- * 4、businessStoreCerdentials:[{}] 商户证件信息节点
- * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("updateStoreInfoListener")
-@Transactional
-public class UpdateStoreInfoListener extends AbstractStoreBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(UpdateStoreInfoListener.class);
-    @Autowired
-    IStoreServiceDao storeServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 2;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_STORE_INFO;
-    }
-
-    /**
-     * business过程
-     * @param dataFlowContext
-     * @param business
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessStore 节点
-        if(data.containsKey("businessStore")){
-            JSONObject businessStore = data.getJSONObject("businessStore");
-            doBusinessStore(business,businessStore);
-            dataFlowContext.addParamOut("storeId",businessStore.getString("storeId"));
-        }
-    }
-
-
-    /**
-     * business to instance 过程
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
-
-        JSONObject data = business.getDatas();
-
-        Map info = new HashMap();
-        info.put("bId",business.getbId());
-        info.put("operate",StatusConstant.OPERATE_ADD);
-
-        //商户信息
-        Map businessStoreInfo = storeServiceDaoImpl.getBusinessStoreInfo(info);
-        if( businessStoreInfo != null && !businessStoreInfo.isEmpty()) {
-            flushBusinessStoreInfo(businessStoreInfo,StatusConstant.STATUS_CD_VALID);
-            storeServiceDaoImpl.updateStoreInfoInstance(businessStoreInfo);
-            dataFlowContext.addParamOut("storeId",businessStoreInfo.get("store_id"));
-        }
-
-    }
-
-    /**
-     * 撤单
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
-
-        String bId = business.getbId();
-        //Assert.hasLength(bId,"请求报文中没有包含 bId");
-        Map info = new HashMap();
-        info.put("bId",bId);
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        Map delInfo = new HashMap();
-        delInfo.put("bId",business.getbId());
-        delInfo.put("operate",StatusConstant.OPERATE_DEL);
-        //商户信息
-        Map storeInfo = storeServiceDaoImpl.getStoreInfo(info);
-        if(storeInfo != null && !storeInfo.isEmpty()){
-
-            //商户信息
-            Map businessStoreInfo = storeServiceDaoImpl.getBusinessStoreInfo(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessStoreInfo == null || businessStoreInfo.isEmpty()){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(store),程序内部异常,请检查! "+delInfo);
-            }
-
-            flushBusinessStoreInfo(businessStoreInfo,StatusConstant.STATUS_CD_VALID);
-            storeServiceDaoImpl.updateStoreInfoInstance(businessStoreInfo);
-            dataFlowContext.addParamOut("storeId",storeInfo.get("store_id"));
-        }
-
-    }
-
-
-
-    /**
-     * 处理 businessStore 节点
-     * @param business 总的数据节点
-     * @param businessStore 商户节点
-     */
-    private void doBusinessStore(Business business,JSONObject businessStore){
-
-        Assert.jsonObjectHaveKey(businessStore,"storeId","businessStore 节点下没有包含 storeId 节点");
-
-        if(businessStore.getString("storeId").startsWith("-")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"storeId 错误,不能自动生成(必须已经存在的storeId)"+businessStore);
-        }
-        //自动保存DEL
-        autoSaveDelBusinessStore(business,businessStore);
-
-        businessStore.put("bId",business.getbId());
-        businessStore.put("operate", StatusConstant.OPERATE_ADD);
-        //保存商户信息
-        storeServiceDaoImpl.saveBusinessStoreInfo(businessStore);
-
-    }
-
-
-
-
-    public IStoreServiceDao getStoreServiceDaoImpl() {
-        return storeServiceDaoImpl;
-    }
-
-    public void setStoreServiceDaoImpl(IStoreServiceDao storeServiceDaoImpl) {
-        this.storeServiceDaoImpl = storeServiceDaoImpl;
-    }
-
-
-
-}

+ 0 - 64
java110-generator/src/main/resources/application-dev.yml

@@ -1,64 +0,0 @@
-jedis:
-  pool:
-    config:
-      maxTotal: 100
-      maxIdle: 20
-      maxWaitMillis: 20000
-    host: dev.redis.java110.com
-    port: 6379
-    timeout: 3000
-    password: hc
-
-server:
-  port: 8888
-  tomcat:
-    uri-encoding: UTF-8
-
-spring:
-  http:
-    encoding:
-      charset: UTF-8
-      enabled: true
-      force: true
-  redis:
-    database: 0
-    host: dev.redis.java110.com
-    port: 6379
-    password: hc
-    pool:
-      max-active: 300
-      max-wait: 10000
-      max-idle: 100
-      min-idle: 0
-      timeout: 0
-#============== kafka ===================
-kafka:
-  consumer:
-    zookeeper:
-      connect: dev.zk.java110.com:2181
-    servers: dev.kafka.java110.com:9092
-    enable:
-      auto:
-        commit: true
-    session:
-      timeout: 6000
-    auto:
-      commit:
-        interval: 100
-      offset:
-        reset: latest
-    topic: test
-    group:
-      id: simpleBusinessStatus
-    concurrency: 10
-
-  producer:
-    zookeeper:
-      connect: dev.zk.java110.com:2181
-    servers: dev.kafka.java110.com:9092
-    retries: 0
-    batch:
-      size: 4096
-    linger: 1
-    buffer:
-      memory: 40960

+ 0 - 3
java110-generator/src/main/resources/application.yml

@@ -1,3 +0,0 @@
-spring:
-  profiles:
-    active: dev

+ 0 - 31
java110-generator/src/main/resources/back/template_1.json

@@ -1,31 +0,0 @@
-{
-  "param": {
-    "configId": "config_id",
-    "comboId": "combo_id",
-    "statusCd": "status_cd",
-    "communityId": "community_id",
-    "memberId": "member_id"
-  },
-  "name": "feeComboMember",
-  "shareColumn": "community_id",
-  "id": "comboId",
-  "shareName": "fee",
-  "autoMove": true,
-  "required": [
-    {
-      "msg": "套餐不能为空",
-      "code": "comboId"
-    },
-    {
-      "msg": "费用项不能为空",
-      "code": "configId"
-    },
-    {
-      "msg": "小区ID不能为空",
-      "code": "communityId"
-    }
-  ],
-  "desc": "套餐成员",
-  "shareParam": "communityId",
-  "tableName": "fee_combo_member"
-}

+ 0 - 42
java110-generator/src/main/resources/back/template_activitiesType.json

@@ -1,42 +0,0 @@
-{
-  "autoMove": true,
-  "id": "detailId",
-  "name": "hcGovTranslateDetail",
-  "desc": "信息分类",
-  "shareParam": "detailId",
-  "shareColumn": "detail_id",
-  "shareName": "common",
-  "tableName": "hc_gov_translate_detail",
-  "param": {
-    "detailId": "detail_id",
-    "tranId": "tran_id",
-    "communityId": "community_id",
-    "reqBody": "req_body",
-    "resBody": "res_body",
-    "createTime": "create_time",
-    "statusCd": "status_cd"
-  },
-  "required": [
-    {
-      "code": "detailId",
-      "msg": "小区不能为空"
-    },
-    {
-      "code": "tranId",
-      "msg": "分类不能为空"
-    },
-    {
-      "code": "communityId",
-      "msg": "顺序不能为空"
-    },
-    {
-      "code": "reqBody",
-      "msg": "显示不能为空"
-    },
-    {
-      "code": "resBody",
-      "msg": "显示不能为空"
-    }
-  ]
-}
-

+ 0 - 79
java110-generator/src/main/resources/dao/IServiceDao.java

@@ -1,79 +0,0 @@
-package com.java110.store.dao;
-
-
-import com.java110.utils.exception.DAOException;
-import com.java110.entity.merchant.BoMerchant;
-import com.java110.entity.merchant.BoMerchantAttr;
-import com.java110.entity.merchant.Merchant;
-import com.java110.entity.merchant.MerchantAttr;
-
-
-import java.util.Map;
-
-/**
- * 商户组件内部之间使用,没有给外围系统提供服务能力
- * 商户服务接口类,要求全部以字符串传输,方便微服务化
- * 新建客户,修改客户,删除客户,查询客户等功能
- *
- * Created by wuxw on 2016/12/27.
- */
-public interface IStoreServiceDao {
-
-    /**
-     * 保存 商户信息
-     * @param businessStoreInfo 商户信息 封装
-     * @throws DAOException 操作数据库异常
-     */
-     void saveBusinessStoreInfo(Map businessStoreInfo) throws DAOException;
-
-
-
-    /**
-     * 查询商户信息(business过程)
-     * 根据bId 查询商户信息
-     * @param info bId 信息
-     * @return 商户信息
-     * @throws DAOException
-     */
-     Map getBusinessStoreInfo(Map info) throws DAOException;
-
-
-
-
-    /**
-     * 保存 商户信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException
-     */
-     void saveStoreInfoInstance(Map info) throws DAOException;
-
-
-
-
-    /**
-     * 查询商户信息(instance过程)
-     * 根据bId 查询商户信息
-     * @param info bId 信息
-     * @return 商户信息
-     * @throws DAOException
-     */
-     Map getStoreInfo(Map info) throws DAOException;
-
-
-
-    /**
-     * 修改商户信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-     void updateStoreInfoInstance(Map info) throws DAOException;
-
-    /**
-     * 查询商户总数
-     *
-     * @param info 商户信息
-     * @return 商户数量
-     */
-    int queryStoresCount(Map info);
-
-}

+ 0 - 143
java110-generator/src/main/resources/dao/ServiceDaoImpl.java

@@ -1,143 +0,0 @@
-package com.java110.store.dao.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.exception.DAOException;
-import com.java110.utils.util.DateUtil;
-import com.java110.core.base.dao.BaseServiceDao;
-import com.java110.store.dao.IStoreServiceDao;
-import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 商户服务 与数据库交互
- * Created by wuxw on 2017/4/5.
- */
-@Service("storeServiceDaoImpl")
-//@Transactional
-public class StoreServiceDaoImpl extends BaseServiceDao implements IStoreServiceDao {
-
-    private final static Logger logger = LoggerFactory.getLogger(StoreServiceDaoImpl.class);
-
-    /**
-     * 商户信息封装
-     * @param businessStoreInfo 商户信息 封装
-     * @throws DAOException
-     */
-    @Override
-    public void saveBusinessStoreInfo(Map businessStoreInfo) throws DAOException {
-        businessStoreInfo.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存商户信息 入参 businessStoreInfo : {}",businessStoreInfo);
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStoreInfo",businessStoreInfo);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户数据失败:"+ JSONObject.toJSONString(businessStoreInfo));
-        }
-    }
-
-
-    /**
-     * 查询商户信息
-     * @param info bId 信息
-     * @return 商户信息
-     * @throws DAOException
-     */
-    @Override
-    public Map getBusinessStoreInfo(Map info) throws DAOException {
-
-        logger.debug("查询商户信息 入参 info : {}",info);
-
-        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStoreInfo",info);
-        if(businessStoreInfos == null){
-            return null;
-        }
-        if(businessStoreInfos.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:businessStoreInfos,"+ JSONObject.toJSONString(info));
-        }
-
-        return businessStoreInfos.get(0);
-    }
-
-
-
-    /**
-     * 保存商户信息 到 instance
-     * @param info   bId 信息
-     * @throws DAOException
-     */
-    @Override
-    public void saveStoreInfoInstance(Map info) throws DAOException {
-        logger.debug("保存商户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStoreInfoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-    /**
-     * 查询商户信息(instance)
-     * @param info bId 信息
-     * @return
-     * @throws DAOException
-     */
-    @Override
-    public Map getStoreInfo(Map info) throws DAOException {
-        logger.debug("查询商户信息 入参 info : {}",info);
-
-        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreInfo",info);
-        if(businessStoreInfos == null || businessStoreInfos.size() == 0){
-            return null;
-        }
-        if(businessStoreInfos.size() >1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"根据条件查询有多条数据,数据异常,请检查:getStoreInfo,"+ JSONObject.toJSONString(info));
-        }
-
-        return businessStoreInfos.get(0);
-    }
-
-
-    /**
-     * 修改商户信息
-     * @param info 修改信息
-     * @throws DAOException
-     */
-    @Override
-    public void updateStoreInfoInstance(Map info) throws DAOException {
-        logger.debug("修改商户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStoreInfoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改商户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-    /**
-     * 查询商户数量
-     * @param info 商户信息
-     * @return 商户数量
-     */
-    @Override
-    public int queryStoresCount(Map info) {
-        logger.debug("查询商户数据 入参 info : {}",info);
-
-        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeServiceDaoImpl.queryStoresCount", info);
-        if (businessStoreInfos.size() < 1) {
-            return 0;
-        }
-
-        return Integer.parseInt(businessStoreInfos.get(0).get("count").toString());
-    }
-
-
-}

+ 0 - 90
java110-generator/src/main/resources/dao/ServiceDaoImplMapper.xml

@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="storeServiceDaoImpl">
-    
-    <!-- 保存商户信息 add by wuxw 2018-07-03 -->
-    <insert id="saveBusinessStoreInfo" parameterType="Map">
-        $saveBusinessInfo$
-    </insert>
-
-
-    <!-- 查询商户信息(Business) add by wuxw 2018-07-03 -->
-    <select id="getBusinessStoreInfo" parameterType="Map" resultType="Map">
-        $getBusinessInfo$
-    </select>
-
-
-
-
-    <!-- 保存商户信息至 instance表中 add by wuxw 2018-07-03 -->
-    <insert id="saveStoreInfoInstance" parameterType="Map">
-        insert into s_store(store_id,b_id,user_id,name,address,tel,store_type_cd,nearby_landmarks,map_x,map_y,status_cd)
-        select s.store_id,s.b_id,s.user_id,s.name,s.address,s.tel,s.store_type_cd,s.nearby_landmarks,s.map_x,s.map_y,'0'
-        from business_store s where 
-        s.operate = 'ADD' and s.b_id=#{bId}
-    </insert>
-
-
-
-    <!-- 查询商户信息 add by wuxw 2018-07-03 -->
-    <select id="getStoreInfo" parameterType="Map" resultType="Map">
-        select s.store_id,s.b_id,s.user_id,s.name,s.address,s.tel,s.store_type_cd,s.nearby_landmarks,s.map_x,s.map_y,s.status_cd
-        from s_store s
-        where 1=1
-        <if test="statusCd != null and statusCd != ''">
-            and s.status_cd = #{statusCd}
-        </if>
-
-        <if test="bId != null and bId !=''">
-            and s.b_id = #{bId}
-        </if>
-        <if test="storeId != null and storeId !=''">
-            and s.store_id = #{storeId}
-        </if>
-    </select>
-
-
-
-
-    <!-- 修改商户信息 add by wuxw 2018-07-03 -->
-    <update id="updateStoreInfoInstance" parameterType="Map">
-        update s_store s set s.status_cd = #{statusCd}
-        <if test="newBId != null and newBId != ''">
-            ,s.b_id = #{newBId}
-        </if>
-        <if test="userId != null and userId != ''">
-            ,s.user_id = #{userId}
-        </if>
-        <if test="name != null and name != ''">
-            ,s.name = #{name}
-        </if>
-        <if test="address != null and address != ''">
-            ,s.address = #{address}
-        </if>
-        <if test="tel != null and tel != ''">
-            ,s.tel = #{tel}
-        </if>
-        <if test="storeTypeCd != null and storeTypeCd != ''">
-            ,s.store_type_cd = #{storeTypeCd}
-        </if>
-        <if test="nearbyLandmarks != null and nearbyLandmarks != ''">
-            ,s.nearby_landmarks = #{nearbyLandmarks}
-        </if>
-        <if test="mapX != null and mapX != ''">
-            ,s.map_x = #{mapX}
-        </if>
-        <if test="mapY != null and mapY != ''">
-            ,s.map_y = #{mapY}
-        </if>
-        where 1=1
-        <if test="bId != null and bId !=''">
-            and s.b_id = #{bId}
-        </if>
-        <if test="storeId != null and storeId !=''">
-            and s.store_id = #{storeId}
-        </if>
-    </update>
-
-</mapper>

+ 0 - 125
java110-generator/src/main/resources/dataSource.yml

@@ -1,125 +0,0 @@
-dataSources:
-  ds0: !!com.alibaba.druid.pool.DruidDataSource
-    driverClassName: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8
-    username: hc_community
-    password: hc_community@12345678
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-#  ds0_slave0: !!com.alibaba.druid.pool.DruidDataSource
-#    driverClassName: com.mysql.jdbc.Driver
-#    url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-#    username: TT
-#    password: TT@12345678
-#    connectionTimeoutMilliseconds: 30000
-#    idleTimeoutMilliseconds: 60000
-#    maxPoolSize: 50
-#    minPoolSize: 1
-#    maintenanceIntervalMilliseconds: 30000
-  ds1: !!com.alibaba.druid.pool.DruidDataSource
-    driverClassName: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-    username: TT
-    password: TT@12345678
-    minIdle: 5
-    validationQuery: SELECT 1 FROM DUAL
-    initialSize: 5
-    maxWait: 60000
-    filters: stat,wall,log4j
-    poolPreparedStatements: true
-#  ds1_slave0: !!com.alibaba.druid.pool.DruidDataSource
-#    driverClassName: com.mysql.jdbc.Driver
-#    url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8
-#    username: TT
-#    password: TT@12345678
-#    connectionTimeoutMilliseconds: 30000
-#    idleTimeoutMilliseconds: 60000
-#    maxPoolSize: 50
-#    minPoolSize: 1
-#    maintenanceIntervalMilliseconds: 30000
-
-shardingRule:
-  tables:
-    business_community:
-      actualDataNodes: ds${0..1}.business_community
-      databaseStrategy:
-        inline:
-          shardingColumn: community_id
-          algorithmExpression: ds${Long.parseLong(community_id) % 2}
-    s_community:
-      actualDataNodes: ds${0..1}.s_community
-      databaseStrategy:
-        inline:
-          shardingColumn: community_id
-          algorithmExpression: ds${Long.parseLong(community_id) % 2}
-    business_community_attr:
-      actualDataNodes: ds${0..1}.business_community_attr
-      databaseStrategy:
-        inline:
-          shardingColumn: community_id
-          algorithmExpression: ds${Long.parseLong(community_id) % 2}
-    s_community_attr:
-      actualDataNodes: ds${0..1}.s_community_attr
-      databaseStrategy:
-        inline:
-          shardingColumn: community_id
-          algorithmExpression: ds${Long.parseLong(community_id) % 2}
-    business_community_member:
-      actualDataNodes: ds${0..1}.business_community_member
-      databaseStrategy:
-        inline:
-          shardingColumn: community_id
-          algorithmExpression: ds${Long.parseLong(community_id) % 2}
-    business_community_photo:
-      actualDataNodes: ds${0..1}.business_community_photo
-      databaseStrategy:
-        inline:
-          shardingColumn: community_id
-          algorithmExpression: ds${Long.parseLong(community_id) % 2}
-    s_community_member:
-      actualDataNodes: ds${0..1}.s_community_member
-      databaseStrategy:
-        inline:
-          shardingColumn: community_id
-          algorithmExpression: ds${Long.parseLong(community_id) % 2}
-    s_community_photo:
-      actualDataNodes: ds${0..1}.s_community_photo
-      databaseStrategy:
-        inline:
-          shardingColumn: community_id
-          algorithmExpression: ds${Long.parseLong(community_id) % 2}
-  bindingTables:
-    - business_community
-    - s_community
-    - business_community_member
-    - business_community_photo
-    - s_community_member
-    - s_community_photo
-    - business_community_attr
-    - s_community_attr
-
-  defaultDataSourceName: ds1
-  defaultDatabaseStrategy:
-    inline:
-      shardingColumn: community_id
-      algorithmExpression: ds${Long.parseLong(community_id) % 2}
-  defaultTableStrategy:
-    none:
-
-#  masterSlaveRules:
-#    ms_ds0:
-#     masterDataSourceName: ds0
-#     slaveDataSourceNames:
-#       - ds0_slave0
-#     loadBalanceAlgorithmType: ROUND_ROBIN
-#   ms_ds1:
-#     masterDataSourceName: ds1
-#     slaveDataSourceNames:
-#       - ds1_slave0
-#     loadBalanceAlgorithmType: ROUND_ROBIN
-props:
-  sql.show: true

+ 0 - 3
java110-generator/src/main/resources/java110.properties

@@ -1,3 +0,0 @@
-java110.mappingPath=classpath:mapper/*/*.xml
-
-

+ 0 - 0
java110-generator/src/main/resources/listener/hello.java


+ 0 - 69
java110-generator/src/main/resources/newTemplate/DeleteCmd.txt

@@ -1,69 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.@@shareName@@.cmd.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.@@shareName@@.I@@TemplateCode@@V1InnerServiceSMO;
-import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-/**
- * 类表述:删除
- * 服务编码:@@templateCode@@.delete@@TemplateCode@@
- * 请求路劲:/app/@@templateCode@@.Delete@@TemplateCode@@
- * add by 吴学文 at @@date@@ mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "@@templateCode@@.delete@@TemplateCode@@")
-public class Delete@@TemplateCode@@Cmd extends AbstractServiceCmdListener {
-  private static Logger logger = LoggerFactory.getLogger(Delete@@TemplateCode@@Cmd.class);
-
-    @Autowired
-    private I@@TemplateCode@@V1InnerServiceSMO @@templateCode@@V1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        @@validateTemplateColumns@@
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       @@TemplateCode@@Po @@templateCode@@Po = BeanConvertUtil.covertBean(reqJson, @@TemplateCode@@Po.class);
-        int flag = @@templateCode@@V1InnerServiceSMOImpl.delete@@TemplateCode@@(@@templateCode@@Po);
-
-        if (flag < 1) {
-            throw new CmdException("删除数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 68
java110-generator/src/main/resources/newTemplate/IInnerServiceSMO.txt

@@ -1,68 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.intf.@@shareName@@;
-
-import com.java110.config.feign.FeignConfiguration;
-import com.java110.dto.store.StoreDto;
-import com.java110.po.store.StorePo;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-
-import java.util.List;
-
-/**
- * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
- * add by 吴学文 at @@date@@ mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@FeignClient(name = "@@shareName@@-service", configuration = {FeignConfiguration.class})
-@RequestMapping("/storeV1Api")
-public interface IStoreV1InnerServiceSMO {
-
-
-    @RequestMapping(value = "/saveStore", method = RequestMethod.POST)
-    public int saveStore(@RequestBody  StorePo storePo);
-
-    @RequestMapping(value = "/updateStore", method = RequestMethod.POST)
-    public int updateStore(@RequestBody  StorePo storePo);
-
-    @RequestMapping(value = "/deleteStore", method = RequestMethod.POST)
-    public int deleteStore(@RequestBody  StorePo storePo);
-
-    /**
-     * <p>查询小区楼信息</p>
-     *
-     *
-     * @param storeDto 数据对象分享
-     * @return StoreDto 对象数据
-     */
-    @RequestMapping(value = "/queryStores", method = RequestMethod.POST)
-    List<StoreDto> queryStores(@RequestBody StoreDto storeDto);
-
-    /**
-     * 查询<p>小区楼</p>总记录数
-     *
-     * @param storeDto 数据对象分享
-     * @return 小区下的小区楼记录数
-     */
-    @RequestMapping(value = "/queryStoresCount", method = RequestMethod.POST)
-    int queryStoresCount(@RequestBody StoreDto storeDto);
-}

+ 0 - 77
java110-generator/src/main/resources/newTemplate/IServiceDao.txt

@@ -1,77 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.@@shareName@@.dao;
-
-
-import com.java110.utils.exception.DAOException;
-import com.java110.entity.merchant.BoMerchant;
-import com.java110.entity.merchant.BoMerchantAttr;
-import com.java110.entity.merchant.Merchant;
-import com.java110.entity.merchant.MerchantAttr;
-
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 类表述:
- * add by 吴学文 at @@date@@ mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-public interface IStoreV1ServiceDao {
-
-
-    /**
-     * 保存 商户信息
-     * @param info
-     * @throws DAOException DAO异常
-     */
-    int saveStoreInfo(Map info) throws DAOException;
-
-
-
-
-    /**
-     * 查询商户信息(instance过程)
-     * 根据bId 查询商户信息
-     * @param info bId 信息
-     * @return 商户信息
-     * @throws DAOException DAO异常
-     */
-    List<Map> getStoreInfo(Map info) throws DAOException;
-
-
-
-    /**
-     * 修改商户信息
-     * @param info 修改信息
-     * @throws DAOException DAO异常
-     */
-    int updateStoreInfo(Map info) throws DAOException;
-
-
-    /**
-     * 查询商户总数
-     *
-     * @param info 商户信息
-     * @return 商户数量
-     */
-    int queryStoresCount(Map info);
-
-}

+ 0 - 89
java110-generator/src/main/resources/newTemplate/InnerServiceSMOImpl.txt

@@ -1,89 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.@@shareName@@.smo.impl;
-
-
-import com.java110.@@shareName@@.dao.IStoreV1ServiceDao;
-import com.java110.intf.@@shareName@@.IStoreV1InnerServiceSMO;
-import com.java110.dto.store.StoreDto;
-import com.java110.po.store.StorePo;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.core.base.smo.BaseServiceSMO;
-import com.java110.dto.user.UserDto;
-import com.java110.dto.PageDto;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
- * add by 吴学文 at @@date@@ mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@RestController
-public class StoreV1InnerServiceSMOImpl extends BaseServiceSMO implements IStoreV1InnerServiceSMO {
-
-    @Autowired
-    private IStoreV1ServiceDao storeV1ServiceDaoImpl;
-
-
-    @Override
-    public int saveStore(@RequestBody  StorePo storePo) {
-        int saveFlag = storeV1ServiceDaoImpl.saveStoreInfo(BeanConvertUtil.beanCovertMap(storePo));
-        return saveFlag;
-    }
-
-     @Override
-    public int updateStore(@RequestBody  StorePo storePo) {
-        int saveFlag = storeV1ServiceDaoImpl.updateStoreInfo(BeanConvertUtil.beanCovertMap(storePo));
-        return saveFlag;
-    }
-
-     @Override
-    public int deleteStore(@RequestBody  StorePo storePo) {
-       storePo.setStatusCd("1");
-       int saveFlag = storeV1ServiceDaoImpl.updateStoreInfo(BeanConvertUtil.beanCovertMap(storePo));
-       return saveFlag;
-    }
-
-    @Override
-    public List<StoreDto> queryStores(@RequestBody  StoreDto storeDto) {
-
-        //校验是否传了 分页信息
-
-        int page = storeDto.getPage();
-
-        if (page != PageDto.DEFAULT_PAGE) {
-            storeDto.setPage((page - 1) * storeDto.getRow());
-        }
-
-        List<StoreDto> stores = BeanConvertUtil.covertBeanList(storeV1ServiceDaoImpl.getStoreInfo(BeanConvertUtil.beanCovertMap(storeDto)), StoreDto.class);
-
-        return stores;
-    }
-
-
-    @Override
-    public int queryStoresCount(@RequestBody StoreDto storeDto) {
-        return storeV1ServiceDaoImpl.queryStoresCount(BeanConvertUtil.beanCovertMap(storeDto));    }
-
-}

+ 0 - 84
java110-generator/src/main/resources/newTemplate/ListCmd.txt

@@ -1,84 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.@@shareName@@.cmd.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.@@shareName@@.I@@TemplateCode@@V1InnerServiceSMO;
-import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import com.java110.dto.@@templateCode@@.@@TemplateCode@@Dto;
-import java.util.List;
-import java.util.ArrayList;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.HttpStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:查询
- * 服务编码:@@templateCode@@.list@@TemplateCode@@
- * 请求路劲:/app/@@templateCode@@.List@@TemplateCode@@
- * add by 吴学文 at @@date@@ mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "@@templateCode@@.list@@TemplateCode@@")
-public class List@@TemplateCode@@Cmd extends AbstractServiceCmdListener {
-
-  private static Logger logger = LoggerFactory.getLogger(List@@TemplateCode@@Cmd.class);
-    @Autowired
-    private I@@TemplateCode@@V1InnerServiceSMO @@templateCode@@V1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-           @@TemplateCode@@Dto @@templateCode@@Dto = BeanConvertUtil.covertBean(reqJson, @@TemplateCode@@Dto.class);
-
-           int count = @@templateCode@@V1InnerServiceSMOImpl.query@@TemplateCode@@sCount(@@templateCode@@Dto);
-
-           List<@@TemplateCode@@Dto> @@templateCode@@Dtos = null;
-
-           if (count > 0) {
-               @@templateCode@@Dtos = @@templateCode@@V1InnerServiceSMOImpl.query@@TemplateCode@@s(@@templateCode@@Dto);
-           } else {
-               @@templateCode@@Dtos = new ArrayList<>();
-           }
-
-           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, @@templateCode@@Dtos);
-
-           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-           cmdDataFlowContext.setResponseEntity(responseEntity);
-    }
-}

+ 0 - 33
java110-generator/src/main/resources/newTemplate/Po.txt

@@ -1,33 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.po.@@templateCode@@;
-
-import java.io.Serializable;
-import java.util.Date;
-/**
- * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
- * add by 吴学文 at @@date@@ mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-public class @@TemplateCode@@Po implements Serializable {
-
-    @@templateColumns@@
-
-
-}

+ 0 - 74
java110-generator/src/main/resources/newTemplate/SaveCmd.txt

@@ -1,74 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.@@shareName@@.cmd.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.@@shareName@@.I@@TemplateCode@@V1InnerServiceSMO;
-import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 类表述:保存
- * 服务编码:@@templateCode@@.save@@TemplateCode@@
- * 请求路劲:/app/@@templateCode@@.Save@@TemplateCode@@
- * add by 吴学文 at @@date@@ mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "@@templateCode@@.save@@TemplateCode@@")
-public class Save@@TemplateCode@@Cmd extends AbstractServiceCmdListener {
-
-    private static Logger logger = LoggerFactory.getLogger(Save@@TemplateCode@@Cmd.class);
-
-    public static final String CODE_PREFIX_ID = "10";
-
-    @Autowired
-    private I@@TemplateCode@@V1InnerServiceSMO @@templateCode@@V1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        @@validateTemplateColumns@@
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       @@TemplateCode@@Po @@templateCode@@Po = BeanConvertUtil.covertBean(reqJson, @@TemplateCode@@Po.class);
-        @@templateCode@@Po.set@@TemplateKey@@(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
-        int flag = @@templateCode@@V1InnerServiceSMOImpl.save@@TemplateCode@@(@@templateCode@@Po);
-
-        if (flag < 1) {
-            throw new CmdException("保存数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 46
java110-generator/src/main/resources/newTemplate/ServiceCodeConstant.txt

@@ -1,46 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.utils.constant;
-
-/**
- * @@templateName@@常量类
- * Created by wuxw on 2017/5/20.
- */
-public class ServiceCode@@TemplateCode@@Constant {
-
-    /**
-     * 添加 @@templateName@@
-     */
-    public static final String ADD_@@TEMPLATECODE@@ = "@@templateCode@@.save@@TemplateCode@@";
-
-
-    /**
-     * 修改 @@templateName@@
-     */
-    public static final String UPDATE_@@TEMPLATECODE@@ = "@@templateCode@@.update@@TemplateCode@@";
-    /**
-     * 删除 @@templateName@@
-     */
-    public static final String DELETE_@@TEMPLATECODE@@ = "@@templateCode@@.delete@@TemplateCode@@";
-
-
-    /**
-     * 查询 @@templateName@@
-     */
-    public static final String LIST_@@TEMPLATECODE@@S = "@@templateCode@@.list@@TemplateCode@@s";
-
-
-}

+ 0 - 112
java110-generator/src/main/resources/newTemplate/ServiceDaoImpl.txt

@@ -1,112 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.@@shareName@@.dao.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.exception.DAOException;
-import com.java110.utils.util.DateUtil;
-import com.java110.core.base.dao.BaseServiceDao;
-import com.java110.@@shareName@@.dao.IStoreV1ServiceDao;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 类表述:
- * add by 吴学文 at @@date@@ mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Service("storeV1ServiceDaoImpl")
-public class StoreV1ServiceDaoImpl extends BaseServiceDao implements IStoreV1ServiceDao {
-
-    private static Logger logger = LoggerFactory.getLogger(StoreV1ServiceDaoImpl.class);
-
-
-
-
-
-    /**
-     * 保存商户信息 到 instance
-     * @param info   bId 信息
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public int saveStoreInfo(Map info) throws DAOException {
-        logger.debug("保存 saveStoreInfo 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("storeV1ServiceDaoImpl.saveStoreInfo",info);
-
-        return saveFlag;
-    }
-
-
-    /**
-     * 查询商户信息(instance)
-     * @param info bId 信息
-     * @return List<Map>
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public List<Map> getStoreInfo(Map info) throws DAOException {
-        logger.debug("查询 getStoreInfo 入参 info : {}",info);
-
-        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeV1ServiceDaoImpl.getStoreInfo",info);
-
-        return businessStoreInfos;
-    }
-
-
-    /**
-     * 修改商户信息
-     * @param info 修改信息
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public int updateStoreInfo(Map info) throws DAOException {
-        logger.debug("修改 updateStoreInfo 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("storeV1ServiceDaoImpl.updateStoreInfo",info);
-
-        return saveFlag;
-    }
-
-     /**
-     * 查询商户数量
-     * @param info 商户信息
-     * @return 商户数量
-     */
-    @Override
-    public int queryStoresCount(Map info) {
-        logger.debug("查询 queryStoresCount 入参 info : {}",info);
-
-        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeV1ServiceDaoImpl.queryStoresCount", info);
-        if (businessStoreInfos.size() < 1) {
-            return 0;
-        }
-
-        return Integer.parseInt(businessStoreInfos.get(0).get("count").toString());
-    }
-
-
-}

+ 0 - 37
java110-generator/src/main/resources/newTemplate/ServiceDaoImplMapper.txt

@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="storeV1ServiceDaoImpl">
-
-
-
-
-
-    <!-- 保存商户信息 add by wuxw 2018-07-03 -->
-    <insert id="saveStoreInfo" parameterType="Map">
-        $saveInfo$
-    </insert>
-
-
-
-    <!-- 查询商户信息 add by wuxw 2018-07-03 -->
-    <select id="getStoreInfo" parameterType="Map" resultType="Map">
-        $getInfo$
-    </select>
-
-
-
-
-    <!-- 修改商户信息 add by wuxw 2018-07-03 -->
-    <update id="updateStoreInfo" parameterType="Map">
-        $updateInfoInstance$
-    </update>
-
-    <!-- 查询商户数量 add by wuxw 2018-07-03 -->
-     <select id="queryStoresCount" parameterType="Map" resultType="Map">
-        $queryCount$
-
-     </select>
-
-</mapper>

+ 0 - 73
java110-generator/src/main/resources/newTemplate/UpdateCmd.txt

@@ -1,73 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.@@shareName@@.cmd.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.core.annotation.Java110Cmd;
-import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
-import com.java110.core.event.cmd.CmdEvent;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.intf.@@shareName@@.I@@TemplateCode@@V1InnerServiceSMO;
-import com.java110.po.@@templateCode@@.@@TemplateCode@@Po;
-import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.vo.ResultVo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * 类表述:更新
- * 服务编码:@@templateCode@@.update@@TemplateCode@@
- * 请求路劲:/app/@@templateCode@@.Update@@TemplateCode@@
- * add by 吴学文 at @@date@@ mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-@Java110Cmd(serviceCode = "@@templateCode@@.update@@TemplateCode@@")
-public class Update@@TemplateCode@@Cmd extends AbstractServiceCmdListener {
-
-  private static Logger logger = LoggerFactory.getLogger(Update@@TemplateCode@@Cmd.class);
-
-
-    @Autowired
-    private I@@TemplateCode@@V1InnerServiceSMO @@templateCode@@V1InnerServiceSMOImpl;
-
-    @Override
-    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
-        @@validateTemplateColumns@@
-    }
-
-    @Override
-    @Java110Transactional
-    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
-       @@TemplateCode@@Po @@templateCode@@Po = BeanConvertUtil.covertBean(reqJson, @@TemplateCode@@Po.class);
-        int flag = @@templateCode@@V1InnerServiceSMOImpl.update@@TemplateCode@@(@@templateCode@@Po);
-
-        if (flag < 1) {
-            throw new CmdException("更新数据失败");
-        }
-
-        cmdDataFlowContext.setResponseEntity(ResultVo.success());
-    }
-}

+ 0 - 56
java110-generator/src/main/resources/newTemplate/dto.txt

@@ -1,56 +0,0 @@
-/*
- * Copyright 2017-2020 吴学文 and java110 team.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.java110.dto.@@templateCode@@;
-
-import com.java110.dto.PageDto;
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * 类表述: dto 实体对象 只是作为数据载体 用于查询等数据载体
- * add by 吴学文 at @@date@@ mail: 928255095@qq.com
- * open source address: https://gitee.com/wuxw7/MicroCommunity
- * 官网:http://www.homecommunity.cn
- * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
- * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
- */
-public class StoreDto extends PageDto implements Serializable {
-
-    $beanVariable$
-
-    private Date createTime;
-
-    private String statusCd = "0";
-
-
-    $beanVariableGetSet$
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    public String getStatusCd() {
-        return statusCd;
-    }
-
-    public void setStatusCd(String statusCd) {
-        this.statusCd = statusCd;
-    }
-}

+ 0 - 16
java110-generator/src/main/resources/relationship/add/add.html

@@ -1,16 +0,0 @@
-<div class="row">
-    <div class="col-lg-12">
-        <div class="ibox">
-            <div class="ibox-title">
-                <h5>@@templateName@@</h5>
-                <div class="ibox-tools" style="top:10px;">
-
-                </div>
-            </div>
-            <div class="ibox-content">
-
-                @@addTemplateColumns@@
-            </div>
-        </div>
-    </div>
-</div>

+ 0 - 49
java110-generator/src/main/resources/relationship/add/add.js

@@ -1,49 +0,0 @@
-(function(vc){
-
-    vc.extends({
-        propTypes: {
-           callBackListener:vc.propTypes.string, //父组件名称
-           callBackFunction:vc.propTypes.string //父组件监听方法
-        },
-        data:{
-            @@columnTemplateCode@@ViewInfo:{
-                flowComponent:'@@columnTemplateCode@@View',
-                @@templateCodeColumns@@
-            }
-        },
-        watch:{
-            @@columnTemplateCode@@ViewInfo:{
-                deep: true,
-                handler:function(){
-                    vc.component.save@@ColumnTemplateCode@@Info();
-                }
-             }
-        },
-         _initMethod:function(){
-
-         },
-         _initEvent:function(){
-
-            vc.on('@@columnTemplateCode@@ViewInfo', 'onIndex', function(_index){
-                vc.component.@@columnTemplateCode@@ViewInfo.index = _index;
-            });
-        },
-        methods:{
-            @@columnTemplateCode@@Validate(){
-                return vc.validate.validate({
-                    @@columnTemplateCode@@ViewInfo:vc.component.@@columnTemplateCode@@ViewInfo
-                },{
-                    @@addTemplateCodeValidate@@
-                });
-            },
-            save@@ColumnTemplateCode@@Info:function(){
-                if(vc.component.@@columnTemplateCode@@Validate()){
-                    //侦听回传
-                    vc.emit($props.callBackListener,$props.callBackFunction, vc.component.@@columnTemplateCode@@ViewInfo);
-                    return ;
-                }
-            }
-        }
-    });
-
-})(window.vc);

+ 0 - 34
java110-generator/src/main/resources/relationship/binding/BindingComponent.java

@@ -1,34 +0,0 @@
-package com.java110.api.components.@@templateCode@@;
-
-import com.java110.core.context.IPageData;
-import com.java110.api.smo.complaint.IAdd@@TemplateCode@@SMO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Component;
-@@tableCode@@
-/**
- * 添加@@templateName@@组件
- */
-@Component("@@templateCode@@Binding")
-public class @@TemplateCode@@BindingComponent {
-
-    @Autowired
-    private I@@TemplateCode@@BindingSMO @@templateCode@@BindingSMOImpl;
-
-    /**
-     * 添加@@templateName@@数据
-     * @param pd 页面数据封装
-     * @return ResponseEntity 对象
-     */
-    public ResponseEntity<String> binding(IPageData pd){
-        return @@templateCode@@BindingSMOImpl.binding@@TemplateCode@@(pd);
-    }
-
-    public I@@TemplateCode@@BindingSMO get@@TemplateCode@@BindingSMOImpl() {
-        return @@templateCode@@BindingSMOImpl;
-    }
-
-    public void set@@TemplateCode@@BindingSMOImpl(I@@TemplateCode@@BindingSMO @@templateCode@@BindingSMOImpl) {
-        this.@@templateCode@@BindingSMOImpl = @@templateCode@@BindingSMOImpl;
-    }
-}

+ 0 - 110
java110-generator/src/main/resources/relationship/binding/BindingListener.java

@@ -1,110 +0,0 @@
-package com.java110.api.listener.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.util.StringUtil;
-import com.java110.api.listener.AbstractServiceApiListener;
-import com.java110.utils.util.Assert;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.AppService;
-import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.CommonConstant;
-import com.java110.utils.constant.ServiceCodeConstant;
-import com.java110.utils.constant.BusinessTypeConstant;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.utils.constant.ServiceCode@@TemplateCode@@Constant;
-
-
-
-
-import com.java110.core.annotation.Java110Listener;
-/**
- * 保存小区侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("binding@@TemplateCode@@Listener")
-public class Binding@@TemplateCode@@Listener extends AbstractServiceApiListener {
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
-        JSONArray infos = reqJson.getJSONArray("data");
-
-        @@validateTemplateColumns@@
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        HttpHeaders header = new HttpHeaders();
-        context.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD, "D");
-        JSONArray businesses = new JSONArray();
-
-        AppService service = event.getAppService();
-
-
-        JSONArray infos = reqJson.getJSONArray("data");
-
-
-        @@doSoService@@
-
-
-        JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
-
-        //将 rest header 信息传递到下层服务中去
-        super.freshHttpHeader(header, context.getRequestCurrentHeaders());
-
-        ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj);
-
-        context.setResponseEntity(responseEntity);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCode@@TemplateCode@@Constant.BINDING_@@TEMPLATECODE@@;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-    @Override
-    public int getOrder() {
-        return DEFAULT_ORDER;
-    }
-
-
-    @@bindingMethod@@
-
-
-
-
-    private boolean hasKey(JSONObject info, String key){
-        if(!info.containsKey(key)
-            || StringUtil.isEmpty(info.getString(key))
-            || info.getString(key).startsWith("-")){
-            return false;
-        }
-        return true;
-
-    }
-
-    private JSONObject getObj(JSONArray infos , String flowComponent){
-
-        JSONObject serviceInfo = null;
-
-        for(int infoIndex = 0 ; infoIndex < infos.size(); infoIndex ++){
-
-            Assert.hasKeyAndValue(infos.getJSONObject(infoIndex), "flowComponent", "未包含服务流程组件名称");
-
-            if(flowComponent.equals(infos.getJSONObject(infoIndex).getString("flowComponent"))){
-                serviceInfo = infos.getJSONObject(infoIndex);
-                Assert.notNull(serviceInfo, "未包含服务信息");
-                return serviceInfo;
-            }
-         }
-
-        throw new IllegalArgumentException("未找到组件编码为【" + flowComponent + "】数据");
-     }
-
-
-}

+ 0 - 60
java110-generator/src/main/resources/relationship/binding/BindingSMOImpl.java

@@ -1,60 +0,0 @@
-package com.java110.api.smo.@@templateCode@@.impl;
-
-import com.java110.utils.constant.PrivilegeCodeConstant;
-import com.java110.utils.constant.ServiceConstant;
-import com.java110.utils.util.Assert;
-import com.java110.core.context.IPageData;
-import com.java110.api.core.AbstractComponentSMO;
-import com.java110.api.smo.@@templateCode@@
-import org.springframework.stereotype.Service;.IAdd@@TemplateCode@@SMO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
-
-/**
- * 添加小区服务实现类
- * add by wuxw 2019-06-30
- */
-@Service("@@templateCode@@BindingSMOImpl")
-public class @@TemplateCode@@BindingSMOImpl extends DefaultAbstractComponentSMO implements I@@TemplateCode@@BindingSMO {
-
-    @Autowired
-    private RestTemplate restTemplate;
-
-    @Override
-    protected void validate(IPageData pd, JSONObject paramIn) {
-
-        //super.validatePageInfo(pd);
-        JSONArray infos = paramIn.getJSONArray("data");
-        //Assert.hasKeyAndValue(paramIn, "xxx", "xxx");
-        @@validateTemplateColumns@@
-
-
-        super.checkUserHasPrivilege(pd, restTemplate, PrivilegeCodeConstant.@@TEMPLATECODE@@);
-
-    }
-
-    @Override
-    protected ResponseEntity<String> doBusinessProcess(IPageData pd, JSONObject paramIn) {
-        ResponseEntity<String> responseEntity = null;
-        super.validateStoreStaffCommunityRelationship(pd, restTemplate);
-
-        responseEntity = this.callCenterService(restTemplate, pd, paramIn.toJSONString(),
-                 ServiceCode@@TemplateCode@@Constant.BINDING_@@TEMPLATECODE@@,
-                HttpMethod.POST);
-        return responseEntity;
-    }
-
-    @Override
-    public ResponseEntity<String> binding@@TemplateCode@@(IPageData pd) {
-        return super.businessProcess(pd);
-    }
-
-    public RestTemplate getRestTemplate() {
-        return restTemplate;
-    }
-
-    public void setRestTemplate(RestTemplate restTemplate) {
-        this.restTemplate = restTemplate;
-    }
-}

+ 0 - 18
java110-generator/src/main/resources/relationship/binding/IBindingSMO.java

@@ -1,18 +0,0 @@
-package com.java110.api.smo.community;
-
-import com.java110.core.context.IPageData;
-
-/**
- * 添加@@templateName@@接口
- *
- * add by wuxw 2019-06-30
- */
-public interface I@@TemplateCode@@BindingSMO {
-
-    /**
-     * 添加@@templateName@@
-     * @param pd 页面数据封装
-     * @return ResponseEntity 对象
-     */
-    ResponseEntity<String> binding@@TemplateCode@@(IPageData pd);
-}

+ 0 - 20
java110-generator/src/main/resources/relationship/binding/binding.html

@@ -1,20 +0,0 @@
-<div id="component" >
-
-    <div class="java110_step">
-        <div id="step" ></div>
-    </div>
-
-    <!-- 选择 应用信息 -->
-    @@allStep@@
-
-
-    <div class="row">
-        <div class="col-md-10"></div>
-        <div class="col-md-2 " style="margin-bottom:10px; text-align:right">
-            <button type="button" class="btn btn-secondary" v-on:click="_prevStep()">上一步</button>
-            <button v-if="@@templateCode@@Info.index != @@stepLastIndex@@" type="button" class="btn btn-primary" style="margin-left:10px;" v-on:click="_nextStep()">下一步</button>
-            <button v-if="@@templateCode@@Info.index == @@stepLastIndex@@" type="button" class="btn btn-primary" style="margin-left:10px;" v-on:click="_finishStep()">完成</button>
-        </div>
-    </div>
-
-</div>

+ 0 - 83
java110-generator/src/main/resources/relationship/binding/binding.js

@@ -1,83 +0,0 @@
-/**
-    入驻小区
-**/
-(function(vc){
-    vc.extends({
-        data:{
-            @@templateCode@@Info:{
-                $step:{},
-                index:0,
-                infos:[]
-            }
-        },
-        _initMethod:function(){
-            vc.component._initStep();
-        },
-        _initEvent:function(){
-            vc.on("@@templateCode@@", "notify", function(_info){
-                vc.component.@@templateCode@@Info.infos[vc.component.@@templateCode@@Info.index] = _info;
-            });
-
-        },
-        methods:{
-            _initStep:function(){
-                vc.component.@@templateCode@@Info.$step = $("#step");
-                vc.component.@@templateCode@@Info.$step.step({
-                    index: 0,
-                    time: 500,
-                    title: @@stepTitle@@
-                });
-                vc.component.@@templateCode@@Info.index = vc.component.@@templateCode@@Info.$step.getIndex();
-            },
-            _prevStep:function(){
-                vc.component.@@templateCode@@Info.$step.prevStep();
-                vc.component.@@templateCode@@Info.index = vc.component.@@templateCode@@Info.$step.getIndex();
-
-                @@notifyOnIndex@@
-            },
-            _nextStep:function(){
-                var _currentData = vc.component.@@templateCode@@Info.infos[vc.component.@@templateCode@@Info.index];
-                if( _currentData == null || _currentData == undefined){
-                    vc.message("请选择或填写必选信息");
-                    return ;
-                }
-                vc.component.@@templateCode@@Info.$step.nextStep();
-                vc.component.@@templateCode@@Info.index = vc.component.@@templateCode@@Info.$step.getIndex();
-
-                 @@notifyOnIndex@@
-            },
-            _finishStep:function(){
-
-
-                @@needCheckCurrentData@@
-
-                var param = {
-                    data:vc.component.@@templateCode@@Info.infos
-                }
-
-               vc.http.post(
-                   '@@templateCode@@Binding',
-                   'binding',
-                   JSON.stringify(param),
-                   {
-                       emulateJSON:true
-                    },
-                    function(json,res){
-                       if(res.status == 200){
-
-                           vc.message('处理成功',true);
-                           //关闭model
-                           vc.jumpToPage("@@jumpUrl@@?" + vc.objToGetParam(JSON.parse(json)));
-                           return ;
-                       }
-                       vc.message(json);
-                    },
-                    function(errInfo,error){
-                       console.log('请求失败处理');
-
-                       vc.message(errInfo);
-                    });
-            }
-        }
-    });
-})(window.vc);

+ 0 - 16
java110-generator/src/main/resources/relationship/constant/ServiceCodeConstant.java

@@ -1,16 +0,0 @@
-package com.java110.utils.constant;
-
-/**
- * @@templateName@@常量类
- * Created by wuxw on 2017/5/20.
- */
-public class ServiceCode@@TemplateCode@@Constant {
-
-    /**
-     * 添加 @@templateName@@
-     */
-    public static final String BINDING_@@TEMPLATECODE@@ = "@@constantVariable@@";
-
-
-
-}

+ 0 - 38
java110-generator/src/main/resources/relationship/flow.html

@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html lang="en"
-      xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:th="http://www.thymeleaf.org"
-      xmlns:vc="http://www.thymeleaf.org">
-<head>
-    <meta charset="UTF-8"/>
-    <title>@@templateName@@|java110</title>
-    <vc:create name="commonTop"></vc:create>
-    <link href="/css/jquery.step.css" rel="stylesheet"/>
-    <script src="/js/jquery.step.min.js" ></script>
-</head>
-<body>
-<vc:create name="bodyTop"></vc:create>
-<div id="wrapper">
-    <vc:create name="menu"></vc:create>
-
-
-    <div id="page-wrapper" class="gray-bg dashbard-1">
-        <div class="row border-bottom">
-            <vc:create name="nav"></vc:create>
-        </div>
-        <div class="wrapper wrapper-content" style="padding-bottom: 0px;">
-            <vc:create name="breadcrumb"></vc:create>
-        </div>
-        <!-- id="component" -->
-        <div class="wrapper wrapper-content animated fadeInRight">
-            <vc:create name="@@templateCode@@"></vc:create>
-        </div>
-
-        <vc:create name="copyright"></vc:create>
-
-    </div>
-</div>
-
-<vc:create name="commonBottom"></vc:create>
-</body>
-</html>

+ 0 - 100
java110-generator/src/main/resources/relationship/template_1.json

@@ -1,100 +0,0 @@
-{
-  "templateName":"登记投诉建议",
-  "templateCode":"addComplaintStep",
-  "templateKey":"complaintId",
-  "templateKeyName":"投诉ID",
-  "package": "complaintPackage",
-  "successUrl": "/flow/complaintFlow",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"viewFloorInfo",
-      "flowKey": "floorId",
-      "cnCode":"选择楼栋",
-      "vcName":"viewFloorInfo",
-      "businessName": "businessFloor",
-      "businessType": "BUSINESS_TYPE_SAVE_FlOOR_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"sellRoomSelectRoom",
-      "flowKey": "roomId",
-      "cnCode":"选择房屋",
-      "vcName":"sellRoomSelectRoom",
-      "businessName": "businessRoom",
-      "businessType": "BUSINESS_TYPE_SAVE_ROOM_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 2,
-      "code":"addComplain",
-      "flowKey": "complainId",
-      "cnCode":"投诉建议",
-      "vcName":"addComplain",
-      "businessName": "businessComplain",
-      "businessType": "BUSINESS_TYPE_SAVE_COMPLAIN_INFO",
-      "existsComponent": false
-    }
-  ],
-  "components": {
-    "addComplain": {
-      "templateName": "投诉建议",
-      "templateCode": "addComplain",
-      "package": "complaintPackage",
-      "columns": [
-        {
-          "code": "typeCd",
-          "cnCode":"投诉类型",
-          "desc":"必填,请选择投诉类型",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType": "select",
-          "selectValue":"809001,809002",
-          "selectValueName":"投诉,建议",
-          "limit":"num",
-          "limitParam":"",
-          "limitErrInfo":"投诉类型格式错误",
-          "show": true
-        },
-        {
-          "code":"complaintName",
-          "cnCode":"投诉人",
-          "desc":"必填,请填写投诉人",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"input",
-          "limit":"maxLength",
-          "limitParam":"200",
-          "limitErrInfo":"投诉人不能大于200位",
-          "show": false
-        },
-        {
-          "code":"tel",
-          "cnCode":"投诉电话",
-          "desc":"必填,请填写投诉电话",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"input",
-          "limit":"phone",
-          "limitParam":"",
-          "limitErrInfo":"投诉电话格式错误",
-          "show": true
-        },
-        {
-          "code":"context",
-          "cnCode":"投诉内容",
-          "desc":"必填,请填写投诉内容",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"textarea",
-          "limit":"maxLength",
-          "limitParam":"4000",
-          "limitErrInfo":"投诉状态超过4000位",
-          "show": false
-        }
-      ]
-    }
-  }
-}

+ 0 - 110
java110-generator/src/main/resources/relationship/template_addAuditUserStep.json

@@ -1,110 +0,0 @@
-{
-  "templateName":"添加审核人员",
-  "templateCode":"addAuditUserStep",
-  "templateKey":"auditUserId",
-  "templateKeyName":"审核人员Id",
-  "package": "auditUserPackage",
-  "successUrl": "/flow/auditUserFlow",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"branchOrg",
-      "flowKey": "branchOrgId",
-      "cnCode":"选择分公司",
-      "vcName":"viewOrgInfo",
-      "businessName": "businessOrg",
-      "businessType": "BUSINESS_TYPE_SAVE_ORG_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"departmentOrg",
-      "flowKey": "departmentOrgId",
-      "cnCode":"选择部门",
-      "vcName":"viewOrgInfo",
-      "businessName": "businessOrg",
-      "businessType": "BUSINESS_TYPE_SAVE_ORG_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 2,
-      "code":"staff",
-      "flowKey": "userId",
-      "cnCode":"选择员工",
-      "vcName":"viewStaffInfo",
-      "businessName": "businessStaff",
-      "businessType": "BUSINESS_TYPE_SAVE_STAFF_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 3,
-      "code":"addAuditUserOther",
-      "flowKey": "auditUserId",
-      "cnCode":"扩展信息",
-      "vcName":"addAuditUserOther",
-      "businessName": "addAuditUserOther",
-      "businessType": "BUSINESS_TYPE_SAVE_AUDIT_USER_INFO",
-      "existsComponent": false
-    }
-  ],
-  "components": {
-    "addAuditUserOther": {
-      "templateName": "扩展信息",
-      "templateCode": "addAuditUserOther",
-      "package": "auditUserPackage",
-      "columns": [
-        {
-          "code":"userId",
-          "cnCode":"用户ID",
-          "desc":"必填,请填写用户ID",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"input",
-          "limit":"num",
-          "limitParam":"",
-          "limitErrInfo":"用户ID必须为数字",
-          "show": true
-        },
-        {
-          "code":"userName",
-          "cnCode":"用户名称",
-          "desc":"必填,请填写用户名称",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"input",
-          "limit":"maxin",
-          "limitParam":"2,50",
-          "limitErrInfo":"用户名称必须在2至50字符之间",
-          "show": true
-        },
-        {
-          "code":"auditLink",
-          "cnCode":"审核环节",
-          "desc":"必填,请选择审核环节",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"select",
-          "selectValue":"809001,809002,809003",
-          "selectValueName":"部门主管,财务主管,采购人员",
-          "limit":"num",
-          "limitParam":"",
-          "limitErrInfo":"审核环节格式错误",
-          "show": true
-        },
-        {
-          "code":"objCode",
-          "cnCode":"流程对象",
-          "desc":"必填,请填写流程对象",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"input",
-          "limit":"maxLength",
-          "limitParam":"64",
-          "limitErrInfo":"物品库存不能大于64位",
-          "show": false
-        }
-      ]
-    }
-  }
-}

+ 0 - 101
java110-generator/src/main/resources/relationship/template_complaint.json

@@ -1,101 +0,0 @@
-{
-  "tableName":"complaint",
-  "templateName":"登记投诉建议",
-  "templateCode":"addComplaintStep",
-  "templateKey":"complaintId",
-  "templateKeyName":"投诉ID",
-  "package": "complaintPackage",
-  "successUrl": "/flow/complaintFlow",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"viewFloorInfo",
-      "flowKey": "floorId",
-      "cnCode":"选择楼栋",
-      "vcName":"viewFloorInfo",
-      "businessName": "businessFloor",
-      "businessType": "BUSINESS_TYPE_SAVE_FlOOR_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"sellRoomSelectRoom",
-      "flowKey": "roomId",
-      "cnCode":"选择房屋",
-      "vcName":"sellRoomSelectRoom",
-      "businessName": "businessRoom",
-      "businessType": "BUSINESS_TYPE_SAVE_ROOM_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 2,
-      "code":"addComplain",
-      "flowKey": "complainId",
-      "cnCode":"投诉建议",
-      "vcName":"addComplain",
-      "businessName": "businessComplain",
-      "businessType": "BUSINESS_TYPE_SAVE_COMPLAIN_INFO",
-      "existsComponent": false
-    }
-  ],
-  "components": {
-    "addComplain": {
-      "templateName": "投诉建议",
-      "templateCode": "addComplain",
-      "package": "complaintPackage",
-      "columns": [
-        {
-          "code": "typeCd",
-          "cnCode":"投诉类型",
-          "desc":"必填,请选择投诉类型",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType": "select",
-          "selectValue":"809001,809002",
-          "selectValueName":"投诉,建议",
-          "limit":"num",
-          "limitParam":"",
-          "limitErrInfo":"投诉类型格式错误",
-          "show": true
-        },
-        {
-          "code":"complaintName",
-          "cnCode":"投诉人",
-          "desc":"必填,请填写投诉人",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"input",
-          "limit":"maxLength",
-          "limitParam":"200",
-          "limitErrInfo":"投诉人不能大于200位",
-          "show": false
-        },
-        {
-          "code":"tel",
-          "cnCode":"投诉电话",
-          "desc":"必填,请填写投诉电话",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"input",
-          "limit":"phone",
-          "limitParam":"",
-          "limitErrInfo":"投诉电话格式错误",
-          "show": true
-        },
-        {
-          "code":"context",
-          "cnCode":"投诉内容",
-          "desc":"必填,请填写投诉内容",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"textarea",
-          "limit":"maxLength",
-          "limitParam":"4000",
-          "limitErrInfo":"投诉状态超过4000位",
-          "show": false
-        }
-      ]
-    }
-  }
-}

+ 0 - 159
java110-generator/src/main/resources/relationship/template_configMenu.json

@@ -1,159 +0,0 @@
-{
-  "templateName":"配置菜单",
-  "templateCode":"configMenu",
-  "templateKey":"mId",
-  "templateKeyName":"菜单ID",
-  "package": "menuPackage",
-  "successUrl": "/flow/menuFlow",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"menuGroup",
-      "flowKey": "gId",
-      "cnCode":"选择菜单组",
-      "vcName":"viewMenuGroupInfo",
-      "businessName": "businessMenuGroup",
-      "businessType": "BUSINESS_TYPE_SAVE_MENU_GROUP_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"menu",
-      "flowKey": "mId",
-      "cnCode":"菜单信息",
-      "vcName":"addMenuView",
-      "businessName": "businessMenu",
-      "businessType": "BUSINESS_TYPE_SAVE_MENU_INFO",
-      "existsComponent": false
-    },
-    {
-      "index": 2,
-      "code":"privilege",
-      "flowKey": "pId",
-      "cnCode":"权限信息",
-      "vcName":"addPrivilegeView",
-      "businessName": "businessPrivilege",
-      "businessType": "BUSINESS_TYPE_SAVE_PRIVILEGE_INFO",
-      "existsComponent": false
-    }
-  ],
-  "components": {
-      "addMenuView": {
-        "templateName":"菜单信息",
-        "templateCode":"addMenu",
-        "package": "menuPackage",
-        "columns":[
-          {
-            "code":"name",
-            "cnCode":"菜单名称",
-            "desc":"必填,请填写菜单名称",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"maxin",
-            "limitParam":"2,10",
-            "limitErrInfo":"菜单名称必须在2至10字符之间",
-            "show": true
-          },
-          {
-            "code":"url",
-            "cnCode":"菜单地址",
-            "desc":"必填,请菜单菜单地址",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"maxin",
-            "limitParam":"2,10",
-            "limitErrInfo":"菜单名称必须在2至10字符之间",
-            "show": true
-          },
-          {
-            "code":"seq",
-            "cnCode":"序列",
-            "desc":"必填,请填写序列",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"num",
-            "limitParam":"",
-            "limitErrInfo":"序列必须为整数",
-            "show": true
-          },
-          {
-            "code":"isShow",
-            "cnCode":"菜单显示",
-            "desc":"必填,请选择是否显示菜单",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"select",
-            "selectValue":"Y,N",
-            "selectValueName":"显示菜单,不显示菜单",
-            "limit":"maxin",
-            "limitParam":"1,12",
-            "limitErrInfo":"菜单显示错误",
-            "show": true
-          },
-          {
-            "code":"description",
-            "cnCode":"描述",
-            "desc":"可填,请填写描述",
-            "required":false,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"textarea",
-            "limit":"maxLength",
-            "limitParam":"200",
-            "limitErrInfo":"备注内容不能超过200",
-            "show": false
-          }
-        ]
-      },
-    "addPrivilegeView": {
-      "templateName":"权限信息",
-      "templateCode":"addPrivilege",
-      "package": "privilegePackage",
-      "columns":[
-        {
-          "code":"name",
-          "cnCode":"权限名称",
-          "desc":"必填,请填写权限名称",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"input",
-          "limit":"maxin",
-          "limitParam":"2,10",
-          "limitErrInfo":"权限名称必须在2至10字符之间",
-          "show": true
-        },
-        {
-          "code":"domain",
-          "cnCode":"商户类型",
-          "desc":"必填,请选择商户类型",
-          "required":true,
-          "hasDefaultValue":false,
-          "inputType":"select",
-          "selectValue":"800900000001,800900000002,800900000003,800900000000",
-          "selectValueName":"运营团队,代理商,物业,开发团队",
-          "limit":"maxin",
-          "limitParam":"1,12",
-          "limitErrInfo":"商户类型错误",
-          "show": true
-        },
-        {
-          "code":"description",
-          "cnCode":"描述",
-          "desc":"可填,请填写描述",
-          "required":false,
-          "hasDefaultValue":false,
-          "defaultValue":"",
-          "inputType":"textarea",
-          "limit":"maxLength",
-          "limitParam":"200",
-          "limitErrInfo":"备注内容不能超过200",
-          "show": false
-        }
-      ]
-    }
-  }
-}

+ 0 - 148
java110-generator/src/main/resources/relationship/template_devService.json

@@ -1,148 +0,0 @@
-{
-  "templateName":"开发服务提供",
-  "templateCode":"devServiceProvide",
-  "templateKey":"id",
-  "templateKeyName":"提供ID",
-  "package": "serviceProvidePackage",
-  "successUrl": "/flow/devServiceProvideFlow",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"service",
-      "flowKey": "serviceId",
-      "cnCode":"选择服务",
-      "vcName":"viewServiceInfo",
-      "businessName": "businessService",
-      "businessType": "BUSINESS_TYPE_SAVE_SERVICE_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"devServiceProvide",
-      "flowKey": "devId",
-      "cnCode":"开发服务实现",
-      "vcName":"devServiceProvideView",
-      "businessName": "businessDev",
-      "businessType": "BUSINESS_TYPE_SAVE_DEV_INFO",
-      "existsComponent": false
-    },
-    {
-      "index": 2,
-      "code":"serviceProvideRemark",
-      "flowKey": "remarkId",
-      "cnCode":"备注信息",
-      "vcName":"serviceProvideRemarkView",
-      "businessName": "businessServiceProvideRemark",
-      "businessType": "BUSINESS_TYPE_SAVE_REMARK_INFO",
-      "existsComponent": false
-    }
-  ],
-  "components": {
-      "devServiceProvideView": {
-        "templateName":"开发服务实现",
-        "templateCode":"devServiceProvide",
-        "package": "serviceProvidePackage",
-        "columns":[
-          {
-            "code":"queryModel",
-            "cnCode":"实现方式",
-            "desc":"必填,请选择是否显示菜单",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"select",
-            "selectValue":"1,3,2",
-            "selectValueName":"sql方式,java方式,存储过程方式",
-            "limit":"maxin",
-            "limitParam":"1,12",
-            "limitErrInfo":"实现方式错误",
-            "show": true
-          },
-          {
-            "code":"params",
-            "cnCode":"参数",
-            "desc":"必填,请填写参数",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"maxLength",
-            "limitParam":"500",
-            "limitErrInfo":"参数内容不能超过200",
-            "show": true
-          },
-          {
-            "code":"sql",
-            "cnCode":"sql",
-            "desc":"可填,请填写sql",
-            "required":false,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"textarea",
-            "limit":"maxLength",
-            "limitParam":"2000",
-            "limitErrInfo":"sql不能超过2000",
-            "show": false
-          },
-          {
-            "code":"template",
-            "cnCode":"输出模板",
-            "desc":"可填,请填写输出模板",
-            "required":false,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"textarea",
-            "limit":"maxLength",
-            "limitParam":"2000",
-            "limitErrInfo":"输出模板不能超过2000",
-            "show": false
-          },
-          {
-            "code":"proc",
-            "cnCode":"存储过程",
-            "desc":"可填,请填写存储过程",
-            "required":false,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"textarea",
-            "limit":"maxLength",
-            "limitParam":"200",
-            "limitErrInfo":"存储过程不能超过200",
-            "show": false
-          },
-          {
-            "code":"javaScript",
-            "cnCode":"java",
-            "desc":"可填,请填写java语句",
-            "required":false,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"textarea",
-            "limit":"maxLength",
-            "limitParam":"2000",
-            "limitErrInfo":"java不能超过2000",
-            "show": false
-          }
-        ]
-      },
-    "serviceProvideRemarkView": {
-      "templateName":"备注信息",
-      "templateCode":"serviceProvideRemark",
-      "package": "serviceProvidePackage",
-      "columns":[
-        {
-          "code":"description",
-          "cnCode":"描述",
-          "desc":"可填,请填写描述",
-          "required":false,
-          "hasDefaultValue":false,
-          "defaultValue":"",
-          "inputType":"textarea",
-          "limit":"maxLength",
-          "limitParam":"200",
-          "limitErrInfo":"备注内容不能超过200",
-          "show": false
-        }
-      ]
-    }
-  }
-}

+ 0 - 92
java110-generator/src/main/resources/relationship/template_menu.json

@@ -1,92 +0,0 @@
-{
-  "templateName":"菜单",
-  "templateCode":"menu",
-  "templateKey":"mId",
-  "templateKeyName":"菜单ID",
-  "package": "menuPackage",
-  "successUrl": "/flow/menuFlow",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"menuGroup",
-      "flowKey": "gId",
-      "cnCode":"选择菜单组",
-      "vcName":"viewMenuGroupInfo",
-      "businessName": "businessMenuGroup",
-      "businessType": "BUSINESS_TYPE_SAVE_MENU_GROUP_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"menu",
-      "flowKey": "mId",
-      "cnCode":"菜单信息",
-      "vcName":"viewMenuInfo",
-      "businessName": "businessService",
-      "businessType": "BUSINESS_TYPE_SAVE_SERVICE_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 2,
-      "code":"privilege",
-      "flowKey": "id",
-      "cnCode":"权限信息",
-      "vcName":"addRouteView",
-      "businessName": "businessRoute",
-      "businessType": "BUSINESS_TYPE_SAVE_ROUTE_INFO",
-      "existsComponent": false
-    }
-  ],
-  "components": {
-      "addRouteView": {
-        "templateName":"扩展信息",
-        "templateCode":"addRoute",
-        "package": "servicePackage",
-        "columns":[
-          {
-            "code":"orderTypeCd",
-            "cnCode":"订单类型",
-            "desc":"必填,请填写订单类型",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"select",
-            "selectValue":"Q,D",
-            "selectValueName":"查询,业务受理",
-            "limit":"maxin",
-            "limitParam":"1,4",
-            "limitErrInfo":"订单类型错误",
-            "show": true
-          },
-          {
-            "code":"invokeLimitTimes",
-            "cnCode":"调用次数",
-            "desc":"必填,请填写调用次数",
-            "required":true,
-            "hasDefaultValue":true,
-            "defaultValue":"1000",
-            "inputType":"input",
-            "limit":"num",
-            "limitParam":"",
-            "limitErrInfo":"调用次数错误",
-            "show": false
-          },
-          {
-            "code":"invokeModel",
-            "cnCode":"调用方式",
-            "desc":"可填,请填写消息队列,订单在异步调用时使用",
-            "required":true,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"select",
-            "selectValue":"S,A",
-            "selectValueName":"同步方式,异步方式",
-            "limit":"maxLength",
-            "limitParam":"50",
-            "limitErrInfo":"消息队列不能超过50",
-            "show": false
-          }
-        ]
-      }
-  }
-}

+ 0 - 115
java110-generator/src/main/resources/relationship/template_owner.json

@@ -1,115 +0,0 @@
-{
-  "templateName":"添加业主",
-  "templateCode":"addOwner",
-  "templateKey":"ownerId",
-  "templateKeyName":"业主ID",
-  "package": "ownerPackage",
-  "successUrl": "/flow/ownerFlow",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"floor",
-      "flowKey": "floorId",
-      "cnCode":"选择楼栋",
-      "vcName":"viewFloorInfo",
-      "businessName": "businessFloor",
-      "businessType": "BUSINESS_TYPE_SAVE_FLOOR_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"room",
-      "flowKey": "roomId",
-      "cnCode":"选择房屋",
-      "vcName":"sellRoomSelectRoom",
-      "businessName": "businessRoom",
-      "businessType": "BUSINESS_TYPE_SAVE_ROOM_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 2,
-      "code":"owner",
-      "flowKey": "ownerId",
-      "cnCode":"填写业主信息",
-      "vcName":"addOwner",
-      "businessName": "businessOwner",
-      "businessType": "BUSINESS_TYPE_SAVE_OWNER_INFO",
-      "existsComponent": false
-    }
-  ],
-  "components": {
-      "addOwner": {
-        "templateName":"添加业主",
-        "templateCode":"addOwner",
-        "package": "ownerPackage",
-        "columns":[
-          {
-            "code":"name",
-            "cnCode":"名称",
-            "desc":"必填,名称不能为空",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"maxin",
-            "limitParam":"2,10",
-            "limitErrInfo":"名称长度必须在2位至10位",
-            "show": true
-          },
-          {
-            "code":"sex",
-            "cnCode":"性别",
-            "desc":"必填,请选择性别",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"select",
-            "selectValue":"1,0",
-            "selectValueName":"男,女",
-            "limit":"num",
-            "limitParam":"",
-            "limitErrInfo":"性别不能为空",
-            "show": true
-          },
-          {
-            "code":"age",
-            "cnCode":"年龄",
-            "desc":"必填,请填写年龄",
-            "required":true,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"input",
-            "limit":"num",
-            "limitParam":"",
-            "limitErrInfo":"年龄不是有效的数字",
-            "show": false
-          },
-          {
-            "code":"link",
-            "cnCode":"手机",
-            "desc":"必填,请填写联系方式",
-            "required":false,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"textarea",
-            "limit":"maxLength",
-            "limitParam":"2000",
-            "limitErrInfo":"输出模板不能超过2000",
-            "show": false
-          },
-          {
-            "code":"remark",
-            "cnCode":"备注",
-            "desc":"可填,请填写备注",
-            "required":false,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"textarea",
-            "limit":"maxLength",
-            "limitParam":"200",
-            "limitErrInfo":"备注长度不能超过200位",
-            "show": false
-          }
-        ]
-      }
-  }
-}

+ 0 - 41
java110-generator/src/main/resources/relationship/template_repairDispatchStep.json

@@ -1,41 +0,0 @@
-{
-  "templateName":"报修派单",
-  "templateCode":"repairDispatchStep",
-  "templateKey":"ruId",
-  "templateKeyName":"派单ID",
-  "package": "ownerRepairPackage",
-  "successUrl": "/flow/repairDispatch",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"branchOrg",
-      "flowKey": "branchOrgId",
-      "cnCode":"选择分公司",
-      "vcName":"viewOrgInfo",
-      "businessName": "businessOrg",
-      "businessType": "BUSINESS_TYPE_SAVE_ORG_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"departmentOrg",
-      "flowKey": "departmentOrgId",
-      "cnCode":"选择部门",
-      "vcName":"viewOrgInfo",
-      "businessName": "businessOrg",
-      "businessType": "BUSINESS_TYPE_SAVE_ORG_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 2,
-      "code":"staff",
-      "flowKey": "userId",
-      "cnCode":"选择员工",
-      "vcName":"viewStaffInfo",
-      "businessName": "businessStaff",
-      "businessType": "BUSINESS_TYPE_SAVE_STAFF_INFO",
-      "existsComponent": true
-    }
-  ]
-}

+ 0 - 142
java110-generator/src/main/resources/relationship/template_room.json

@@ -1,142 +0,0 @@
-{
-  "templateName":"添加房屋",
-  "templateCode":"addRoomBinding",
-  "templateKey":"roomId",
-  "templateKeyName":"房屋ID",
-  "package": "roomPackage",
-  "successUrl": "/",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"floor",
-      "flowKey": "floorId",
-      "cnCode":"选择楼",
-      "vcName":"viewFloorInfo",
-      "businessName": "businessFloor",
-      "businessType": "BUSINESS_TYPE_SAVE_FLOOR_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"unit",
-      "flowKey": "unitId",
-      "cnCode":"选择单元",
-      "vcName":"viewUnitInfo",
-      "businessName": "businessUnit",
-      "businessType": "BUSINESS_TYPE_SAVE_UNIT_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 2,
-      "code":"room",
-      "flowKey": "roomId",
-      "cnCode":"添加房屋",
-      "vcName":"addRoomView",
-      "businessName": "businessRoom",
-      "businessType": "BUSINESS_TYPE_SAVE_ROOM_INFO",
-      "existsComponent": false
-    }
-  ],
-  "components": {
-      "addRoomView": {
-        "templateName":"添加房屋",
-        "templateCode":"addRoom",
-        "package": "roomPackage",
-        "columns":[
-          {
-            "code":"roomNum",
-            "cnCode":"房屋编号",
-            "desc":"必填,请填写房屋编号",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"maxLength",
-            "limitParam":"12",
-            "limitErrInfo":"房屋编号长度不能超过12位"
-          },
-          {
-            "code":"layer",
-            "cnCode":"房屋楼层",
-            "desc":"必填,请填写房屋楼层",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"num",
-            "limitParam":"",
-            "limitErrInfo":"房屋楼层高度必须为数字"
-          },
-          {
-            "code":"section",
-            "cnCode":"房间数",
-            "desc":"必填,请填写房屋楼层",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"num",
-            "limitParam":"",
-            "limitErrInfo":"房间数必须为数字"
-          },
-          {
-            "code":"apartment",
-            "cnCode":"房屋户型",
-            "desc":"必填,请选择房屋户型",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"select",
-            "selectValue":"一室两厅,两室两厅",
-            "selectValueName":"1010,2020",
-            "limit":"maxLength",
-            "limitParam":"50",
-            "limitErrInfo":"房屋户型不能大于50"
-          },
-          {
-            "code":"builtUpArea",
-            "cnCode":"建筑面积",
-            "desc":"必填,请填写房屋建筑面积",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"money",
-            "limitParam":"",
-            "limitErrInfo":"建筑面积错误,如 300.00"
-          },
-          {
-            "code":"unitPrice",
-            "cnCode":"房屋单价",
-            "desc":"必填,请填写房屋每平米单价",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"money",
-            "limitParam":"",
-            "limitErrInfo":"房屋单价错误 如 300.00"
-          },
-          {
-            "code":"state",
-            "cnCode":"房屋状态",
-            "desc":"必填,请选择房屋状态",
-            "required":true,
-            "hasDefaultValue":true,
-            "defaultValue":"2002",
-            "inputType":"none",
-            "limit":"maxLength",
-            "limitParam":"12",
-            "limitErrInfo":"房屋状态 不能超过12位"
-          },
-          {
-            "code":"remark",
-            "cnCode":"备注",
-            "desc":"可填,请填写备注",
-            "required":false,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"textarea",
-            "limit":"maxLength",
-            "limitParam":"200",
-            "limitErrInfo":"备注内容不能超过200"
-          }
-        ]
-      }
-  }
-}

+ 0 - 92
java110-generator/src/main/resources/relationship/template_service_binding.json

@@ -1,92 +0,0 @@
-{
-  "templateName":"服务绑定",
-  "templateCode":"serviceBinding",
-  "templateKey":"id",
-  "templateKeyName":"绑定ID",
-  "package": "servicePackage",
-  "successUrl": "/flow/serviceRegisterFlow",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"app",
-      "flowKey": "appId",
-      "cnCode":"选择应用",
-      "vcName":"viewAppInfo",
-      "businessName": "businessApp",
-      "businessType": "BUSINESS_TYPE_SAVE_APP_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"service",
-      "flowKey": "serviceId",
-      "cnCode":"选择服务",
-      "vcName":"viewServiceInfo",
-      "businessName": "businessService",
-      "businessType": "BUSINESS_TYPE_SAVE_SERVICE_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 2,
-      "code":"route",
-      "flowKey": "id",
-      "cnCode":"扩展信息",
-      "vcName":"addRouteView",
-      "businessName": "businessRoute",
-      "businessType": "BUSINESS_TYPE_SAVE_ROUTE_INFO",
-      "existsComponent": false
-    }
-  ],
-  "components": {
-      "addRouteView": {
-        "templateName":"扩展信息",
-        "templateCode":"addRoute",
-        "package": "servicePackage",
-        "columns":[
-          {
-            "code":"orderTypeCd",
-            "cnCode":"订单类型",
-            "desc":"必填,请填写订单类型",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"select",
-            "selectValue":"Q,D",
-            "selectValueName":"查询,业务受理",
-            "limit":"maxin",
-            "limitParam":"1,4",
-            "limitErrInfo":"订单类型错误",
-            "show": true
-          },
-          {
-            "code":"invokeLimitTimes",
-            "cnCode":"调用次数",
-            "desc":"必填,请填写调用次数",
-            "required":true,
-            "hasDefaultValue":true,
-            "defaultValue":"1000",
-            "inputType":"input",
-            "limit":"num",
-            "limitParam":"",
-            "limitErrInfo":"调用次数错误",
-            "show": false
-          },
-          {
-            "code":"invokeModel",
-            "cnCode":"调用方式",
-            "desc":"可填,请填写消息队列,订单在异步调用时使用",
-            "required":true,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"select",
-            "selectValue":"S,A",
-            "selectValueName":"同步方式,异步方式",
-            "limit":"maxLength",
-            "limitParam":"50",
-            "limitErrInfo":"消息队列不能超过50",
-            "show": false
-          }
-        ]
-      }
-  }
-}

+ 0 - 115
java110-generator/src/main/resources/relationship/template_staff_step.json

@@ -1,115 +0,0 @@
-{
-  "templateName":"添加员工",
-  "templateCode":"addStaffStep",
-  "templateKey":"userId",
-  "templateKeyName":"员工ID",
-  "package": "staffPackage",
-  "successUrl": "/flow/staff",
-  "needAffirm": false,
-  "flows":[
-    {
-      "index": 0,
-      "code":"branchOrg",
-      "flowKey": "branchOrgId",
-      "cnCode":"选择分公司",
-      "vcName":"viewOrgInfo",
-      "businessName": "businessOrg",
-      "businessType": "BUSINESS_TYPE_SAVE_ORG_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 1,
-      "code":"departmentOrg",
-      "flowKey": "departmentOrgId",
-      "cnCode":"选择部门",
-      "vcName":"viewOrgInfo",
-      "businessName": "businessOrg",
-      "businessType": "BUSINESS_TYPE_SAVE_ORG_INFO",
-      "existsComponent": true
-    },
-    {
-      "index": 2,
-      "code":"staff",
-      "flowKey": "userId",
-      "cnCode":"填写员工信息",
-      "vcName":"addStaff",
-      "businessName": "businessStaff",
-      "businessType": "BUSINESS_TYPE_SAVE_STAFF_INFO",
-      "existsComponent": false
-    }
-  ],
-  "components": {
-      "addStaff": {
-        "templateName":"添加员工",
-        "templateCode":"addStaff",
-        "package": "staffPackage",
-        "columns":[
-          {
-            "code":"username",
-            "cnCode":"员工名称",
-            "desc":"必填,员工名称不能为空",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"input",
-            "limit":"maxin",
-            "limitParam":"2,10",
-            "limitErrInfo":"员工名称长度必须在2位至10位",
-            "show": true
-          },
-          {
-            "code":"sex",
-            "cnCode":"员工性别",
-            "desc":"必填,请选择员工性别",
-            "required":true,
-            "hasDefaultValue":false,
-            "inputType":"select",
-            "selectValue":"1,0",
-            "selectValueName":"男,女",
-            "limit":"num",
-            "limitParam":"",
-            "limitErrInfo":"员工性别不能为空",
-            "show": true
-          },
-          {
-            "code":"email",
-            "cnCode":"员工邮箱",
-            "desc":"必填,请填写员工邮箱",
-            "required":true,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"input",
-            "limit":"email",
-            "limitParam":"",
-            "limitErrInfo":"员工邮箱不是有效邮箱",
-            "show": true
-          },
-          {
-            "code":"tel",
-            "cnCode":"手机",
-            "desc":"必填,请填写联系方式",
-            "required":false,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"input",
-            "limit":"photo",
-            "limitParam":"",
-            "limitErrInfo":"联系方式不是有效手机",
-            "show": true
-          },
-          {
-            "code":"address",
-            "cnCode":"家庭住址",
-            "desc":"必填,写家庭住址",
-            "required":true,
-            "hasDefaultValue":false,
-            "defaultValue":"",
-            "inputType":"input",
-            "limit":"maxLength",
-            "limitParam":"200",
-            "limitErrInfo":"家庭住址不能超过200位",
-            "show": false
-          }
-        ]
-      }
-  }
-}

+ 0 - 77
java110-generator/src/main/resources/template/AbstractBusinessServiceDataFlowListener.txt

@@ -1,77 +0,0 @@
-package com.java110.@@shareName@@.listener.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.constant.StatusConstant;
-import com.java110.utils.exception.ListenerExecuteException;
-import com.java110.entity.center.Business;
-import com.java110.event.service.AbstractBusinessServiceDataFlowListener;
-import com.java110.@@shareName@@.dao.IStoreServiceDao;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- * 商户 服务侦听 父类
- * Created by wuxw on 2018/7/4.
- */
-public abstract class AbstractStoreBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener{
-    private static Logger logger = LoggerFactory.getLogger(AbstractStoreBusinessServiceDataFlowListener.class);
-
-
-    /**
-     * 获取 DAO工具类
-     * @return
-     */
-    public abstract IStoreServiceDao getStoreServiceDaoImpl();
-
-    /**
-     * 刷新 businessStoreInfo 数据
-     * 主要将 数据库 中字段和 接口传递字段建立关系
-     * @param businessStoreInfo
-     */
-    protected void flushBusinessStoreInfo(Map businessStoreInfo,String statusCd){
-        businessStoreInfo.put("newBId", businessStoreInfo.get("b_id"));
-        $flushBusinessInfo$
-        businessStoreInfo.put("statusCd", statusCd);
-    }
-
-
-    /**
-     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
-     * @param businessStore 商户信息
-     */
-    protected void autoSaveDelBusinessStore(Business business, JSONObject businessStore){
-//自动插入DEL
-        Map info = new HashMap();
-        info.put("storeId",businessStore.getString("storeId"));
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        List<Map> currentStoreInfos = getStoreServiceDaoImpl().getStoreInfo(info);
-        if(currentStoreInfos == null || currentStoreInfos.size() != 1){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"未找到需要修改数据信息,入参错误或数据有问题,请检查"+info);
-        }
-
-        Map currentStoreInfo = currentStoreInfos.get(0);
-
-        currentStoreInfo.put("bId",business.getbId());
-
-        $autoSaveDelBusiness$
-
-        currentStoreInfo.put("operate",StatusConstant.OPERATE_DEL);
-        getStoreServiceDaoImpl().saveBusinessStoreInfo(currentStoreInfo);
-        for(Object key : currentStoreInfo.keySet()) {
-            if(businessStore.get(key) == null) {
-                businessStore.put(key.toString(), currentStoreInfo.get(key));
-            }
-        }
-    }
-
-
-
-
-
-}

+ 0 - 66
java110-generator/src/main/resources/template/BMOImpl.java

@@ -1,66 +0,0 @@
-package com.java110.api.bmo.@@templateCode@@.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.ApiBaseBMO;
-import com.java110.api.bmo.@@templateCode@@.I@@TemplateCode@@BMO;
-import com.java110.core.context.DataFlowContext;
-import com.java110.intf.@@templateCode@@.I@@TemplateCode@@InnerServiceSMO;
-import com.java110.dto.@@templateCode@@.@@TemplateCode@@Dto;
-import com.java110.utils.constant.BusinessTypeConstant;
-import com.java110.utils.constant.CommonConstant;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service("@@templateCode@@BMOImpl")
-public class @@TemplateCode@@BMOImpl extends ApiBaseBMO implements I@@TemplateCode@@BMO {
-
-    @Autowired
-    private I@@TemplateCode@@InnerServiceSMO @@templateCode@@InnerServiceSMOImpl;
-
-    /**
-     * 添加小区信息
-     *
-     * @param paramInJson     接口调用放传入入参
-     * @param dataFlowContext 数据上下文
-     * @return 订单服务能够接受的报文
-     */
-    public void add@@TemplateCode@@(JSONObject paramInJson, DataFlowContext dataFlowContext) {
-
-        paramInJson.put("@@templateKey@@", "-1");
-        @@TemplateCode@@Po @@templateCode@@Po = BeanConvertUtil.covertBean(paramInJson, @@TemplateCode@@Po.class);
-        super.insert(dataFlowContext, @@templateCode@@Po, BusinessTypeConstant.BUSINESS_TYPE_SAVE_@@TEMPLATECODE@@);
-    }
-
-
-    /**
-     * 添加活动信息
-     *
-     * @param paramInJson     接口调用放传入入参
-     * @param dataFlowContext 数据上下文
-     * @return 订单服务能够接受的报文
-     */
-    public void update@@TemplateCode@@(JSONObject paramInJson, DataFlowContext dataFlowContext) {
-        @@TemplateCode@@Po @@templateCode@@Po = BeanConvertUtil.covertBean(paramInJson, @@TemplateCode@@Po.class);
-        super.update(dataFlowContext, @@templateCode@@Po, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_@@TEMPLATECODE@@);
-    }
-
-
-
-    /**
-     * 添加小区信息
-     *
-     * @param paramInJson     接口调用放传入入参
-     * @param dataFlowContext 数据上下文
-     * @return 订单服务能够接受的报文
-     */
-    public void delete@@TemplateCode@@(JSONObject paramInJson, DataFlowContext dataFlowContext) {
-
-        @@TemplateCode@@Po @@templateCode@@Po = BeanConvertUtil.covertBean(paramInJson, @@TemplateCode@@Po.class);
-        super.update(dataFlowContext, @@templateCode@@Po, BusinessTypeConstant.BUSINESS_TYPE_DELETE_@@TEMPLATECODE@@);
-    }
-
-}

+ 0 - 175
java110-generator/src/main/resources/template/DeleteInfoListener.txt

@@ -1,175 +0,0 @@
-package com.java110.@@shareName@@.listener.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.BusinessTypeConstant;
-import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.constant.StatusConstant;
-import com.java110.utils.exception.ListenerExecuteException;
-import com.java110.utils.util.Assert;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.Business;
-import com.java110.@@shareName@@.dao.IStoreServiceDao;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 删除商户信息 侦听
- *
- * 处理节点
- * 1、businessStore:{} 商户基本信息节点
- * 2、businessStoreAttr:[{}] 商户属性信息节点
- * 3、businessStorePhoto:[{}] 商户照片信息节点
- * 4、businessStoreCerdentials:[{}] 商户证件信息节点
- * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("deleteStoreInfoListener")
-@Transactional
-public class DeleteStoreInfoListener extends AbstractStoreBusinessServiceDataFlowListener {
-
-    private final static Logger logger = LoggerFactory.getLogger(DeleteStoreInfoListener.class);
-    @Autowired
-    IStoreServiceDao storeServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 3;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_DELETE_STORE_INFO;
-    }
-
-    /**
-     * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-            //处理 businessStore 节点
-            if(data.containsKey(StorePo.class.getSimpleName())){
-                Object _obj = data.get(StorePo.class.getSimpleName());
-                JSONArray businessStores = null;
-                if(_obj instanceof JSONObject){
-                    businessStores = new JSONArray();
-                    businessStores.add(_obj);
-                }else {
-                    businessStores = (JSONArray)_obj;
-                }
-                //JSONObject businessStore = data.getJSONObject(StorePo.class.getSimpleName());
-                for (int _storeIndex = 0; _storeIndex < businessStores.size();_storeIndex++) {
-                    JSONObject businessStore = businessStores.getJSONObject(_storeIndex);
-                    doBusinessStore(business, businessStore);
-                    if(_obj instanceof JSONObject) {
-                        dataFlowContext.addParamOut("storeId", businessStore.getString("storeId"));
-                    }
-                }
-
-        }
-
-
-    }
-
-    /**
-     * 删除 instance数据
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
-        String bId = business.getbId();
-        //Assert.hasLength(bId,"请求报文中没有包含 bId");
-
-        //商户信息
-        Map info = new HashMap();
-        info.put("bId",business.getbId());
-        info.put("operate",StatusConstant.OPERATE_DEL);
-
-        //商户信息
-        List<Map> businessStoreInfos = storeServiceDaoImpl.getBusinessStoreInfo(info);
-        if( businessStoreInfos != null && businessStoreInfos.size() >0) {
-            for (int _storeIndex = 0; _storeIndex < businessStoreInfos.size();_storeIndex++) {
-                Map businessStoreInfo = businessStoreInfos.get(_storeIndex);
-                flushBusinessStoreInfo(businessStoreInfo,StatusConstant.STATUS_CD_INVALID);
-                storeServiceDaoImpl.updateStoreInfoInstance(businessStoreInfo);
-                dataFlowContext.addParamOut("storeId",businessStoreInfo.get("store_id"));
-            }
-        }
-
-    }
-
-    /**
-     * 撤单
-     * 从business表中查询到DEL的数据 将instance中的数据更新回来
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
-        String bId = business.getbId();
-        //Assert.hasLength(bId,"请求报文中没有包含 bId");
-        Map info = new HashMap();
-        info.put("bId",bId);
-        info.put("statusCd",StatusConstant.STATUS_CD_INVALID);
-
-        Map delInfo = new HashMap();
-        delInfo.put("bId",business.getbId());
-        delInfo.put("operate",StatusConstant.OPERATE_DEL);
-        //商户信息
-        List<Map> storeInfo = storeServiceDaoImpl.getStoreInfo(info);
-        if(storeInfo != null && storeInfo.size() > 0){
-
-            //商户信息
-            List<Map> businessStoreInfos = storeServiceDaoImpl.getBusinessStoreInfo(delInfo);
-            //除非程序出错了,这里不会为空
-            if(businessStoreInfos == null ||  businessStoreInfos.size() == 0){
-                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(store),程序内部异常,请检查! "+delInfo);
-            }
-            for (int _storeIndex = 0; _storeIndex < businessStoreInfos.size();_storeIndex++) {
-                Map businessStoreInfo = businessStoreInfos.get(_storeIndex);
-                flushBusinessStoreInfo(businessStoreInfo,StatusConstant.STATUS_CD_VALID);
-                storeServiceDaoImpl.updateStoreInfoInstance(businessStoreInfo);
-            }
-        }
-    }
-
-
-
-    /**
-     * 处理 businessStore 节点
-     * @param business 总的数据节点
-     * @param businessStore 商户节点
-     */
-    private void doBusinessStore(Business business,JSONObject businessStore){
-
-        Assert.jsonObjectHaveKey(businessStore,"storeId","businessStore 节点下没有包含 storeId 节点");
-
-        if(businessStore.getString("storeId").startsWith("-")){
-            throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"storeId 错误,不能自动生成(必须已经存在的storeId)"+businessStore);
-        }
-        //自动插入DEL
-        autoSaveDelBusinessStore(business,businessStore);
-    }
-    @Override
-    public IStoreServiceDao getStoreServiceDaoImpl() {
-        return storeServiceDaoImpl;
-    }
-
-    public void setStoreServiceDaoImpl(IStoreServiceDao storeServiceDaoImpl) {
-        this.storeServiceDaoImpl = storeServiceDaoImpl;
-    }
-}

+ 0 - 53
java110-generator/src/main/resources/template/DeleteListener.java

@@ -1,53 +0,0 @@
-package com.java110.api.listener.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.@@templateCode@@.I@@TemplateCode@@BMO;
-import com.java110.api.listener.AbstractServiceApiListener;
-import com.java110.utils.constant.ServiceCode@@TemplateCode@@Constant;
-import com.java110.utils.util.Assert;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.AppService;
-import com.java110.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.CommonConstant;
-import com.java110.core.annotation.Java110Listener;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
-
-
-/**
- * 保存小区侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("delete@@TemplateCode@@Listener")
-public class Delete@@TemplateCode@@Listener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private I@@TemplateCode@@BMO @@templateCode@@BMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
-
-        @@validateTemplateColumns@@
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        @@templateCode@@BMOImpl.delete@@TemplateCode@@(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCode@@TemplateCode@@Constant.DELETE_@@TEMPLATECODE@@;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-}

+ 0 - 38
java110-generator/src/main/resources/template/IBMO.java

@@ -1,38 +0,0 @@
-package com.java110.api.bmo.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.IApiBaseBMO;
-import com.java110.core.context.DataFlowContext;
-
-public interface I@@TemplateCode@@BMO extends IApiBaseBMO {
-
-
-    /**
-     * 添加@@templateName@@
-     * @param paramInJson
-     * @param dataFlowContext
-     * @return
-     */
-     void add@@TemplateCode@@(JSONObject paramInJson, DataFlowContext dataFlowContext);
-
-    /**
-     * 添加@@templateName@@信息
-     *
-     * @param paramInJson     接口调用放传入入参
-     * @param dataFlowContext 数据上下文
-     * @return 订单服务能够接受的报文
-     */
-     void update@@TemplateCode@@(JSONObject paramInJson, DataFlowContext dataFlowContext);
-
-    /**
-     * 删除@@templateName@@
-     *
-     * @param paramInJson     接口调用放传入入参
-     * @param dataFlowContext 数据上下文
-     * @return 订单服务能够接受的报文
-     */
-     void delete@@TemplateCode@@(JSONObject paramInJson, DataFlowContext dataFlowContext);
-
-
-
-}

+ 0 - 42
java110-generator/src/main/resources/template/IInnerServiceSMO.txt

@@ -1,42 +0,0 @@
-package com.java110.core.smo.store;
-
-import com.java110.config.feign.FeignConfiguration;
-import com.java110.dto.store.StoreDto;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-
-import java.util.List;
-
-/**
- * @ClassName IStoreInnerServiceSMO
- * @Description 商户接口类
- * @Author wuxw
- * @Date 2019/4/24 9:04
- * @Version 1.0
- * add by wuxw 2019/4/24
- **/
-@FeignClient(name = "community-service", configuration = {FeignConfiguration.class})
-@RequestMapping("/storeApi")
-public interface IStoreInnerServiceSMO {
-
-    /**
-     * <p>查询小区楼信息</p>
-     *
-     *
-     * @param storeDto 数据对象分享
-     * @return StoreDto 对象数据
-     */
-    @RequestMapping(value = "/queryStores", method = RequestMethod.POST)
-    List<StoreDto> queryStores(@RequestBody StoreDto storeDto);
-
-    /**
-     * 查询<p>小区楼</p>总记录数
-     *
-     * @param storeDto 数据对象分享
-     * @return 小区下的小区楼记录数
-     */
-    @RequestMapping(value = "/queryStoresCount", method = RequestMethod.POST)
-    int queryStoresCount(@RequestBody StoreDto storeDto);
-}

+ 0 - 81
java110-generator/src/main/resources/template/IServiceDao.txt

@@ -1,81 +0,0 @@
-package com.java110.@@shareName@@.dao;
-
-
-import com.java110.utils.exception.DAOException;
-import com.java110.entity.merchant.BoMerchant;
-import com.java110.entity.merchant.BoMerchantAttr;
-import com.java110.entity.merchant.Merchant;
-import com.java110.entity.merchant.MerchantAttr;
-
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 商户组件内部之间使用,没有给外围系统提供服务能力
- * 商户服务接口类,要求全部以字符串传输,方便微服务化
- * 新建客户,修改客户,删除客户,查询客户等功能
- *
- * Created by wuxw on 2016/12/27.
- */
-public interface IStoreServiceDao {
-
-    /**
-     * 保存 商户信息
-     * @param businessStoreInfo 商户信息 封装
-     * @throws DAOException 操作数据库异常
-     */
-    void saveBusinessStoreInfo(Map businessStoreInfo) throws DAOException;
-
-
-
-    /**
-     * 查询商户信息(business过程)
-     * 根据bId 查询商户信息
-     * @param info bId 信息
-     * @return 商户信息
-     * @throws DAOException DAO异常
-     */
-    List<Map> getBusinessStoreInfo(Map info) throws DAOException;
-
-
-
-
-    /**
-     * 保存 商户信息 Business数据到 Instance中
-     * @param info
-     * @throws DAOException DAO异常
-     */
-    void saveStoreInfoInstance(Map info) throws DAOException;
-
-
-
-
-    /**
-     * 查询商户信息(instance过程)
-     * 根据bId 查询商户信息
-     * @param info bId 信息
-     * @return 商户信息
-     * @throws DAOException DAO异常
-     */
-    List<Map> getStoreInfo(Map info) throws DAOException;
-
-
-
-    /**
-     * 修改商户信息
-     * @param info 修改信息
-     * @throws DAOException DAO异常
-     */
-    void updateStoreInfoInstance(Map info) throws DAOException;
-
-
-    /**
-     * 查询商户总数
-     *
-     * @param info 商户信息
-     * @return 商户数量
-     */
-    int queryStoresCount(Map info);
-
-}

+ 0 - 111
java110-generator/src/main/resources/template/InnerServiceSMOImpl.txt

@@ -1,111 +0,0 @@
-package com.java110.@@shareName@@.smo.impl;
-
-
-import com.java110.@@shareName@@.dao.IStoreServiceDao;
-import com.java110.core.smo.store.IStoreInnerServiceSMO;
-import com.java110.dto.store.StoreDto;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.core.base.smo.BaseServiceSMO;
-import com.java110.dto.user.UserDto;
-import com.java110.core.smo.user.IUserInnerServiceSMO;
-import com.java110.dto.PageDto;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @ClassName FloorInnerServiceSMOImpl
- * @Description 商户内部服务实现类
- * @Author wuxw
- * @Date 2019/4/24 9:20
- * @Version 1.0
- * add by wuxw 2019/4/24
- **/
-@RestController
-public class StoreInnerServiceSMOImpl extends BaseServiceSMO implements IStoreInnerServiceSMO {
-
-    @Autowired
-    private IStoreServiceDao storeServiceDaoImpl;
-
-    @Autowired
-    private IUserInnerServiceSMO userInnerServiceSMOImpl;
-
-    @Override
-    public List<StoreDto> queryStores(@RequestBody  StoreDto storeDto) {
-
-        //校验是否传了 分页信息
-
-        int page = storeDto.getPage();
-
-        if (page != PageDto.DEFAULT_PAGE) {
-            storeDto.setPage((page - 1) * storeDto.getRow());
-        }
-
-        List<StoreDto> stores = BeanConvertUtil.covertBeanList(storeServiceDaoImpl.getStoreInfo(BeanConvertUtil.beanCovertMap(storeDto)), StoreDto.class);
-
-        if (stores == null || stores.size() == 0) {
-            return stores;
-        }
-
-        String[] userIds = getUserIds(stores);
-        //根据 userId 查询用户信息
-        List<UserDto> users = userInnerServiceSMOImpl.getUserInfo(userIds);
-
-        for (StoreDto store : stores) {
-            refreshStore(store, users);
-        }
-        return stores;
-    }
-
-    /**
-     * 从用户列表中查询用户,将用户中的信息 刷新到 floor对象中
-     *
-     * @param store 小区商户信息
-     * @param users 用户列表
-     */
-    private void refreshStore(StoreDto store, List<UserDto> users) {
-        for (UserDto user : users) {
-            if (store.get@@Id@@().equals(user.getUserId())) {
-                BeanConvertUtil.covertBean(user, store);
-            }
-        }
-    }
-
-    /**
-     * 获取批量userId
-     *
-     * @param stores 小区楼信息
-     * @return 批量userIds 信息
-     */
-     private String[] getUserIds(List<StoreDto> stores) {
-        List<String> userIds = new ArrayList<String>();
-        for (StoreDto store : stores) {
-            userIds.add(store.get@@Id@@());
-        }
-
-        return userIds.toArray(new String[userIds.size()]);
-    }
-
-    @Override
-    public int queryStoresCount(@RequestBody StoreDto storeDto) {
-        return storeServiceDaoImpl.queryStoresCount(BeanConvertUtil.beanCovertMap(storeDto));    }
-
-    public IStoreServiceDao getStoreServiceDaoImpl() {
-        return storeServiceDaoImpl;
-    }
-
-    public void setStoreServiceDaoImpl(IStoreServiceDao storeServiceDaoImpl) {
-        this.storeServiceDaoImpl = storeServiceDaoImpl;
-    }
-
-    public IUserInnerServiceSMO getUserInnerServiceSMOImpl() {
-        return userInnerServiceSMOImpl;
-    }
-
-    public void setUserInnerServiceSMOImpl(IUserInnerServiceSMO userInnerServiceSMOImpl) {
-        this.userInnerServiceSMOImpl = userInnerServiceSMOImpl;
-    }
-}

+ 0 - 82
java110-generator/src/main/resources/template/ListListener.java

@@ -1,82 +0,0 @@
-package com.java110.api.listener.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.listener.AbstractServiceApiListener;
-import com.java110.intf.@@templateCode@@.I@@TemplateCode@@InnerServiceSMO;
-import com.java110.utils.constant.ServiceCode@@TemplateCode@@Constant;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.dto.companyMain.CompanyMainDto;
-import com.java110.event.service.api.ServiceDataFlowEvent;
-import com.java110.vo.api.@@templateCode@@.Api@@TemplateCode@@DataVo;
-import com.java110.vo.api.@@templateCode@@.Api@@TemplateCode@@Vo;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 查询小区侦听类
- */
-@Java110Listener("list@@TemplateCode@@sListener")
-public class List@@TemplateCode@@sListener extends AbstractServiceApiListener {
-
-    @Autowired
-    private I@@TemplateCode@@InnerServiceSMO @@templateCode@@InnerServiceSMOImpl;
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCode@@TemplateCode@@Constant.LIST_@@TEMPLATECODE@@S;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.GET;
-    }
-
-
-    @Override
-    public int getOrder() {
-        return DEFAULT_ORDER;
-    }
-
-
-    public I@@TemplateCode@@InnerServiceSMO get@@TemplateCode@@InnerServiceSMOImpl() {
-        return @@templateCode@@InnerServiceSMOImpl;
-    }
-
-    public void set@@TemplateCode@@InnerServiceSMOImpl(I@@TemplateCode@@InnerServiceSMO @@templateCode@@InnerServiceSMOImpl) {
-        this.@@templateCode@@InnerServiceSMOImpl = @@templateCode@@InnerServiceSMOImpl;
-    }
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        super.validatePageInfo(reqJson);
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-
-        @@TemplateCode@@Dto @@templateCode@@Dto = BeanConvertUtil.covertBean(reqJson, @@TemplateCode@@Dto.class);
-
-        int count = @@templateCode@@InnerServiceSMOImpl.query@@TemplateCode@@sCount(@@templateCode@@Dto);
-
-        List<@@TemplateCode@@Dto> @@templateCode@@Dtos = null;
-
-        if (count > 0) {
-            @@templateCode@@Dtos = @@templateCode@@InnerServiceSMOImpl.query@@TemplateCode@@s(@@templateCode@@Dto);
-        } else {
-            @@templateCode@@Dtos = new ArrayList<>();
-        }
-
-        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, @@templateCode@@Dtos);
-
-        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
-
-        context.setResponseEntity(responseEntity);
-
-    }
-}

+ 0 - 11
java110-generator/src/main/resources/template/Po.java

@@ -1,11 +0,0 @@
-package com.java110.po.@@templateCode@@;
-
-import java.io.Serializable;
-import java.util.Date;
-
-public class @@TemplateCode@@Po implements Serializable {
-
-    @@templateColumns@@
-
-
-}

+ 0 - 50
java110-generator/src/main/resources/template/SaveListener.java

@@ -1,50 +0,0 @@
-package com.java110.api.listener.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.api.bmo.@@templateCode@@.I@@TemplateCode@@BMO;
-import com.java110.api.listener.AbstractServiceApiListener;
-import com.java110.utils.constant.ServiceCode@@TemplateCode@@Constant;
-import com.java110.utils.util.Assert;
-import com.java110.core.context.DataFlowContext;
-import com.java110.entity.center.AppService;
-import com.java110.event.service.api.ServiceDataFlowEvent;
-import com.java110.utils.constant.CommonConstant;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
-import com.java110.core.annotation.Java110Listener;
-/**
- * 保存商户侦听
- * add by wuxw 2019-06-30
- */
-@Java110Listener("save@@TemplateCode@@Listener")
-public class Save@@TemplateCode@@Listener extends AbstractServiceApiPlusListener {
-
-    @Autowired
-    private I@@TemplateCode@@BMO @@templateCode@@BMOImpl;
-
-    @Override
-    protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
-        //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
-
-        @@validateTemplateColumns@@
-    }
-
-    @Override
-    protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) {
-        @@templateCode@@BMOImpl.add@@TemplateCode@@(reqJson, context);
-    }
-
-    @Override
-    public String getServiceCode() {
-        return ServiceCode@@TemplateCode@@Constant.ADD_@@TEMPLATECODE@@;
-    }
-
-    @Override
-    public HttpMethod getHttpMethod() {
-        return HttpMethod.POST;
-    }
-
-}

+ 0 - 175
java110-generator/src/main/resources/template/SaveListener.txt

@@ -1,175 +0,0 @@
-package com.java110.@@shareName@@.listener.@@templateCode@@;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.BusinessTypeConstant;
-import com.java110.utils.constant.StatusConstant;
-import com.java110.utils.util.Assert;
-import com.java110.@@shareName@@.dao.IStoreServiceDao;
-import com.java110.core.annotation.Java110Listener;
-import com.java110.core.context.DataFlowContext;
-import com.java110.core.factory.GenerateCodeFactory;
-import com.java110.entity.center.Business;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 保存 商户信息 侦听
- * Created by wuxw on 2018/5/18.
- */
-@Java110Listener("saveStoreInfoListener")
-@Transactional
-public class SaveStoreInfoListener extends AbstractStoreBusinessServiceDataFlowListener{
-
-    private static Logger logger = LoggerFactory.getLogger(SaveStoreInfoListener.class);
-
-    @Autowired
-    private IStoreServiceDao storeServiceDaoImpl;
-
-    @Override
-    public int getOrder() {
-        return 0;
-    }
-
-    @Override
-    public String getBusinessTypeCd() {
-        return BusinessTypeConstant.BUSINESS_TYPE_SAVE_STORE_INFO;
-    }
-
-    /**
-     * 保存商户信息 business 表中
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-        Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理");
-
-        //处理 businessStore 节点
-        if(data.containsKey(StorePo.class.getSimpleName())){
-            Object bObj = data.get(StorePo.class.getSimpleName());
-            JSONArray businessStores = null;
-            if(bObj instanceof JSONObject){
-                businessStores = new JSONArray();
-                businessStores.add(bObj);
-            }else {
-                businessStores = (JSONArray)bObj;
-            }
-            //JSONObject businessStore = data.getJSONObject(StorePo.class.getSimpleName());
-            for (int bStoreIndex = 0; bStoreIndex < businessStores.size();bStoreIndex++) {
-                JSONObject businessStore = businessStores.getJSONObject(bStoreIndex);
-                doBusinessStore(business, businessStore);
-                if(bObj instanceof JSONObject) {
-                    dataFlowContext.addParamOut("storeId", businessStore.getString("storeId"));
-                }
-            }
-        }
-    }
-
-    /**
-     * business 数据转移到 instance
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) {
-        JSONObject data = business.getDatas();
-
-        Map info = new HashMap();
-        info.put("bId",business.getbId());
-        info.put("operate",StatusConstant.OPERATE_ADD);
-
-        //商户信息
-        List<Map> businessStoreInfo = storeServiceDaoImpl.getBusinessStoreInfo(info);
-        if( businessStoreInfo != null && businessStoreInfo.size() >0) {
-            reFreshShareColumn(info, businessStoreInfo.get(0));
-            storeServiceDaoImpl.saveStoreInfoInstance(info);
-            if(businessStoreInfo.size() == 1) {
-                dataFlowContext.addParamOut("storeId", businessStoreInfo.get(0).get("store_id"));
-            }
-        }
-    }
-
-
-    /**
-     * 刷 分片字段
-     *
-     * @param info         查询对象
-     * @param businessInfo 小区ID
-     */
-    private void reFreshShareColumn(Map info, Map businessInfo) {
-
-        if (info.containsKey("shareId")) {
-            return;
-        }
-
-        if (!businessInfo.containsKey("stare_id")) {
-            return;
-        }
-
-        info.put("shareId", businessInfo.get("stare_id"));
-    }
-    /**
-     * 撤单
-     * @param dataFlowContext 数据对象
-     * @param business 当前业务对象
-     */
-    @Override
-    protected void doRecover(DataFlowContext dataFlowContext, Business business) {
-        String bId = business.getbId();
-        //Assert.hasLength(bId,"请求报文中没有包含 bId");
-        Map info = new HashMap();
-        info.put("bId",bId);
-        info.put("statusCd",StatusConstant.STATUS_CD_VALID);
-        Map paramIn = new HashMap();
-        paramIn.put("bId",bId);
-        paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID);
-        //商户信息
-        List<Map> storeInfo = storeServiceDaoImpl.getStoreInfo(info);
-        if(storeInfo != null && storeInfo.size() > 0){
-            reFreshShareColumn(paramIn, storeInfo.get(0));
-            storeServiceDaoImpl.updateStoreInfoInstance(paramIn);
-        }
-    }
-
-
-
-    /**
-     * 处理 businessStore 节点
-     * @param business 总的数据节点
-     * @param businessStore 商户节点
-     */
-    private void doBusinessStore(Business business,JSONObject businessStore){
-
-        Assert.jsonObjectHaveKey(businessStore,"storeId","businessStore 节点下没有包含 storeId 节点");
-
-        if(businessStore.getString("storeId").startsWith("-")){
-            //刷新缓存
-            //flushStoreId(business.getDatas());
-
-            businessStore.put("storeId",GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_storeId));
-
-        }
-
-        businessStore.put("bId",business.getbId());
-        businessStore.put("operate", StatusConstant.OPERATE_ADD);
-        //保存商户信息
-        storeServiceDaoImpl.saveBusinessStoreInfo(businessStore);
-
-    }
-    @Override
-    public IStoreServiceDao getStoreServiceDaoImpl() {
-        return storeServiceDaoImpl;
-    }
-
-    public void setStoreServiceDaoImpl(IStoreServiceDao storeServiceDaoImpl) {
-        this.storeServiceDaoImpl = storeServiceDaoImpl;
-    }
-}

+ 0 - 31
java110-generator/src/main/resources/template/ServiceCodeConstant.java

@@ -1,31 +0,0 @@
-package com.java110.utils.constant;
-
-/**
- * @@templateName@@常量类
- * Created by wuxw on 2017/5/20.
- */
-public class ServiceCode@@TemplateCode@@Constant {
-
-    /**
-     * 添加 @@templateName@@
-     */
-    public static final String ADD_@@TEMPLATECODE@@ = "@@templateCode@@.save@@TemplateCode@@";
-
-
-    /**
-     * 修改 @@templateName@@
-     */
-    public static final String UPDATE_@@TEMPLATECODE@@ = "@@templateCode@@.update@@TemplateCode@@";
-    /**
-     * 删除 @@templateName@@
-     */
-    public static final String DELETE_@@TEMPLATECODE@@ = "@@templateCode@@.delete@@TemplateCode@@";
-
-
-    /**
-     * 查询 @@templateName@@
-     */
-    public static final String LIST_@@TEMPLATECODE@@S = "@@templateCode@@.list@@TemplateCode@@s";
-
-
-}

+ 0 - 130
java110-generator/src/main/resources/template/ServiceDaoImpl.txt

@@ -1,130 +0,0 @@
-package com.java110.@@shareName@@.dao.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.utils.constant.ResponseConstant;
-import com.java110.utils.exception.DAOException;
-import com.java110.utils.util.DateUtil;
-import com.java110.core.base.dao.BaseServiceDao;
-import com.java110.@@shareName@@.dao.IStoreServiceDao;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 商户服务 与数据库交互
- * Created by wuxw on 2017/4/5.
- */
-@Service("storeServiceDaoImpl")
-//@Transactional
-public class StoreServiceDaoImpl extends BaseServiceDao implements IStoreServiceDao {
-
-    private static Logger logger = LoggerFactory.getLogger(StoreServiceDaoImpl.class);
-
-    /**
-     * 商户信息封装
-     * @param businessStoreInfo 商户信息 封装
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public void saveBusinessStoreInfo(Map businessStoreInfo) throws DAOException {
-        businessStoreInfo.put("month", DateUtil.getCurrentMonth());
-        // 查询business_user 数据是否已经存在
-        logger.debug("保存商户信息 入参 businessStoreInfo : {}",businessStoreInfo);
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveBusinessStoreInfo",businessStoreInfo);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户数据失败:"+ JSONObject.toJSONString(businessStoreInfo));
-        }
-    }
-
-
-    /**
-     * 查询商户信息
-     * @param info bId 信息
-     * @return 商户信息
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public List<Map> getBusinessStoreInfo(Map info) throws DAOException {
-
-        logger.debug("查询商户信息 入参 info : {}",info);
-
-        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getBusinessStoreInfo",info);
-
-        return businessStoreInfos;
-    }
-
-
-
-    /**
-     * 保存商户信息 到 instance
-     * @param info   bId 信息
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public void saveStoreInfoInstance(Map info) throws DAOException {
-        logger.debug("保存商户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.insert("storeServiceDaoImpl.saveStoreInfoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存商户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-
-    /**
-     * 查询商户信息(instance)
-     * @param info bId 信息
-     * @return List<Map>
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public List<Map> getStoreInfo(Map info) throws DAOException {
-        logger.debug("查询商户信息 入参 info : {}",info);
-
-        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeServiceDaoImpl.getStoreInfo",info);
-
-        return businessStoreInfos;
-    }
-
-
-    /**
-     * 修改商户信息
-     * @param info 修改信息
-     * @throws DAOException DAO异常
-     */
-    @Override
-    public void updateStoreInfoInstance(Map info) throws DAOException {
-        logger.debug("修改商户信息Instance 入参 info : {}",info);
-
-        int saveFlag = sqlSessionTemplate.update("storeServiceDaoImpl.updateStoreInfoInstance",info);
-
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改商户信息Instance数据失败:"+ JSONObject.toJSONString(info));
-        }
-    }
-
-     /**
-     * 查询商户数量
-     * @param info 商户信息
-     * @return 商户数量
-     */
-    @Override
-    public int queryStoresCount(Map info) {
-        logger.debug("查询商户数据 入参 info : {}",info);
-
-        List<Map> businessStoreInfos = sqlSessionTemplate.selectList("storeServiceDaoImpl.queryStoresCount", info);
-        if (businessStoreInfos.size() < 1) {
-            return 0;
-        }
-
-        return Integer.parseInt(businessStoreInfos.get(0).get("count").toString());
-    }
-
-
-}

+ 0 - 0
java110-generator/src/main/resources/template/ServiceDaoImplMapper.txt


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.