From f581118ec4993d81fbaff76b8d1d6272f169dfbe Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 2 Mar 2022 16:31:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7=E5=8F=AF?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E4=BC=98=E6=83=A0=E5=88=B8=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cweb/controller/HighUserDiscountController.java | 10 +++++----- .../main/java/com/hai/schedule/HighOrderSchedule.java | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java index aeb78975..2cd5f789 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java @@ -27,10 +27,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -152,11 +149,14 @@ public class HighUserDiscountController { for (HighDiscountCouponRel highDiscountCouponRel : discountCouponRelList) { List collect = userRels.stream().filter(o -> o.getDiscountId().equals(highDiscountCouponRel.getDiscountId())).collect(Collectors.toList()); if (collect != null && collect.size() > 0) { - list.add(collect.get(0)); + for (HighDiscountUserRel discountUser : collect) { + list.add(discountUser); + } } } } } + list.sort(Comparator.comparing(o -> o.getUseEndTime())); return ResponseMsgUtil.success(list); } catch (Exception e) { diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java index 802b2c65..e6b3fc9a 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java @@ -269,12 +269,12 @@ public class HighOrderSchedule { } } - @Scheduled(cron="1 * * * * * ?") //每1分钟执行一次 +/* @Scheduled(cron="1 * * * * * ?") //每1分钟执行一次 public void unionStagingPayOrder() { List> mapList = highOrderService.getFinishGasOrder(); if (mapList != null && mapList.size() > 0) { } - } + }*/ }