xin
3 days ago 8c182b3ba68aa74befe624697cb842e1b53034eb
订单-打包费
6 files modified
26 ■■■■ changed files
oying-system/src/main/java/com/oying/modules/sh/domain/Order.java 4 ●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/sh/domain/OrderReturn.java 4 ●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/sh/domain/vo/OrderInfo.java 8 ●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java 4 ●●●● patch | view | raw | blame | history
oying-system/src/main/resources/mapper/sh/OrderMapper.xml 3 ●●●● patch | view | raw | blame | history
oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml 3 ●●●● patch | view | raw | blame | history
oying-system/src/main/java/com/oying/modules/sh/domain/Order.java
@@ -60,6 +60,10 @@
    private String orderTime;
    @NotNull
    @ApiModelProperty(value = "打包费")
    private BigDecimal packagingPrice;
    @NotNull
    @ApiModelProperty(value = "配送费")
    private BigDecimal sendPrice;
oying-system/src/main/java/com/oying/modules/sh/domain/OrderReturn.java
@@ -59,6 +59,10 @@
    private String orderStoreNum;
    @NotNull
    @ApiModelProperty(value = "打包费")
    private BigDecimal packagingPrice;
    @NotNull
    @ApiModelProperty(value = "配送费")
    private BigDecimal sendPrice;
oying-system/src/main/java/com/oying/modules/sh/domain/vo/OrderInfo.java
@@ -32,8 +32,8 @@
    private BigDecimal promotionAmount = BigDecimal.ZERO;
    @ApiModelProperty(value = "优惠卷待定")
    private Object coupon;
    @ApiModelProperty(value = "运费待定")
    private Object shippingFee;
    @ApiModelProperty(value = "打包费待定")
    private Object packingCharges;
    @ApiModelProperty(value = "配送费")
    private BigDecimal deliveryPrice = BigDecimal.ZERO;
    @ApiModelProperty(value = "打包费")
    private BigDecimal packagingPrice = BigDecimal.ZERO;
}
oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java
@@ -212,6 +212,7 @@
        }
        List<ProductInfo> products = new ArrayList<>();
        BigDecimal amount = BigDecimal.ZERO;
        int count = 0;
        for (ProductOrder productOrder : criteria.getProducts()) {
            Product product = productService.getById(productOrder.getProductId());
            if (product == null) {
@@ -236,6 +237,7 @@
            info.setCount(productOrder.getCount());
            products.add(info);
            amount = BigDecimalUtils.add(amount, BigDecimalUtils.multiply(product.getPrice(), productOrder.getCount()));
            count += productOrder.getCount();
        }
        if (!(amount.compareTo(store.getDeliveryMinimum()) >= 0)) {
            throw new BadRequestException("起送金额:" + store.getDeliveryMinimum());
@@ -246,6 +248,8 @@
        info.setAmount(amount);
        info.setPayAmount(amount);
        info.setPromotionAmount(BigDecimal.ZERO);
        info.setDeliveryPrice(store.getDeliveryFee());
        info.setPackagingPrice(BigDecimalUtils.multiply(store.getPackagingFee(), count));
        info.setUserAddresses(userAddressService.queryUserAddress(store.getLongitude(), store.getLatitude()));
        return info;
    }
oying-system/src/main/resources/mapper/sh/OrderMapper.xml
@@ -9,6 +9,7 @@
        <result column="order_status_describe" property="orderStatusDescribe"/>
        <result column="order_remark" property="orderRemark"/>
        <result column="order_time" property="orderTime"/>
        <result column="packaging_price" property="packagingPrice"/>
        <result column="send_price" property="sendPrice"/>
        <result column="send_type" property="sendType"/>
        <result column="user_id" property="userId"/>
@@ -63,7 +64,7 @@
    <sql id="Base_Column_List">
        o.order_id, o.order_num, o.order_store_num, o.order_status, o.order_status_describe,
        o.order_remark, o.order_time, o.send_price, o.send_type, o.user_id, o.username, o.store_id,
        o.order_remark, o.order_time, o.packaging_price, o.send_price, o.send_type, o.user_id, o.username, o.store_id,
        o.store_name, o.store_logo, o.store_address, o.store_longitude, o.store_latitude,
        o.order_describe, o.original_price order_original_price, o.paid_price order_paid_price,
        o.actually_pay_price order_actually_pay_price, o.pay_state order_pay_state, o.pay_message, o.pay_type, o.pay_time, o.expire_time,
oying-system/src/main/resources/mapper/sh/OrderReturnMapper.xml
@@ -9,6 +9,7 @@
        <result column="order_num" property="orderNum"/>
        <result column="order_store_num" property="orderStoreNum"/>
        <result column="order_time" property="orderTime"/>
        <result column="packaging_price" property="packagingPrice"/>
        <result column="send_price" property="sendPrice"/>
        <result column="send_type" property="sendType"/>
        <result column="pay_type" property="payType"/>
@@ -58,7 +59,7 @@
    <sql id="Base_Column_List">
        o.return_id, o.return_num, o.return_status, o.return_status_describe, o.order_num, o.order_store_num,
        o.order_time, o.send_price, o.send_type, o.pay_type, o.user_id, o.username, o.store_id, o.store_name, o.store_logo,
        o.order_time, o.packaging_price, o.send_price, o.send_type, o.pay_type, o.user_id, o.username, o.store_id, o.store_name, o.store_logo,
        o.original_price order_original_price, o.paid_price order_paid_price, o.actually_pay_price order_actually_pay_price,
        o.refund_price, o.refund_status, o.success_time, o.channel, o.reason, o.remark, o.photos, o.audit_status,
        o.audit_user, o.audit_time, o.audit_message, o.rider_id, o.rider_phone, o.rider_name,