Просмотр исходного кода

Merge branch 'new-version' into feature/NC-45

kevin 1 год назад
Родитель
Сommit
5c828408c7
2 измененных файлов с 12 добавлено и 8 удалено
  1. 3 3
      common/helpers/bonus/PerfCalc.php
  2. 9 5
      common/models/StorePerfLog.php

+ 3 - 3
common/helpers/bonus/PerfCalc.php

@@ -43,7 +43,7 @@ use yii\base\StaticInstanceTrait;
 class PerfCalc {
     use StaticInstanceTrait;
 
-    private $_limit = 10000;
+    private $_limit = 5000;
     private $_handleUserId;
     private $_companyMonthPerf = 0;
     private $_cfTotalPercent = 0;
@@ -300,8 +300,8 @@ class PerfCalc {
             // // //达标业绩入库
             // $this->loopWriteStandardPerf();
             $t9 = microtime(true);
-            echo('本月业绩入库完成,耗时:' . round($t9 - $t8, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
-            $this->_updatePercent(95);
+//            echo('本月业绩入库完成,耗时:' . round($t9 - $t8, 3) . ',内存使用:' . (round(memory_get_usage() / 1024 / 1024, 3)) . 'MB' . PHP_EOL);
+//            $this->_updatePercent(95);
 
             
             // 通过插入到perforder中的业绩订单数据,生成此业绩期活跃用户数据

+ 9 - 5
common/models/StorePerfLog.php

@@ -2,6 +2,8 @@
 
 namespace common\models;
 
+use yii\db\Exception;
+
 /**
  * This is the model class for table "{{%STORE_PERF_LOG}}".
  *
@@ -53,12 +55,14 @@ class StorePerfLog extends \common\components\ActiveRecord
     }
 
     // 更新或者添加业绩数据
+
     /**
-     * @param $periodNum 结算业绩期
-     * @param $calcMonth 结算月
-     * @param $userId 结算过程中的用户
-     * @param $data 数据
-     * @param $appendPv 往上找店铺,需要给店铺的PV值
+     * @param int|string $periodNum 结算业绩期
+     * @param string $calcMonth 结算月
+     * @param string $userId 结算过程中的用户
+     * @param array $data 数据
+     * @param string|int|float $appendPv 往上找店铺,需要给店铺的PV值
+     * @throws Exception
      */
     public static function addOrUpdate($periodNum, $calcMonth, $userId, $data, $appendPv = 0) {
         $info = StorePerfLog::findUseDbCalc()