xiaoyong931011
2021-07-23 774cb0ede0572062f025132a5c2a0262188abf05
Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop
1 files modified
8 ■■■■ changed files
gc-order/src/main/java/com/xzx/gc/order/service/JhyOrderService.java 8 ●●●● patch | view | raw | blame | history
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());
@@ -159,6 +161,10 @@
            throw new RestException(-3, "订单不存在");
        }
        if (order.getUserId().equals(jhyInfo.getUserId())) {
            throw new RestException(-3, "不能抢自己的单");
        }
        order.setJhyId(userId);
        order.setStatus(JhyOrder.ORDER_STATUS_IMG);
        jhyOrderMapper.updateByPrimaryKey(order);