修改订单红包金额分配的错误
This commit is contained in:
parent
66130c66d2
commit
665eb57c5e
@ -350,7 +350,7 @@ class StoreConsumptionUserDao extends BaseDao
|
||||
$groupOrderTotalPrice = $this->groupOrderTotalPrice * 100;
|
||||
$consumptionBalance = $this->consumptionTotalAmount * 100;
|
||||
$rate = bcdiv($orderTotalPrice, $groupOrderTotalPrice, 5);
|
||||
if ($consumptionBalance >= $orderTotalPrice) {
|
||||
if ($consumptionBalance >= $groupOrderTotalPrice) {
|
||||
$useAmount = $orderTotalPrice;
|
||||
} else {
|
||||
$useAmount = $this->isLast ? $consumptionBalance : ceil(bcmul($consumptionBalance, $rate, 5));
|
||||
|
@ -58,6 +58,7 @@ class StoreCartRepository extends BaseRepository
|
||||
public function checkCartList($res, $hasCoupon = 0, $user = null)
|
||||
{
|
||||
$arr = $fail = [];
|
||||
/** @var ProductRepository $product_make */
|
||||
$product_make = app()->make(ProductRepository::class);
|
||||
$svip_status = ($user && $user->is_svip > 0 && systemConfig('svip_switch_status')) ? true : false;
|
||||
foreach ($res as $item) {
|
||||
|
@ -53,6 +53,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
$addressRepository = app()->make(UserAddressRepository::class);
|
||||
$address = $addressRepository->getWhere(['uid' => $uid, 'address_id' => $addressId]);
|
||||
}
|
||||
/** @var StoreCartRepository $storeCartRepository */
|
||||
$storeCartRepository = app()->make(StoreCartRepository::class);
|
||||
$res = $storeCartRepository->checkCartList($storeCartRepository->cartIbByData($cartId, $uid, $address), 0, $user);
|
||||
$merchantCartList = $res['list'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user