Browse Source

add return func

root 3 years ago
parent
commit
5fd4b84c63
1 changed files with 2 additions and 7 deletions
  1. 2 7
      common/helpers/bonus/PreparePerfCalc.php

+ 2 - 7
common/helpers/bonus/PreparePerfCalc.php

@@ -172,7 +172,6 @@ class PreparePerfCalc {
             $this->_updatePercent(90);
 
             $t9 = microtime(true);
-            echo('预计算业绩本月业绩入库完成,耗时:' . round($t9 - $t7, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
 
             $this->_updatePercent(100);
             $t10 = microtime(true);
@@ -932,7 +931,7 @@ class PreparePerfCalc {
                 unset($userId, $everyData, $nowMonthPerf, $lastMonthData, $userBaseInfo, $isVip);
             }
             unset($allData);
-            $this->loopCalcMonthPerfTableData($offset + $this->_limit);
+            return $this->loopCalcMonthPerfTableData($offset + $this->_limit);
         }
 
         unset($allData);
@@ -951,10 +950,6 @@ class PreparePerfCalc {
         if (!$this->_isCalcMonth) {
             return true;
         }
-        file_put_contents('aatxt.txt',var_export([
-            'offset' => $offset,
-            'CALC_MONTH' => $this->_calcYearMonth
-        ],true), FILE_APPEND);
         // 上面的计算月业绩,计算了前三期有的用户,此次只计算此结算周期未含有前三期业绩的用户
        
         echo sprintf("时间:[%s]预计月业绩,结算月新添加的用户,当前offset为:【%s】" . PHP_EOL, date('Y-m-d H:i:s', time()) , $offset);
@@ -1037,7 +1032,7 @@ class PreparePerfCalc {
                 unset($userId, $everyData, $nowMonthPerf, $lastMonthData, $userBaseInfo, $isVip);
             }
             unset($allData);
-            $this->loopCalcMonthPerfTableDataPrepare($offset + $this->_limit);
+            return $this->loopCalcMonthPerfTableDataPrepare($offset + $this->_limit);
         }
 
         unset($allData);