|
@@ -210,7 +210,10 @@ 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){
|
|
|
|
|
|
|
+ if (bcsub($user['award_range'], $down_range, 2) <= 0){ //如果用户的额度小于等于要扣除的10%额度就不计算
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (bcsub($user['award_integral'], $award_integral, 2) <= 0){ //如果用户的积分小于等于要扣除的10%积分就不计算
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
$make->decBill($item['uid'], 'award_range', 'extract_award', [
|
|
$make->decBill($item['uid'], 'award_range', 'extract_award', [
|
|
@@ -222,9 +225,7 @@ 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,
|