From 55334da20cff4dac840c320eda1d0ca53ba27eda Mon Sep 17 00:00:00 2001 From: fwq <582742538@qq.com> Date: 星期一, 23 九月 2024 14:26:36 +0800 Subject: [PATCH] Merge branch 'master-stander' into master-xlk --- src/main/java/com/hx/mybatisTool/SqlSentence.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hx/mybatisTool/SqlSentence.java b/src/main/java/com/hx/mybatisTool/SqlSentence.java index 0aa85e3..882a2a9 100644 --- a/src/main/java/com/hx/mybatisTool/SqlSentence.java +++ b/src/main/java/com/hx/mybatisTool/SqlSentence.java @@ -109,14 +109,15 @@ if(pageNum < 1){ pageNum = 1; } + if(pageSize < 1){ + pageSize = 1; + } this.pageNum = pageNum; this.pageSize = pageSize; //绠楄捣鐐� int pageStart = (pageNum-1)*pageSize; - //绠楃粨鏉熺偣 - int pageEnd = pageNum*pageSize; - sql = sql+" LIMIT "+pageStart+","+pageEnd; + sql = sql+" LIMIT "+pageStart+","+pageSize; sqlSentence = sql; m = values; } -- Gitblit v1.8.0