@Override
    public void calculate(TradePriceCalculateReqBO param, TradePriceCalculateRespBO result) {
        if (param.getDeliveryType() == null) {
            return;
        }
        // TODO @puhui999：需要校验，是不是存在商品不能门店自提，或者不能快递发货的情况。就是说，配送方式不匹配哈
        if (DeliveryTypeEnum.PICK_UP.getType().equals(param.getDeliveryType())) {
            calculateByPickUp(param);
        } else if (DeliveryTypeEnum.EXPRESS.getType().equals(param.getDeliveryType())) {
            calculateExpress(param, result);
        }
    }
@Test
    @DisplayName("按件计算运费不包邮的情况")
    public void testCalculate_expressTemplateCharge() {
        // SKU 1 : 100 * 2  = 200
        // SKU 2 ：200 * 10 = 2000
        // 运费  首件 1000 +  续件 2000 = 3000
        // mock 方法
        when(deliveryExpressTemplateService.getExpressTemplateMapByIdsAndArea(eq(asSet(1L)), eq(10)))
                .thenReturn(MapUtil.of(1L, templateRespBO));

        // 调用
        calculator.calculate(reqBO, resultBO);
        // 断言
        TradePriceCalculateRespBO.Price price = resultBO.getPrice();
        assertThat(price)
                .extracting("totalPrice","discountPrice","couponPrice","pointPrice","deliveryPrice","payPrice")
                .containsExactly(2200, 0, 0, 0, 3000,  5200);
        assertThat(resultBO.getItems()).hasSize(3);
        // 断言：SKU1
        assertThat(resultBO.getItems().get(0))
                .extracting("price", "count","discountPrice" ,"couponPrice", "pointPrice","deliveryPrice","payPrice")
                .containsExactly(100, 2, 0, 0, 0, 500, 700);
        // 断言：SKU2
        assertThat(resultBO.getItems().get(1))
                .extracting("price", "count","discountPrice" ,"couponPrice", "pointPrice","deliveryPrice","payPrice")
                .containsExactly(200, 10, 0, 0, 0, 2500, 4500);
        // 断言：SKU3 未选中
        assertThat(resultBO.getItems().get(2))
                .extracting("price", "count","discountPrice" ,"couponPrice", "pointPrice","deliveryPrice","payPrice")
                .containsExactly(300, 1, 0, 0, 0, 0, 300);
    }