|
|
@@ -81,6 +81,10 @@ class OrderController extends BaseController
|
|
|
$goodsPrice = $unitPrice * $goodsNum;
|
|
|
$prePrice = stringUtil::calcAdd($sendCost, $goodsPrice);
|
|
|
$showPrice = $prePrice;
|
|
|
+ //非门店订单
|
|
|
+ $store = 0;
|
|
|
+ $post['store'] = $store;
|
|
|
+ //来源 0微信 1支付宝 2小程序 3朋友圈 4美团
|
|
|
$sourceType = $this->isWx ? 0 : 1;
|
|
|
if (httpUtil::isMiniProgram()) {
|
|
|
$sourceType = 2;
|
|
|
@@ -90,7 +94,7 @@ class OrderController extends BaseController
|
|
|
$actPrice = $discountData['price'];
|
|
|
$post['discountType'] = $discountData['discountType'];
|
|
|
$post['discountAmount'] = $discountData['discountAmount'];
|
|
|
-
|
|
|
+
|
|
|
$now = time();
|
|
|
$expireTime = $now + 1800;//订单30分钟后过期
|
|
|
$post['deadline'] = $expireTime;
|
|
|
@@ -233,13 +237,16 @@ class OrderController extends BaseController
|
|
|
//验证门店是否有效
|
|
|
$shopInfo = ShopService::getById($shopId);
|
|
|
ShopService::valid($shopInfo, $this->merchantId);
|
|
|
+ //默认门店订单
|
|
|
+ $store = isset($post['store']) ? $post['store'] : 1;
|
|
|
+ $post['store'] = $store;
|
|
|
//来源 0微信 1支付宝 2小程序 3朋友圈 4美团
|
|
|
$sourceType = $this->isWx ? 0 : 1;
|
|
|
if (httpUtil::isMiniProgram()) {
|
|
|
$sourceType = 2;
|
|
|
}
|
|
|
$sourceType = isset($post['sourceType']) ? $post['source'] : 0;
|
|
|
-
|
|
|
+
|
|
|
$post['userId'] = $this->userId;
|
|
|
$prePrice = round($post['prePrice'], 2);
|
|
|
$couponId = isset($post['couponId']) ? $post['couponId'] : 0;
|