瀏覽代碼

会员升级

Kirin 1 年之前
父節點
當前提交
f7e9552a3e
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      app/jobs/integral/IntegralJob.php

+ 5 - 5
app/jobs/integral/IntegralJob.php

@@ -37,10 +37,10 @@ class IntegralJob extends BaseJobs
             try {
                 //添加静态积分
                 $static_integral_ratio = sys_config('static_integral_ratio', 0);
-                $give_static_integral = bcdiv(bcmul($award_price, $static_integral_ratio), 100, 2);
+                $give_static_integral = bcdiv(bcmul($total_price, $static_integral_ratio), 100, 2);
 //                if ($give_static_integral > 0) {
                 $rate = sys_config('static_integral_rate', 3);
-                $extract_sum = bcmul($award_price, $rate, 2);
+                $extract_sum = bcmul($total_price, $rate, 2);
                 $mark = '购买商品,获得消费分';
                 $awardIntegralService->incIntegral($order['uid'], $integral_price, $give_static_integral, $total_price, 0, $extract_sum, $order['id'], $mark);
 //                }
@@ -58,7 +58,7 @@ class IntegralJob extends BaseJobs
                 if ($spread) {
                     if ($awardIntegralService->getPaySum($spread['uid']) >= 1000 || $awardIntegralService->getHourExtractPaySum($spread['uid'], 24) >= 1000) {
                         $award_ratio = sys_config('recommend_integral', 0);
-                        $give_action_integral = bcdiv(bcmul($award_price, $award_ratio), 100, 2);
+                        $give_action_integral = bcdiv(bcmul($total_price, $award_ratio), 100, 2);
                         if ($give_action_integral > 0) {
                             $extract_sum = bcmul($give_action_integral, $rate, 2);
                             $mark = '推荐用户' . $user['nickname'] . "({$user['uid']})" . '购买商品,获得推荐积分';
@@ -67,7 +67,7 @@ class IntegralJob extends BaseJobs
                     }
                     if ($awardIntegralService->getPaySum($spread['uid']) > 0) {
                         $award_ratio = sys_config('recommend_speed_integral', 0);
-                        $give_action_integral = bcdiv(bcmul($award_price, $award_ratio), 100, 2);
+                        $give_action_integral = bcdiv(bcmul($total_price, $award_ratio), 100, 2);
                         if ($give_action_integral > 0) {
                             $first = $awardIntegralService->getFirstStaticIntegral($spread['uid']);
                             $mark = ',推荐用户' . $user['nickname'] . "({$user['uid']})" . '购买商品,获得加速积分';
@@ -82,7 +82,7 @@ class IntegralJob extends BaseJobs
                     //先发奖,再结算等级
                     $level = $levelServices->getUserLevel($spread['uid']);
                     $ratio = $level['levelInfo']['group_award'] ?? 0;
-                    $give_action_integral = bcdiv(bcmul($award_price, $ratio), 100, 2);
+                    $give_action_integral = bcdiv(bcmul($total_price, $ratio), 100, 2);
                     if ($give_action_integral > $send) {
                         $real_send = bcsub($give_action_integral, $send, 2);
 //                        if ($awardIntegralService->getHourExtractPaySum($spread['uid'], 24) > 0) {