|
|
@@ -10645,7 +10645,9 @@ class StoreOrderRepository extends BaseRepository
|
|
10645
|
10645
|
*/
|
|
10646
|
10646
|
public function createOrderNew(StoreOrderCreateRequestEntity $storeOrderCreateRequestEntity, UserEntity $userEntity, array $cartEntityList, AddressEntity $addressEntity, ShareEntity $shareEntity)
|
|
10647
|
10647
|
{
|
|
10648
|
|
-
|
|
|
10648
|
+ // 购物车
|
|
|
10649
|
+ /** @var StoreCartRepository $storeCartRepository */
|
|
|
10650
|
+ $storeCartRepository = app()->make(StoreCartRepository::class);
|
|
10649
|
10651
|
// 商户
|
|
10650
|
10652
|
/** @var MerchantRepository $merchantRepository */
|
|
10651
|
10653
|
$merchantRepository = app()->make(MerchantRepository::class);
|
|
|
@@ -10905,11 +10907,27 @@ class StoreOrderRepository extends BaseRepository
|
|
10905
|
10907
|
|
|
10906
|
10908
|
|
|
10907
|
10909
|
|
|
10908
|
|
- // 会员专区
|
|
10909
|
|
- if ($productEntity->getMerId() == CommonEnum::DESIGN_MERCHANT_ID['MemberZone']['code']) {
|
|
|
10910
|
+ // // 会员专区
|
|
|
10911
|
+ // if ($productEntity->getMerId() == CommonEnum::DESIGN_MERCHANT_ID['MemberZone']['code']) {
|
|
|
10912
|
+ //
|
|
|
10913
|
+ // }
|
|
10910
|
10914
|
|
|
|
10915
|
+ // 更新库存
|
|
|
10916
|
+ if ($cartEntity->getProductType() == CartEnum::PRODUCT_TYPE['Ordinary']['code']) {
|
|
|
10917
|
+ $productAttrValueRepository->descStock($productAttrValueEntity->getProductId(), $productAttrValueEntity->getUnique(), $cartEntity->getCartNum());
|
|
|
10918
|
+ $productRepository->descStock($productEntity->getProductId(), $cartEntity->getCartNum());
|
|
|
10919
|
+ } else {
|
|
|
10920
|
+ $productAttrValueRepository->descSkuStock($productEntity->getOldProductId(), $productAttrValueEntity->getSku(), $cartEntity->getCartNum());
|
|
|
10921
|
+ $productRepository->descStock($productEntity->getOldProductId(), $cartEntity->getCartNum());
|
|
10911
|
10922
|
}
|
|
10912
|
10923
|
|
|
|
10924
|
+ // 修改 购物车状态
|
|
|
10925
|
+ $storeCartRepository->update($cartEntity->getCartId(), ['is_pay' => CartEnum::IS_PAY['Yes']['code']]);
|
|
|
10926
|
+
|
|
|
10927
|
+ // 修改优惠券状态
|
|
|
10928
|
+ // $storeCouponUserRepository->updates([], []);
|
|
|
10929
|
+
|
|
|
10930
|
+ // StoreGroupOrderEntity
|
|
10913
|
10931
|
|
|
10914
|
10932
|
// 组装数据
|
|
10915
|
10933
|
$_order = [
|
|
|
@@ -10976,12 +10994,11 @@ class StoreOrderRepository extends BaseRepository
|
|
10976
|
10994
|
'fzone_pay_note' => $array_fzone_paytype_all['fzone_pay_note'],
|
|
10977
|
10995
|
'fzone_pay_type' => $array_fzone_paytype_all['fzone_pay_type'],
|
|
10978
|
10996
|
];
|
|
10979
|
|
- }
|
|
10980
|
10997
|
|
|
10981
|
|
- foreach ($orderList as $orderInfo) {
|
|
10982
|
10998
|
|
|
10983
|
10999
|
}
|
|
10984
|
11000
|
|
|
|
11001
|
+
|
|
10985
|
11002
|
return [];
|
|
10986
|
11003
|
}
|
|
10987
|
11004
|
|