| | |
| | | private String orderTime; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "打包费") |
| | | private BigDecimal packagingPrice; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "配送费") |
| | | private BigDecimal sendPrice; |
| | | |
| | |
| | | private String orderStoreNum; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "打包费") |
| | | private BigDecimal packagingPrice; |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "配送费") |
| | | private BigDecimal sendPrice; |
| | | |
| | |
| | | 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; |
| | | } |
| | |
| | | } |
| | | 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) { |
| | |
| | | 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()); |
| | |
| | | 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; |
| | | } |
| | |
| | | <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"/> |
| | |
| | | |
| | | <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, |
| | |
| | | <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"/> |
| | |
| | | |
| | | <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, |