From 9ff1c9a2df642e6286be4903f841172f2073a7e8 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Thu, 22 Jul 2021 16:39:06 +0800 Subject: [PATCH] fix --- gc-order/src/main/java/com/xzx/gc/order/service/JhyOrderService.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/gc-order/src/main/java/com/xzx/gc/order/service/JhyOrderService.java b/gc-order/src/main/java/com/xzx/gc/order/service/JhyOrderService.java index 00c7482..e76dca1 100644 --- a/gc-order/src/main/java/com/xzx/gc/order/service/JhyOrderService.java +++ b/gc-order/src/main/java/com/xzx/gc/order/service/JhyOrderService.java @@ -63,7 +63,9 @@ public void addJhyOrder(AddJhyOrderDto orderDto) { JhyInfo jhyInfo = jhyInfoMapper.selectJhyInfoByUserId(orderDto.getUserId()); if (jhyInfo != null && JhyInfo.CHECK_PASS.equals(jhyInfo.getStatus())) { - throw new RestException(-3, "集货员不能下单"); + if (JhyInfo.IS_JHY_Y.equals(jhyInfo.getIsJhy())) { + throw new RestException(-3, "集货员不能下单"); + } } AddressInfo addressInfo = addressMapper.selectByPrimaryKey(orderDto.getAddressId()); @@ -150,6 +152,10 @@ throw new RestException(-3, "不是集货员"); } + if (JhyInfo.IS_JHY_N.equals(jhyInfo.getIsJhy())) { + throw new RestException(-3, "暂无法抢单"); + } + JhyOrder order = jhyOrderMapper.selectByPrimaryKey(orderId); if (order == null) { throw new RestException(-3, "订单不存在"); -- Gitblit v1.9.1