|
@@ -210,6 +210,9 @@ class AwardIntegralPriceRepository extends BaseRepository
|
|
|
|
|
|
|
|
$make = app()->make(UserBillRepository::class);
|
|
$make = app()->make(UserBillRepository::class);
|
|
|
$userRepository = app()->make(UserRepository::class);
|
|
$userRepository = app()->make(UserRepository::class);
|
|
|
|
|
+ if (bcsub($user['award_range'], $down_range, 2) <= 0){
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
$make->decBill($item['uid'], 'award_range', 'extract_award', [
|
|
$make->decBill($item['uid'], 'award_range', 'extract_award', [
|
|
|
'link_id' => $item['order_id'],
|
|
'link_id' => $item['order_id'],
|
|
|
'status' => 1,
|
|
'status' => 1,
|
|
@@ -219,7 +222,9 @@ class AwardIntegralPriceRepository extends BaseRepository
|
|
|
'balance' => bcsub($user['award_range'], $down_range, 2)
|
|
'balance' => bcsub($user['award_range'], $down_range, 2)
|
|
|
]);
|
|
]);
|
|
|
$userRepository->decField($item['uid'], 'award_range', $down_range);
|
|
$userRepository->decField($item['uid'], 'award_range', $down_range);
|
|
|
-
|
|
|
|
|
|
|
+ if (bcsub($user['award_integral'], $award_integral, 2) <= 0){
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
$make->decBill($item['uid'], 'award_integral', 'extract_award', [
|
|
$make->decBill($item['uid'], 'award_integral', 'extract_award', [
|
|
|
'link_id' => $item['order_id'],
|
|
'link_id' => $item['order_id'],
|
|
|
'status' => 1,
|
|
'status' => 1,
|