From 4a8f109deceb9833473a4ee7f052b20cbc3b0076 Mon Sep 17 00:00:00 2001 From: cuibaocheng Date: Sat, 14 Aug 2021 20:14:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=A8=E6=80=81=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E8=87=AA=E5=8A=A8=E6=8E=92=E7=89=88=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E7=9A=84=E4=BF=9D=E5=AD=98=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PicturesTemplateBuildingServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplatebuilding/impl/PicturesTemplateBuildingServiceImpl.java b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplatebuilding/impl/PicturesTemplateBuildingServiceImpl.java index 47ea565..58739d3 100644 --- a/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplatebuilding/impl/PicturesTemplateBuildingServiceImpl.java +++ b/module-building-pictures/src/main/java/cn/com/tenlion/buildingpictures/service/picturestemplatebuilding/impl/PicturesTemplateBuildingServiceImpl.java @@ -275,8 +275,8 @@ public class PicturesTemplateBuildingServiceImpl extends DefaultBaseService impl }else{ count = (count + 0.5); } - - if((count+1) >= rowCount || i == c.length-1 || '\n' == c[i]) { + // 如果字换行早了 , 把count - 1 , 如果字换行晚了 , 就count - 0.x + if((count) >= rowCount || i == c.length-1 || '\n' == c[i]) { count = 0; contentList.add(rowContent.toString().replace("\n", "")); rowContent.setLength(0);