|
|
@@ -98,17 +98,20 @@ class OrderClass extends BaseClass
|
|
|
$product = $data['product'];
|
|
|
$respond = OrderItemClass::replaceItem($orderSn, $product);
|
|
|
|
|
|
+ $sendCost = isset($data['sendCost']) && is_numeric($data['sendCost']) ? $data['sendCost'] : 0;
|
|
|
+ $data['sendCost'] = $sendCost;
|
|
|
$data['bigNum'] = $respond['bigNum'] ?? 0;
|
|
|
$data['smallNum'] = $respond['smallNum'] ?? 0;
|
|
|
- $data['actPrice'] = $respond['price'] ?? 0;
|
|
|
- $data['prePrice'] = $respond['price'] ?? 0;
|
|
|
+ $price = $respond['price'] ?? 0;
|
|
|
+ $currentPrice = bcadd($price, $sendCost, 2);
|
|
|
+ $data['actPrice'] = $currentPrice;
|
|
|
+ $data['prePrice'] = $currentPrice;
|
|
|
|
|
|
//将花店每月的总 订单数作为编号
|
|
|
$data['sendNum'] = StatOrderCountClass::addOrder($month, $sjId);
|
|
|
$data['sendTime'] = isset($data['sendTime']) && !empty($data['sendTime']) ? $data['sendTime'] : '0000-00-00 00:00:00';
|
|
|
//订单30分钟后过期
|
|
|
$data['deadline'] = date("Y-m-d H:i:s", (time() + 1800));
|
|
|
- $data['sendCost'] = isset($data['sendCost']) && is_numeric($data['sendCost']) ? $data['sendCost'] : 0;
|
|
|
$data['status'] = self::ORDER_STATUS_UN_PAY;
|
|
|
|
|
|
//计算总重量(kg)
|