|
|
@@ -102,7 +102,7 @@ class OrderController extends BaseController
|
|
|
$now = time();
|
|
|
$expireTime = $now + 1800;//订单30分钟后过期
|
|
|
$post['deadline'] = $expireTime;
|
|
|
- $post['fromType'] = 1;//商城
|
|
|
+ $post['fromType'] = dict::getDict('fromType', 'mall');
|
|
|
$post['prePrice'] = $prePrice;
|
|
|
$post['actPrice'] = $actPrice;
|
|
|
$order = OrderClass::addOrder($post);
|
|
|
@@ -252,14 +252,8 @@ class OrderController extends BaseController
|
|
|
$shopId = $this->shopId;
|
|
|
$post['shopId'] = $shopId;
|
|
|
$post['merchantId'] = $this->sjId;
|
|
|
- //默认门店订单
|
|
|
- $store = isset($post['store']) ? $post['store'] : 1;
|
|
|
- $post['store'] = $store;
|
|
|
- //来源 0微信 1支付宝 2小程序 3朋友圈 4美团
|
|
|
- $sourceType = isset($post['sourceType']) ? $post['sourceType'] : 2;
|
|
|
- //兼容旧系统sourceType=3表示朋友圈来源
|
|
|
- $fromType = $sourceType == 3 ? 2 : 0;
|
|
|
- $fromType = isset($post['fromType']) && !empty($post['fromType']) ? $post['fromType'] : $fromType;
|
|
|
+ $post['store'] = 0;
|
|
|
+ $fromType = dict::getDict('fromType', 'shop');
|
|
|
$post['customId'] = $this->customId;
|
|
|
$user = $this->user;
|
|
|
$post['bookName'] = isset($user['userName']) ? $user['userName'] : '';
|
|
|
@@ -268,7 +262,7 @@ class OrderController extends BaseController
|
|
|
$post['bookMobile'] = $bookMobile;
|
|
|
$prePrice = round($post['prePrice'], 2);
|
|
|
$couponId = isset($post['couponId']) ? $post['couponId'] : 0;
|
|
|
- $discountData = OrderService::getDiscountPrice(['price' => $prePrice, 'sourceType' => $sourceType, 'couponId' => $couponId, 'userId' => $this->userId]);
|
|
|
+ $discountData = OrderService::getDiscountPrice(['price' => $prePrice, 'sourceType' => 0, 'couponId' => $couponId, 'userId' => $this->userId]);
|
|
|
$actPrice = $discountData['price'];
|
|
|
$post['discountType'] = $discountData['discountType'];
|
|
|
$post['discountAmount'] = $discountData['discountAmount'];
|
|
|
@@ -284,7 +278,6 @@ class OrderController extends BaseController
|
|
|
}
|
|
|
//微信支付订单提交不能修改价格
|
|
|
$post['modPrice'] = $this->isWx ? 0 : 1;
|
|
|
- $post['sourceType'] = $sourceType;
|
|
|
$post['goodsNum'] = 1;
|
|
|
$post['fromType'] = $fromType;
|
|
|
$post['reachDate'] = isset($post['reachDate']) && !empty($post['reachDate']) ? $post['reachDate'] : '00-00-00';
|