From 1d5182dff2e24a39cdb727a5f51937dad7492fa5 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Tue, 12 Mar 2019 14:13:40 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=8B=BC=E5=9B=A2][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxOrderGroupServiceImpl.java | 5 ++++- .../src/main/resources/mapper/WxOrderGroupMapper.xml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java index 2c7c47bf5..10c07e5af 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java @@ -199,7 +199,9 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService { wxOrder = new WxOrder(); wxOrder.setOrderGroupId(wxOrderGroup.getId()); wxOrder.setTenantId(wxOrderGroup.getTenantId()); - List orderList = wxOrderMapper.select(wxOrder); + wxOrder.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING.getCode()); + List orderList = wxOrderMapper.select(wxOrder).parallelStream() + .sorted(Comparator.comparing(order -> order.getId())).collect(Collectors.toList()); if (!orderList.isEmpty()) { List ids = new ArrayList<>(); for (WxOrder order : orderList) { @@ -231,6 +233,7 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService { order.setTenantId(wxOrderGroup.getTenantId()); order.setCUserId(wxOrderGroup.getUserId()); order.setOrderGroupId(wxOrderGroup.getId()); + order.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING.getCode()); int count = wxOrderMapper.selectCount(order); WxOrderGroup group = wxOrderGroupMapper.selectByPrimaryKey(wxOrderGroup.getId()); Map result = new HashMap<>(2); diff --git a/mallinkService/src/main/resources/mapper/WxOrderGroupMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderGroupMapper.xml index a3209c3a6..c1a445cfe 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderGroupMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderGroupMapper.xml @@ -83,7 +83,7 @@ and o.id=#{id} - and o.order_group_id!=0 + and o.order_group_id!=0 and o.order_status in(10,11,12,13) order by o.id desc,o.order_status