Commit 4baf4693 authored by 杨凯's avatar 杨凯

yangkai

parent 7843a78e
......@@ -24,7 +24,7 @@ omainObjectName生成的实体类的名字
enableCountByExample 默认true
### 2.修改pom.xml
修改pom.xml中***标签plugins***->***标签plugin***->***标签configuration***下包含
修改pom.xml中***标签plugins***->***标签plugin***->***标签***下包含
mysql,
oracle,
postgresql
......
#!/bin/bash
rm -rf dao/src/main/java/com/haomostudio/zhangjiakouapibackend/dao/*
rm -rf domain/src/main/java/com/haomostudio/zhangjiakouapibackend/domain/*
......
......@@ -160,20 +160,20 @@
</dependency>
<!-- 添加oracle jdbc driver -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.1.0</version>
</dependency>
<!--<dependency>-->
<!--<groupId>com.oracle</groupId>-->
<!--<artifactId>ojdbc6</artifactId>-->
<!--<version>11.2.0.3</version>-->
<!--</dependency>-->
<!-- 添加mysql jdbc driver -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
</dependency>
<!--<dependency>-->
<!--<groupId>mysql</groupId>-->
<!--<artifactId>mysql-connector-java</artifactId>-->
<!--<version>5.1.38</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>postgresql</groupId>-->
......@@ -195,19 +195,19 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<version>2.4.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
<version>2.4.4</version>
</dependency>
......@@ -545,9 +545,9 @@
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
<configuration>
<configurationFile>${basedir}/src/main/resources/mybatis/mysqlGeneratorConfig.xml</configurationFile>
<!--<configurationFile>${basedir}/src/main/resources/mybatis/mysqlGeneratorConfig.xml</configurationFile>-->
<!--<configurationFile>${basedir}/src/main/resources/mybatis/oracleGeneratorConfig.xml</configurationFile>-->
<!--<configurationFile>${basedir}/src/main/resources/mybatis/postgresqlGeneratorConfig1.xml</configurationFile>-->
<configurationFile>${basedir}/src/main/resources/mybatis/postgresqlGeneratorConfig.xml</configurationFile>
<!--postgresqlGeneratorConfig.xml-->
<verbose>true</verbose>
<overwrite>true</overwrite>
......
......@@ -2,4 +2,7 @@
cd domain/src/main/java/com/haomostudio/SeekTruthBackend/po/
perl -p -i -e "s/protected List<Criterion> criteria;/protected List<Criterion> criteria;public Criteria fieldsValuesOr( List<String> fields,List<String> values, String column){addCriterion(Util.dealFieldsValuesDataBaseOR(fields,values,column));return (Criteria) this; }/g" *Example.java
\ No newline at end of file
perl -p -i -e "public Criteria fieldsValuesOr( List<String> fields,List<String> values, String column){
addCriterion(Util.dealFieldsValuesDataBaseOR(fields,values,column));
return (Criteria) this;
}" *Example.java
\ No newline at end of file
#!/bin/bash
mvn install:install-file -Dfile=docs/jar/plugin-1.0.0.jar -DgroupId=plugin -DartifactId=plugin -Dversion=1.0.0 -Dpackaging=jar
mvn install:install-file -Dfile=docs/jar/plugin-1.0.0.jar -DgroupId=plugin -DartifactId=plugin -Dversion=1.0.0 -Dpackaging=jar
......@@ -5,7 +5,7 @@
<generatorConfiguration>
<!--<classPathEntry location="/Users/hxgqh/.m2/repository/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar" />-->
<classPathEntry location="/Users/liuranran/.m2/repository/mysql/mysql-connector-java/5.1.42/mysql-connector-java-5.1.42.jar" />
<classPathEntry location="/Users/zl/.m2/repository/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar" />
<context id="mysqlTables" targetRuntime="MyBatis3">
<plugin type="org.mybatis.generator.plugins.RowBoundsPlugin"/>
......@@ -19,7 +19,7 @@
</commentGenerator>
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://haomo-tech.com:3326/yinxin"
connectionURL="jdbc:mysql://haomo-tech.com:3326/test"
userId="root"
password="0x00NF200"/>
......@@ -30,21 +30,21 @@
</javaTypeResolver>
<!-- 生成model模型,对应的包,存放位置可以指定具体的路径,如/ProjectName/src,也可以使用MAVEN来自动生成 -->
<javaModelGenerator targetPackage="com.haomostudio.SeekTruthBackend.po"
<javaModelGenerator targetPackage="com.haomo.delivery.po"
targetProject="domain/src/main/java/">
<property name="enableSubPackages"
value="true"/>
</javaModelGenerator>
<!--对应的xml mapper文件 -->
<sqlMapGenerator targetPackage="com.haomostudio.SeekTruthBackend"
<sqlMapGenerator targetPackage="com.com.haomo.delivery"
targetProject="web/src/main/resources/mybatis/">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 对应的dao接口 -->
<javaClientGenerator type="XMLMAPPER"
targetPackage="com.haomostudio.SeekTruthBackend.dao"
targetPackage="com.haomo.delivery.dao"
targetProject="dao/src/main/java/">
<property name="enableSubPackages"
value="true"/>
......
......@@ -6,16 +6,16 @@
<generatorConfiguration>
<!--<classPathEntry location="/Users/hxgqh/.m2/repository/com/oracle/ojdbc6/11.2.0.1.0/ojdbc6-11.2.0.1.0.jar" />-->
<!--<classPathEntry location="/Users/hm20160509/.m2/repository/com/oracle/ojdbc6/11.2.0.1.0/ojdbc6-11.2.0.1.0.jar" />-->
<classPathEntry location="/Users/hm20160509/.m2/repository/postgresql/postgresql/9.1-901-1.jdbc4/postgresql-9.1-901-1.jdbc4.jar" />
<classPathEntry location="/Users/zl/.m2/repository/postgresql/9.1-901-1.jdbc4/9.1-901-1.jdbc4/9.1-901-1.jdbc4-9.1-901-1.jdbc4.jar" />
<context id="testTables" targetRuntime="MyBatis3">
<plugin type="org.mybatis.generator.plugins.RowBoundsPlugin"/>
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
<jdbcConnection driverClass="org.postgresql.Driver"
connectionURL="jdbc:postgresql://115.28.80.125:5432/processengineservice"
connectionURL="jdbc:postgresql://192.168.2.1:5432/postgresql"
userId="postgres"
password="123456"/>
password="root"/>
<!-- 指定生成的类型为java类型,避免数据库中number等类型字段 -->
<javaTypeResolver>
......@@ -48,35 +48,31 @@
<!--<table schema="public" tableName="%">-->
<!--<property name="useActualColumnNames" value="false"/>-->
<!--</table>-->
<table schema="public" tableName="act_evt_log" domainObjectName="ActEvtLog" enableCountByExample="true"></table>
<table schema="public" tableName="act_ge_bytearray" domainObjectName="ActGeBytearray" enableCountByExample="true"></table>
<table schema="public" tableName="act_ge_property" domainObjectName="ActGeProperty" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_actinst" domainObjectName="ActHiActinst" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_attachment" domainObjectName="ActHiAttachment" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_comment" domainObjectName="ActHiComment" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_detail" domainObjectName="ActHiDetail" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_identitylink" domainObjectName="ActHiIdentitylink" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_procinst" domainObjectName="ActHiProcinst" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_taskinst" domainObjectName="ActHiTaskinst" enableCountByExample="true"></table>
<table schema="postgres" tableName="duty_arrangement" domainObjectName="DutyAyyangement" enableCountByExample="true"></table>
<table schema="postgres" tableName="company" domainObjectName="Company" enableCountByExample="true"></table>
<table schema="postgres" tableName="func_authority" domainObjectName="FuncAuthority" enableCountByExample="true"></table>
<table schema="postgres" tableName="overtime" domainObjectName="Overtime" enableCountByExample="true"></table>
<table schema="postgres" tableName="patrol" domainObjectName="Patrol" enableCountByExample="true"></table>
<table schema="postgres" tableName="data_authority" domainObjectName="DataAuthority" enableCountByExample="true"></table>
<table schema="postgres" tableName="file_authority" domainObjectName="FileAuthority" enableCountByExample="true"></table>
<table schema="postgres" tableName="hm_user" domainObjectName="HmUser" enableCountByExample="true"></table>
<table schema="postgres" tableName="user_role" domainObjectName="UserRole" enableCountByExample="true"></table>
<table schema="postgres" tableName="arrive_leave" domainObjectName="ArriveLeave" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_varinst" domainObjectName="ActHiVarinst" enableCountByExample="true"></table>
<table schema="public" tableName="act_id_group" domainObjectName="ActIdGroup" enableCountByExample="true"></table>
<table schema="public" tableName="act_id_info" domainObjectName="ActIdInfo" enableCountByExample="true"></table>
<table schema="public" tableName="act_id_membership" domainObjectName="ActIdMembership" enableCountByExample="true"></table>
<table schema="public" tableName="act_id_user" domainObjectName="ActIdUser" enableCountByExample="true"></table>
<table schema="public" tableName="act_procdef_info" domainObjectName="ActProcdefInfo" enableCountByExample="true"></table>
<table schema="public" tableName="act_re_deployment" domainObjectName="ActReDeployment" enableCountByExample="true"></table>
<table schema="public" tableName="act_re_model" domainObjectName="ActReModel" enableCountByExample="true"></table>
<table schema="public" tableName="act_re_procdef" domainObjectName="ActReProcdef" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_event_subscr" domainObjectName="ActRuEventSubscr" enableCountByExample="true"></table>
<table schema="postgres" tableName="simple_data_authority" domainObjectName="SimpleDataAuthority" enableCountByExample="true"></table>
<table schema="postgres" tableName="menu" domainObjectName="Menu" enableCountByExample="true"></table>
<table schema="postgres" tableName="role" domainObjectName="Role" enableCountByExample="true"></table>
<table schema="postgres" tableName="role_menu" domainObjectName="RoleMenu" enableCountByExample="true"></table>
<table schema="postgres" tableName="order" domainObjectName="Order" enableCountByExample="true"></table>
<table schema="postgres" tableName="leave" domainObjectName="Leave" enableCountByExample="true"></table>
<table schema="postgres" tableName="auth_token" domainObjectName="AuthToken" enableCountByExample="true"></table>
<table schema="postgres" tableName="position_history" domainObjectName="PositionHistory" enableCountByExample="true"></table>
<table schema="postgres" tableName="notice" domainObjectName="Notice" enableCountByExample="true"></table>
<table schema="postgres" tableName="department" domainObjectName="Department" enableCountByExample="true"></table>
<table schema="postgres" tableName="department_type" domainObjectName="DepartmentType" enableCountByExample="true"></table>
<table schema="postgres" tableName="delivery" domainObjectName="Delivery" enableCountByExample="true"></table>
<table schema="postgres" tableName="store_params" domainObjectName="StoreParams" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_execution" domainObjectName="ActRuExecution" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_identitylink" domainObjectName="ActRuIdentitylink" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_job" domainObjectName="ActRuJob" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_task" domainObjectName="ActRuTask" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_variable" domainObjectName="ActRuVariable" enableCountByExample="true"></table>
<table schema="public" tableName="process_property" domainObjectName="ProcessProperty" enableCountByExample="true"></table>
<table schema="public" tableName="section_property" domainObjectName="SectionProperty" enableCountByExample="true"></table>
<table schema="public" tableName="template_section_m2m" domainObjectName="TemplateSectionM2m" enableCountByExample="true"></table>
</context>
</generatorConfiguration>
......@@ -6,16 +6,16 @@
<generatorConfiguration>
<!--<classPathEntry location="/Users/hxgqh/.m2/repository/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar" />-->
<!--<classPathEntry location="/Users/liuranran/.m2/repository/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar" />-->
<classPathEntry location="/Users/hm20160509/.m2/repository/postgresql/postgresql/9.1-901-1.jdbc4/postgresql-9.1-901-1.jdbc4.jar" />
<classPathEntry location="/Users/zl/.m2/repository/postgresql/9.1-901-1.jdbc4/9.1-901-1.jdbc4/9.1-901-1.jdbc4-9.1-901-1.jdbc4.jar" />
<context id="mysqlTables" targetRuntime="MyBatis3">
<plugin type="org.mybatis.generator.plugins.RowBoundsPlugin"/>
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
<jdbcConnection driverClass="org.postgresql.Driver"
connectionURL="jdbc:postgresql://115.28.80.125:5432/processengineservice"
connectionURL="jdbc:postgresql://tentop.com.cn:54321/postgres"
userId="postgres"
password="123456"/>
password="root"/>
<!-- 指定生成的类型为java类型,避免数据库中number等类型字段 -->
<javaTypeResolver>
......@@ -44,44 +44,31 @@
value="true"/>
</javaClientGenerator>
<table schema="postgres" tableName="duty_arrangement" domainObjectName="DutyAyyangement" enableCountByExample="true"></table>
<table schema="postgres" tableName="company" domainObjectName="Company" enableCountByExample="true"></table>
<table schema="postgres" tableName="func_authority" domainObjectName="FuncAuthority" enableCountByExample="true"></table>
<table schema="postgres" tableName="overtime" domainObjectName="Overtime" enableCountByExample="true"></table>
<table schema="postgres" tableName="patrol" domainObjectName="Patrol" enableCountByExample="true"></table>
<table schema="postgres" tableName="data_authority" domainObjectName="DataAuthority" enableCountByExample="true"></table>
<table schema="postgres" tableName="file_authority" domainObjectName="FileAuthority" enableCountByExample="true"></table>
<table schema="postgres" tableName="hm_user" domainObjectName="HmUser" enableCountByExample="true"></table>
<table schema="postgres" tableName="user_role" domainObjectName="UserRole" enableCountByExample="true"></table>
<table schema="postgres" tableName="arrive_leave" domainObjectName="ArriveLeave" enableCountByExample="true"></table>
<table schema="public" tableName="act_evt_log" domainObjectName="ActEvtLog" enableCountByExample="true"></table>
<table schema="public" tableName="act_ge_bytearray" domainObjectName="ActGeBytearray" enableCountByExample="true"></table>
<table schema="public" tableName="act_ge_property" domainObjectName="ActGeProperty" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_actinst" domainObjectName="ActHiActinst" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_attachment" domainObjectName="ActHiAttachment" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_comment" domainObjectName="ActHiComment" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_detail" domainObjectName="ActHiDetail" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_identitylink" domainObjectName="ActHiIdentitylink" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_procinst" domainObjectName="ActHiProcinst" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_taskinst" domainObjectName="ActHiTaskinst" enableCountByExample="true"></table>
<table schema="postgres" tableName="simple_data_authority" domainObjectName="SimpleDataAuthority" enableCountByExample="true"></table>
<table schema="postgres" tableName="menu" domainObjectName="Menu" enableCountByExample="true"></table>
<table schema="postgres" tableName="role" domainObjectName="Role" enableCountByExample="true"></table>
<table schema="postgres" tableName="role_menu" domainObjectName="RoleMenu" enableCountByExample="true"></table>
<table schema="postgres" tableName="order" domainObjectName="Order" enableCountByExample="true"></table>
<table schema="postgres" tableName="leave" domainObjectName="Leave" enableCountByExample="true"></table>
<table schema="postgres" tableName="auth_token" domainObjectName="AuthToken" enableCountByExample="true"></table>
<table schema="postgres" tableName="position_history" domainObjectName="PositionHistory" enableCountByExample="true"></table>
<table schema="postgres" tableName="notice" domainObjectName="Notice" enableCountByExample="true"></table>
<table schema="postgres" tableName="department" domainObjectName="Department" enableCountByExample="true"></table>
<table schema="public" tableName="act_hi_varinst" domainObjectName="ActHiVarinst" enableCountByExample="true"></table>
<table schema="public" tableName="act_id_group" domainObjectName="ActIdGroup" enableCountByExample="true"></table>
<table schema="public" tableName="act_id_info" domainObjectName="ActIdInfo" enableCountByExample="true"></table>
<table schema="public" tableName="act_id_membership" domainObjectName="ActIdMembership" enableCountByExample="true"></table>
<table schema="public" tableName="act_id_user" domainObjectName="ActIdUser" enableCountByExample="true"></table>
<table schema="public" tableName="act_procdef_info" domainObjectName="ActProcdefInfo" enableCountByExample="true"></table>
<table schema="public" tableName="act_re_deployment" domainObjectName="ActReDeployment" enableCountByExample="true"></table>
<table schema="public" tableName="act_re_model" domainObjectName="ActReModel" enableCountByExample="true"></table>
<table schema="public" tableName="act_re_procdef" domainObjectName="ActReProcdef" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_event_subscr" domainObjectName="ActRuEventSubscr" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_execution" domainObjectName="ActRuExecution" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_identitylink" domainObjectName="ActRuIdentitylink" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_job" domainObjectName="ActRuJob" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_task" domainObjectName="ActRuTask" enableCountByExample="true"></table>
<table schema="public" tableName="act_ru_variable" domainObjectName="ActRuVariable" enableCountByExample="true"></table>
<table schema="public" tableName="section_property" domainObjectName="SectionProperty" enableCountByExample="true"></table>
<table schema="public" tableName="template_section_m2m" domainObjectName="TemplateSectionM2m" enableCountByExample="true"></table>
<table schema="public" tableName="process_property" domainObjectName="ProcessProperty" enableCountByExample="true"></table>
<table schema="public" tableName="section_task_m2m" domainObjectName="SectionTaskM2m" enableCountByExample="true"></table>
<table schema="public" tableName="task" domainObjectName="Task" enableCountByExample="true"></table>
<table schema="public" tableName="variant_property" domainObjectName="VariantProperty" enableCountByExample="true"></table>
<table schema="public" tableName="role" domainObjectName="Role" enableCountByExample="true"></table>
<table schema="public" tableName="user" domainObjectName="User" enableCountByExample="true"></table>
<table schema="postgres" tableName="department_type" domainObjectName="DepartmentType" enableCountByExample="true"></table>
<table schema="postgres" tableName="delivery" domainObjectName="Delivery" enableCountByExample="true"></table>
<table schema="postgres" tableName="store_params" domainObjectName="StoreParams" enableCountByExample="true"></table>
</context>
</generatorConfiguration>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment