From 84270e11187fe5ab7594f5a9ff9e7eb1117bf932 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Sat, 3 Aug 2019 10:58:25 +0800 Subject: [PATCH] =?UTF-8?q?[C=E7=AB=AF=E9=A6=96=E9=A1=B5][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9][=E6=8D=A2=E4=B8=80=E6=8D=A2=E6=8B=BC=E5=9B=A2?= =?UTF-8?q?=E4=B8=8E=E7=A0=8D=E4=BB=B7]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/service/impl/WxCouponChannelServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java index 12f5447b7..d0fb244c5 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java @@ -156,12 +156,13 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { return new ResultData(Result.SUCCESS, "查询成功", data); } Long finalCouponId = couponId; + int size = voList.size(); + data.put("size", size); voList = voList.stream() .filter(wxCouponChannelVo -> !wxCouponChannelVo.getCouponId().equals(finalCouponId)) .collect(Collectors.toList()); - int size = voList.size(); + size = voList.size(); Random random = new Random(); - data.put("size", size); data.put("data", voList.get(random.nextInt(size))); return new ResultData(Result.SUCCESS, "查询成功", data); }