Skip to content

Commit

Permalink
Oracle与SQL Server的分页
Browse files Browse the repository at this point in the history
  • Loading branch information
zouzg committed May 28, 2017
1 parent fe19d7c commit 78154c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,11 @@ public void generate() throws Exception {
// limit/offset插件
if (generatorConfig.isOffsetLimit()) {
PluginConfiguration pluginConfiguration = new PluginConfiguration();
pluginConfiguration.addProperty("type", "com.zzg.mybatis.generator.plugins.MySQLLimitPlugin");
pluginConfiguration.setConfigurationType("com.zzg.mybatis.generator.plugins.MySQLLimitPlugin");
if (DbType.MySQL.name().equals(selectedDatabaseConfig.getDbType())
|| DbType.PostgreSQL.name().equals(selectedDatabaseConfig.getDbType())) {
pluginConfiguration.addProperty("type", "com.zzg.mybatis.generator.plugins.MySQLLimitPlugin");
pluginConfiguration.setConfigurationType("com.zzg.mybatis.generator.plugins.MySQLLimitPlugin");
}
context.addPluginConfiguration(pluginConfiguration);
}
context.setTargetRuntime("MyBatis3");
Expand Down
14 changes: 7 additions & 7 deletions src/main/resources/fxml/MainUI.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
<ColumnConstraints hgrow="SOMETIMES" maxWidth="688.0" minWidth="10.0" prefWidth="170.0" />
<ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES" maxWidth="688.0" minWidth="74.0" prefWidth="76.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="688.0" minWidth="10.0" prefWidth="166.0" />
<ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES" maxWidth="688.0" minWidth="10.0" prefWidth="111.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="688.0" minWidth="10.0" prefWidth="116.0" />
<ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES" maxWidth="688.0" minWidth="10.0" prefWidth="129.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="688.0" minWidth="10.0" prefWidth="95.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
Expand All @@ -75,7 +75,7 @@
<Insets left="5.0" right="5.0" />
</GridPane.margin>
</TextField>
<Label text="Java POJO 类名" GridPane.rowIndex="1" />
<Label text="Java实体类名" GridPane.rowIndex="1" />
<HBox alignment="CENTER_LEFT" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<children>
<TextField fx:id="domainObjectNameField" prefHeight="27.0" prefWidth="154.0" promptText="Person" GridPane.columnIndex="1" GridPane.rowIndex="2">
Expand Down Expand Up @@ -128,7 +128,7 @@
</styleClass></Button>
</children>
</HBox>
<Label text="Java POJO包名" GridPane.rowIndex="4" />
<Label text="实体类名包名" GridPane.rowIndex="4" />
<TextField fx:id="modelTargetPackage" prefHeight="27.0" prefWidth="152.0" promptText="com.example.model" GridPane.columnIndex="1" GridPane.rowIndex="4">
<HBox.margin>
<Insets right="5.0" />
Expand All @@ -142,7 +142,7 @@
<GridPane.margin>
<Insets left="5.0" />
</GridPane.margin></TextField>
<Label text="DAO接口包名" GridPane.rowIndex="5" />
<Label text="接口包名" GridPane.rowIndex="5" />
<TextField fx:id="daoTargetPackage" prefHeight="27.0" prefWidth="248.0" promptText="com.example.mapper" GridPane.columnIndex="1" GridPane.rowIndex="5">
<HBox.margin>
<Insets right="5.0" />
Expand All @@ -156,7 +156,7 @@
<GridPane.margin>
<Insets left="5.0" />
</GridPane.margin></TextField>
<Label text="映射文件包名" GridPane.rowIndex="6" />
<Label text="映射XML文件包名" GridPane.rowIndex="6" />
<TextField fx:id="mapperTargetPackage" prefHeight="27.0" prefWidth="248.0" promptText="com.example" GridPane.columnIndex="1" GridPane.rowIndex="6">
<HBox.margin>
<Insets right="5.0" />
Expand Down Expand Up @@ -203,7 +203,7 @@
</styleClass></Button>
</children>
</HBox>
<Label text="DAO名称(选填)" GridPane.columnIndex="4" GridPane.rowIndex="5">
<Label text="自定义接口名称(选填)" GridPane.columnIndex="4" GridPane.rowIndex="5">
<padding>
<Insets left="5.0" />
</padding>
Expand Down

0 comments on commit 78154c4

Please sign in to comment.