From 7eca056eb6529065fe9e558d0e3a27df0771184e Mon Sep 17 00:00:00 2001 From: Burce Date: Sun, 12 Apr 2020 23:25:12 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA]1?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E5=A4=8D=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=EF=BC=9B2=E3=80=81=E4=BC=98=E5=8C=96=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxCouponOrderServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java index a6a2389e5..8bb5d2897 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java @@ -35,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -299,13 +300,12 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { } if (!c.getMerchantId().equals(0L)) { List merchantVoList = c.getMerchantVoList(); - if (!merchantVoList.isEmpty()) { - StringBuffer shopNumber = new StringBuffer(); - StringBuffer building = new StringBuffer(); + if (!CollectionUtils.isEmpty(merchantVoList)) { + StringBuilder shopNumber = new StringBuilder(); + StringBuilder building = new StringBuilder(); WxMerchantVo wxMerchantVo = merchantVoList.get(0); List shopVoList = wxMerchantVo.getShopVoList(); - for (int j = 0, s_size = shopVoList.size(); j < s_size; j++) { - WxShopVo wxShopVo = shopVoList.get(j); + for (WxShopVo wxShopVo : shopVoList) { shopNumber.append(wxShopVo.getShopNumber()).append(";"); building.append(wxShopVo.getBuildingName()).append(wxShopVo.getFloorName()).append(";"); }