|
|
@@ -128,9 +128,9 @@ class StoreOrderController
|
|
|
$uid = $request->uid();
|
|
|
if ($this->services->be(['order_id|unique' => $key, 'uid' => $uid, 'is_del' => 0]))
|
|
|
return app('json')->status('extend_order', 410173, ['orderId' => $key, 'key' => $key]);
|
|
|
- list($addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckill_id, $bargainId, $shipping_type) = $request->postMore([
|
|
|
+ list($addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckill_id, $bargainId, $shipping_type,$repeat_discount) = $request->postMore([
|
|
|
'addressId', 'couponId', ['payType', ''], ['useIntegral', 0], 'mark', ['combinationId', 0], ['pinkId', 0], ['seckill_id', 0], ['bargainId', ''],
|
|
|
- ['shipping_type', 1],
|
|
|
+ ['shipping_type', 1],['repeat_discount',0]
|
|
|
], true);
|
|
|
$payType = strtolower($payType);
|
|
|
$cartGroup = $this->services->getCacheOrderInfo($uid, $key);
|
|
|
@@ -140,7 +140,7 @@ class StoreOrderController
|
|
|
'pinkId' => $pinkId,
|
|
|
'seckill_id' => $seckill_id,
|
|
|
'bargainId' => $bargainId,
|
|
|
- ])->computedOrder($request->uid(), $request->user()->toArray(), $cartGroup, $addressId, $payType, !!$useIntegral, (int)$couponId, false, (int)$shipping_type);
|
|
|
+ ])->computedOrder($request->uid(), $request->user()->toArray(), $cartGroup, $addressId, $payType, !!$useIntegral, (int)$couponId, false, (int)$shipping_type,$repeat_discount);
|
|
|
if ($priceGroup)
|
|
|
return app('json')->status('NONE', 100010, $priceGroup);
|
|
|
else
|
|
|
@@ -163,7 +163,7 @@ class StoreOrderController
|
|
|
$userInfo = $request->user()->toArray();
|
|
|
if ($checkOrder = $this->services->getOne(['order_id|unique' => $key, 'uid' => $userInfo['uid'], 'is_del' => 0]))
|
|
|
return app('json')->status('extend_order', 410209, ['orderId' => $checkOrder['order_id'], 'key' => $key]);
|
|
|
- [$addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckillId, $bargainId, $shipping_type, $real_name, $phone, $storeId, $news, $invoice_id, $advanceId, $customForm,$spread_uid] = $request->postMore([
|
|
|
+ [$addressId, $couponId, $payType, $useIntegral, $mark, $combinationId, $pinkId, $seckillId, $bargainId, $shipping_type, $real_name, $phone, $storeId, $news, $invoice_id, $advanceId, $customForm,$spread_uid,$useRepeatDiscount] = $request->postMore([
|
|
|
[['addressId', 'd'], 0],
|
|
|
[['couponId', 'd'], 0],
|
|
|
['payType', ''],
|
|
|
@@ -182,11 +182,11 @@ class StoreOrderController
|
|
|
[['advanceId', 'd'], 0],
|
|
|
['custom_form', []],
|
|
|
['spread_uid', 0],
|
|
|
-
|
|
|
+ ['useRepeatDiscount', 0],
|
|
|
], true);
|
|
|
$payType = strtolower($payType);
|
|
|
- $order = CacheService::lock('orderCreat' . $key, function () use ($createServices, $userInfo, $key, $addressId, $payType, $useIntegral, $couponId, $mark, $combinationId, $pinkId, $seckillId, $bargainId, $shipping_type, $real_name, $phone, $storeId, $news, $advanceId, $customForm, $invoice_id,$spread_uid) {
|
|
|
- return $createServices->createOrder($userInfo['uid'], $key, $userInfo, $addressId, $payType, !!$useIntegral, $couponId, $mark, $combinationId, $pinkId, $seckillId, $bargainId, $shipping_type, $real_name, $phone, $storeId, !!$news, $advanceId, $customForm, $invoice_id,$spread_uid);
|
|
|
+ $order = CacheService::lock('orderCreat' . $key, function () use ($createServices, $userInfo, $key, $addressId, $payType, $useIntegral, $couponId, $mark, $combinationId, $pinkId, $seckillId, $bargainId, $shipping_type, $real_name, $phone, $storeId, $news, $advanceId, $customForm, $invoice_id,$spread_uid,$useRepeatDiscount) {
|
|
|
+ return $createServices->createOrder($userInfo['uid'], $key, $userInfo, $addressId, $payType, !!$useIntegral, $couponId, $mark, $combinationId, $pinkId, $seckillId, $bargainId, $shipping_type, $real_name, $phone, $storeId, !!$news, $advanceId, $customForm, $invoice_id,$spread_uid,$useRepeatDiscount);
|
|
|
});
|
|
|
$orderId = $order['order_id'];
|
|
|
return app('json')->status('success', 410203, compact('orderId', 'key'));
|