
--- src/main/resources/spring/mapper/sql/mariadb-SQL.xml
+++ src/main/resources/spring/mapper/sql/mariadb-SQL.xml
... | ... | @@ -496,6 +496,9 @@ |
496 | 496 |
WHERE 1 |
497 | 497 |
${query} |
498 | 498 |
</if> |
499 |
+ <if test="perPage != null and perPage > 10"> |
|
500 |
+ LIMIT #{perPage} OFFSET #{offset} |
|
501 |
+ </if> |
|
499 | 502 |
</select> |
500 | 503 |
|
501 | 504 |
<!-- |
--- src/main/resources/spring/mapper/sql/mysql-SQL.xml
+++ src/main/resources/spring/mapper/sql/mysql-SQL.xml
... | ... | @@ -495,6 +495,9 @@ |
495 | 495 |
WHERE 1 |
496 | 496 |
${query} |
497 | 497 |
</if> |
498 |
+ <if test="perPage != null and perPage > 10"> |
|
499 |
+ LIMIT #{perPage} OFFSET #{offset} |
|
500 |
+ </if> |
|
498 | 501 |
</select> |
499 | 502 |
|
500 | 503 |
<!-- |
--- src/main/resources/spring/mapper/sql/postgre-SQL.xml
+++ src/main/resources/spring/mapper/sql/postgre-SQL.xml
... | ... | @@ -589,6 +589,9 @@ |
589 | 589 |
<!-- AND --> |
590 | 590 |
${query} |
591 | 591 |
</if> |
592 |
+ <if test="perPage != null and perPage > 10"> |
|
593 |
+ LIMIT #{perPage} OFFSET #{offset} |
|
594 |
+ </if> |
|
592 | 595 |
</select> |
593 | 596 |
|
594 | 597 |
<!-- |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?