解决PagerUtils修改offset的bug,当offset需要修改为0时,取值不正确

This commit is contained in:
likangning
2019-05-31 14:16:05 +08:00
parent 8dc5d2d307
commit 2017fb7cf1
2 changed files with 9 additions and 1 deletions
@@ -400,7 +400,7 @@ public class PagerUtils {
private static boolean limitMySqlQueryBlock(SQLSelectQueryBlock queryBlock, String dbType, int offset, int count, boolean check) {
SQLLimit limit = queryBlock.getLimit();
if (limit != null) {
if (offset > 0) {
if (offset >= 0) {
limit.setOffset(new SQLIntegerExpr(offset));
}