From b5f02508f41abc81775d5e1ab37e3d628b52dd9d Mon Sep 17 00:00:00 2001 From: x_z Date: Mon, 13 Jun 2022 18:32:35 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=8D=95=E6=8D=AE=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=9F=A5=E8=AF=A2=E6=95=B0=E6=8D=AE=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java | 3 ++- .../glxp/api/admin/service/inout/impl/OrderServiceImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java b/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java index bd356754..3709369b 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java +++ b/api-admin/src/main/java/com/glxp/api/admin/dao/inout/OrderDao.java @@ -9,6 +9,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Set; @Mapper public interface OrderDao { @@ -64,7 +65,7 @@ public interface OrderDao { */ OrderEntity selectByBillNo(String billNo); - List selectByIds(@Param("orderIds") List orderIds); + List selectByIds(@Param("orderIds") Set orderIds); /** * 批量更新单据信息 diff --git a/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java b/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java index 46a7e422..b35fa305 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java +++ b/api-admin/src/main/java/com/glxp/api/admin/service/inout/impl/OrderServiceImpl.java @@ -375,7 +375,7 @@ public class OrderServiceImpl implements OrderService { } //通过源单据查询所有关联的单据数据 - public void getLinkedOrderId(String id, List orderIds) { + public void getLinkedOrderId(String id, Set orderIds) { List list = getOneOrderById(id); if (!orderIds.containsAll(list)) { //找出不包含在原有集合中的单据号,回调方法 @@ -421,7 +421,7 @@ public class OrderServiceImpl implements OrderService { */ @Override public List getAllOrder(OrderEntity orderEntity) { - List orderIds = new ArrayList<>(); + Set orderIds = new HashSet<>(); orderIds.add(orderEntity.getId()); getLinkedOrderId(orderEntity.getId(), orderIds);