xiaoyong931011
2021-07-22 f4ef9fccb3347fd364ca59575bf62fe5e4362f59
gc-order/src/main/java/com/xzx/gc/order/service/JhyOrderService.java
@@ -150,6 +150,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, "订单不存在");
@@ -197,13 +201,11 @@
            orderItems.setTitle(environmentalInfo.getTitle());
            orderItems.setPrice(new BigDecimal(environmentalInfo.getPrice()));
            BigDecimal total = orderItems.getPrice().multiply(BigDecimal.valueOf(40)).multiply(weight);
            log.info("======>{}, {}, {}", total, orderItems.getPrice(), weight);
            orderItems.setScore(total.setScale(0, BigDecimal.ROUND_DOWN).toString());
            orderItems.setWeight(weight);
            jhyOrderItemsMapper.insert(orderItems);
            totalScore = totalScore.add(total);
            log.info("=====>>>{}", totalScore);
        }
        JhyOrder order = jhyOrderMapper.selectByPrimaryKey(confirmDto.getOrderId());