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(";"); }