|
|
@@ -2631,6 +2631,9 @@ class StoreOrderRepository extends BaseRepository
|
|
2631
|
2631
|
'specId' => $cart['productAttr']['spec_id'],
|
|
2632
|
2632
|
'quantity' => $cart['cart_num']
|
|
2633
|
2633
|
];
|
|
|
2634
|
+ if (!$cart['product']['spu_id'] || !$cart['productAttr']['spec_id']) {
|
|
|
2635
|
+ throw new ValidateException('1688预下单接口请求失败');
|
|
|
2636
|
+ }
|
|
2634
|
2637
|
$orderService = new OrderService();
|
|
2635
|
2638
|
$ailOrder = $orderService->previewOrder(['cargoParamList' => $cargoParamList, 'addressParam' => $addressParam]);
|
|
2636
|
2639
|
if ($ailOrder['preview']['sumCarriage'] > 0) {
|
|
|
@@ -5212,7 +5215,7 @@ class StoreOrderRepository extends BaseRepository
|
|
5212
|
5215
|
return $query->field('service_id,nickname');
|
|
5213
|
5216
|
}, 'user' => function ($query) {
|
|
5214
|
5217
|
return $query->field('uid,phone,nickname');
|
|
5215
|
|
- }, 'userPvLog', 'sharedProsperityRewardRecord'
|
|
|
5218
|
+ }, 'userPvLog', 'sharedProsperityRewardRecord','groupOrder'
|
|
5216
|
5219
|
]);
|
|
5217
|
5220
|
$query1 = clone ($query);
|
|
5218
|
5221
|
$query2 = clone ($query);
|
|
|
@@ -11692,7 +11695,8 @@ class StoreOrderRepository extends BaseRepository
|
|
11692
|
11695
|
|
|
11693
|
11696
|
// 为消费者 初始化 添加养老金记录
|
|
11694
|
11697
|
if (is_null($yanglaojin)) {
|
|
11695
|
|
- $yanglaojin = bcmul($storeOrderEntity->getTotalPrice(), CommonEnum::ORDER_EARNING_ALLOCATION['SharedProsperity']['Self']['YangLaoJin']['Ratio']['code'], CommonEnum::DECIMAL_PLACES_OF_THE_AMOUNT);
|
|
|
11698
|
+ $goodPrice = bcsub($storeOrderEntity->getTotalPrice(),$storeOrderEntity->getTotalPostage(),CommonEnum::DECIMAL_PLACES_OF_THE_AMOUNT);
|
|
|
11699
|
+ $yanglaojin = bcmul($goodPrice, CommonEnum::ORDER_EARNING_ALLOCATION['SharedProsperity']['Self']['YangLaoJin']['Ratio']['code'], CommonEnum::DECIMAL_PLACES_OF_THE_AMOUNT);
|
|
11696
|
11700
|
}
|
|
11697
|
11701
|
/** @var UserBillRepository $userBillRepository */
|
|
11698
|
11702
|
$userBillRepository = app()->make(UserBillRepository::class);
|
|
|
@@ -12105,17 +12109,21 @@ class StoreOrderRepository extends BaseRepository
|
|
12105
|
12109
|
}
|
|
12106
|
12110
|
}
|
|
12107
|
12111
|
|
|
12108
|
|
- $withdrawalLimit = bcmul($storeOrderEntity->getTotalPrice(), CommonEnum::WITHDRAWAL_LIMIT_RATIO, CommonEnum::DECIMAL_PLACES_OF_THE_AMOUNT);
|
|
12109
|
|
- /** @var UserWithdrawalLimitRecordRepository $userWithdrawalLimitRecordRepository */
|
|
12110
|
|
- $userWithdrawalLimitRecordRepository = app()->make(UserWithdrawalLimitRecordRepository::class);
|
|
12111
|
|
- $userWithdrawalLimitRecordRepository->addUserWithdrawalLimitRecord(
|
|
12112
|
|
- $userEntity->getUid(),
|
|
12113
|
|
- UserWithdrawalLimitRecordEnum::PM['INCOME']['code'],
|
|
12114
|
|
- $withdrawalLimit,
|
|
12115
|
|
- UserWithdrawalLimitRecordEnum::TYPE_SHOP['Platform']['code'],
|
|
12116
|
|
- $storeOrderEntity->getOrderSn(),
|
|
12117
|
|
- '消费获得提现额度'
|
|
12118
|
|
- );
|
|
|
12112
|
+
|
|
|
12113
|
+ // 复购区不给提现额度
|
|
|
12114
|
+ if ($storeOrderEntity->getMerId() != CommonEnum::DESIGN_MERCHANT_ID['Repurchase']['code']) {
|
|
|
12115
|
+ $withdrawalLimit = bcmul($storeOrderEntity->getTotalPrice(), CommonEnum::WITHDRAWAL_LIMIT_RATIO, CommonEnum::DECIMAL_PLACES_OF_THE_AMOUNT);
|
|
|
12116
|
+ /** @var UserWithdrawalLimitRecordRepository $userWithdrawalLimitRecordRepository */
|
|
|
12117
|
+ $userWithdrawalLimitRecordRepository = app()->make(UserWithdrawalLimitRecordRepository::class);
|
|
|
12118
|
+ $userWithdrawalLimitRecordRepository->addUserWithdrawalLimitRecord(
|
|
|
12119
|
+ $userEntity->getUid(),
|
|
|
12120
|
+ UserWithdrawalLimitRecordEnum::PM['INCOME']['code'],
|
|
|
12121
|
+ $withdrawalLimit,
|
|
|
12122
|
+ UserWithdrawalLimitRecordEnum::TYPE_SHOP['Platform']['code'],
|
|
|
12123
|
+ $storeOrderEntity->getOrderSn(),
|
|
|
12124
|
+ '消费获得提现额度'
|
|
|
12125
|
+ );
|
|
|
12126
|
+ }
|
|
12119
|
12127
|
}
|
|
12120
|
12128
|
|
|
12121
|
12129
|
/**
|